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