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