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