freebsdrocks.net was started originally as nospam.mine.nu.
This requires that you are running SquirrelMail 1.4.x or above and Apache 2.2 or higher.
Download the following related files into your squirrelmail plugins folder:
# cd /usr/local/www/squirrelmail/plugins << For FreeBSD (Other systems may vary)
# fetch http://freebsdrocks.net/files/tarballs/spam_buttons-2.3-1.4.0.tar.gz
# fetch http://freebsdrocks.net/files/tarballs/compatibility-2.0.14-1.0.tar.gz
# ~vpopmail/bin/vadduser thisisspam @ domain.com password
# ~vpopmail/bin/vadduser thisisham @ domain.com password
Now lets unzip them
# tar zxvf spam_buttons-2.3-1.4.0.tar.gz
# tar zxvf compatibility-2.0.14-1.0.tar.gz
Now to configure spam buttons:
# cd spam_buttons
# cp config_example.php config.php
# vi config.php
# $is_spam_resend_destination = ' thisisspam@domain.com';
# $is_not_spam_resend_destination = ' thisisham@domain.com';
Verify the following is set:
//$spam_report_email_method = 'bounce';
$spam_report_email_method = 'attachment';
//$is_spam_subject_prefix = 'SPAM';
//$is_not_spam_subject_prefix = 'HAM';
# rm ~vpopmail/domains/domain.com/thisisspam/.qmail
# rm ~vpopmail/domains/domain.com/thisisspam/mailfilter
# rm ~vpopmail/domains/domain.com/thisisham/.qmail
# rm ~vpopmail/domains/domain.com/thisisham/mailfilter
$sb_report_spam_by_move_to_folder = 'Inbox.Spam';
$sb_report_not_spam_by_move_to_folder = 'Inbox';
However, It does not delete the message when it is being reported.
If you are running Squirrelmail 5.x, Skip the following patch section.
Patch SquirrelMail 1.4.x to enable button display on the message list page. The patch should be run from the spam_buttons directory.
# patch -p0 < patches/spam_buttons-squirrelmail-1.4.4.diff
# cd /usr/local/www/squirrelmail/plugins/config
# ./conf.pl
8. Plugins
Look under Available Plugins: and look for spam_buttons which is usually the last one at the bottom. The number to the left of it is the number you want to type in to enable it. Do that and hit enter and
then you should see it under Installed Plugins. Also enable the Compatibility plugin as well before you continue. Press S and hit enter to save the data and hit Q to quit and hit enter. The squirrelmail plugin is now enabled and functional.
The startup scripts I just put in my bin directory in my ~home drive. Now you can put hamauto.sh and spamauto.sh in crontab like so: This will tell crontab to run both scripts at 1PM and 1AM every day. Change at your discretion. When this is completed, Users will now be able to report ham and spam. :-)
# cd ~user
# mkdir bin
# cd bin
# fetch http://freebsdrocks.net/files/tarballs/autolearn2.tgz
# tar zxvf autolearn2.tgz
Edit spamauto.sh and hamauto.sh and change the sections that say:
DOMAIN="domain.com"
SPAMUSER="thisis*am"
MAILDIR="/home/vpopmail/domains/$DOMAIN/$SPAMUSER/Maildir/new"
SA_LEARN_LOG="/var/log/spamlearn.log"
0 1,13 * * * ~user/bin/hamauto.sh > /dev/null 2>&1
0 1,13 * * * ~user/bin/spamauto.sh > /dev/null 2>&1
