2ff09a61790e55d35dd3e18f70212f24560ae916
[squirrelmail.git] / plugins / spamcop / options.php
1 <?php
2 chdir ('..');
3 define('SM_PATH','../');
4 require_once(SM_PATH . 'include/validate.php');
5
6 displayPageHeader($color, "None");
7
8 if (! isset($action))
9 $action = '';
10 if ($action == 'enable')
11 setPref($data_dir, $username, 'spamcop_enabled', 1);
12 elseif ($action == 'disable')
13 setPref($data_dir, $username, 'spamcop_enabled', '');
14 elseif ($action == 'save')
15 setPref($data_dir, $username, 'spamcop_delete', '');
16 elseif ($action == 'delete')
17 setPref($data_dir, $username, 'spamcop_delete', 1);
18 elseif ($action == 'meth' && isset($meth))
19 setPref($data_dir, $username, 'spamcop_method', $meth);
20 elseif ($action == 'save_id' && isset($ID))
21 setPref($data_dir, $username, 'spamcop_id', $ID);
22
23 global $spamcop_enabled, $spamcop_delete;
24 spamcop_load();
25
26 ?>
27 <br>
28 <table width=95% align=center border=0 cellpadding=2 cellspacing=0><tr><td bgcolor="<?php echo $color[0] ?>">
29 <center><b><?php echo _("Options") ?> - Message Filtering</b></center>
30 </td></tr></table>
31 <br>
32
33 <table align=center>
34 <tr>
35 <td align=right>SpamCop link is:</td>
36 <td><?PHP if ($spamcop_enabled) {
37 ?>Enabled (<a href="options.php?action=disable">Disable it</a>)
38 <?PHP } else {
39 ?>Disabled (<a href="options.php?action=enable">Enable it</a>)
40 <?PHP }
41 ?></td>
42 </tr>
43 <tr>
44 <td align=right valign=top>Delete spam when reported:<br>
45 <font size="-2">(Only works with email-based reporting)</font>
46 </td>
47 <td valign=top><?PHP if ($spamcop_delete) {
48 ?>Enabled (<a href="options.php?action=save">Disable it</a>)
49 <?PHP } else {
50 ?>Disabled (<a href="options.php?action=delete">Enable it</a>)
51 <?PHP }
52 ?></td>
53 </tr>
54 <tr>
55 <td align=right>Spam Reporting Method:</td>
56 <form method=post action=options.php><td>
57 <select name=meth>
58 <option value="quick_email"<?PHP
59 if ($spamcop_method == 'quick_email') echo ' SELECTED'
60 ?>>Quick email-based reporting</option>
61 <option value="thorough_email"<?PHP
62 if ($spamcop_method == 'thorough_email') echo ' SELECTED'
63 ?>>Thorough email-based reporting</option>
64 <option value="web_form"<?PHP
65 if ($spamcop_method == 'web_form') echo ' SELECTED'
66 ?>>Web-based form</option>
67 </select>
68 <input type=hidden name=action value=meth>
69 <input type=submit value="Save Method">
70 </td></form>
71 </tr>
72 <tr>
73 <td valign=top align=right>Your SpamCop authorization code:<br>
74 <font size="-2">(see below)</font>
75 </td>
76 <form method=post action=options.php><td valign=top>
77 <input type=text size=30 name="ID" value="<?PHP
78 echo htmlspecialchars($spamcop_id) ?>">
79 <input type=hidden name=action value=save_id>
80 <input type=submit value="Save ID">
81 </td></form>
82 </tr>
83 </table>
84
85 <p>SpamCop is a free service that greatly assists in finding the true source
86 of the spam and helps in letting the proper people know about the abuse.</p>
87
88 <p>To use it, you must get a SpamCop authorization code. There is a free <a
89 href="http://spamcop.net/anonsignup.shtml">sign up page</a> so you can use
90 SpamCop.</p>
91
92 <p><b>Before you sign up, be warned:</b> Some users have reported that the
93 email addresses used with SpamCop find their way onto spam lists. To be
94 safe, you can just create an email forwarding account and have all SpamCop
95 reports get sent to there. Also, if it gets flooded with spam, you can then
96 just delete that account with no worries about losing your real email address.
97 Just go create an email forwarder somewhere (<a
98 href="http://www.yahoo.com/">Yahoo!</a> has a <a
99 href="http://dir.yahoo.com/Business_and_Economy/Business_to_Business/Communications_and_Networking/Internet_and_World_Wide_Web/Email_Providers/Forwarding_Services/Free_Forwarding/">list
100 of places</a>) so that messages from system administrators and whatnot can
101 be sent to you.</p>
102
103 <p>Once you have signed up with SpamCop and have received your SpamCop
104 authorization code, you need to enable this plugin -- just click the link
105 above. Once enabled, you go about your normal life. If you encounter a
106 spam message in your mailbox, just view it. On the right-hand side, near
107 the top of where the message is displayed, you will see a link to report
108 this message as spam. Clicking on it brings you to a confirmation page.
109 Confirming that you want the spam report sent will do different things with
110 different reporting methods.</p>
111
112 <p><b>Email-based Reporting</b><br>
113 Pressing the button forwards the message to the SpamCop service and will
114 optionally delete the message. From there, you just need to go to your
115 INBOX and quite soon a message should appear from SpamCop. (It gets sent to
116 the account you registered with, so make sure that your mail forwarder works!)
117 Open it up, click on the appropriate link at the top, and a new browser
118 window will open.</p>
119
120 <p>Currently, the quick reporting just forwards the request to the thorough
121 reporting. Also, it appears that this is for members (non-free) only.
122 Hopefully this will change soon.</p>
123
124 <p><b>Web-based Reporting</b><br>
125 When you press the button on the confirmation page, this will pop open a new
126 browser window and the SpamCop service should appear inside. The message
127 will not be deleted (working on that part), but you won't need to wait for a
128 response email to start the spam reporting.</p>
129
130 <p>The SpamCop service will display information as it finds it, so scroll
131 down until you see a form button. It might pause a little while it is
132 looking up information, so be a little patient. Read what it says, and
133 submit the spam. Close the browser window. Press Cancel or click on the
134 appropriate mail folder to see messages and/or delete the spam.</p>
135
136 <p><b>For more information</b> about SpamCop, it's services, spam in general,
137 and many related topics, try reading through SpamCop's <a
138 href="http://spamcop.net/help.shtml">Help and Feedback</a> section.</p>
139
140 </body></html>