This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
start:howto:spamassassin-user-prefs-sql [2012/08/04 14:09] BeNe |
start:howto:spamassassin-user-prefs-sql [2015/01/19 23:40] ninos removed |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **This HowTo is old. Please use following plugin! | ||
+ | http://i-mscp.net/filebase/index.php/File/14-SpamAssassin/** | ||
+ | |||
====== Info ====== | ====== Info ====== | ||
- | **This is more a less a DRAFT (Version 0.2) and should not be use on a productive system! \\ | + | This HowTo is more or less ready for use. \\ |
- | The HowTo is not ready but i will make it public so that other user can go on with it. I have not that time... \\ | + | |
Feel free to change it ;-) | Feel free to change it ;-) | ||
- | For any question use the Forum or PM me (BeNe)** | + | For any question use the Forum or PM me (BeNe) |
====== Needed Packages ====== | ====== Needed Packages ====== | ||
+ | <code> | ||
+ | aptitude update | ||
+ | </code> | ||
<code> | <code> | ||
aptitude install libaprutil1-dbd-mysql razor libnet-dns-perl libmailtools-perl spamc spamassassin libmail-dkim-perl dkim-filter clamsmtp libtie-cache-perl libdbd-mysql-perl pyzor | aptitude install libaprutil1-dbd-mysql razor libnet-dns-perl libmailtools-perl spamc spamassassin libmail-dkim-perl dkim-filter clamsmtp libtie-cache-perl libdbd-mysql-perl pyzor | ||
Line 39: | Line 44: | ||
# Enable or disable network checks | # Enable or disable network checks | ||
skip_rbl_checks 0 | skip_rbl_checks 0 | ||
- | use_razor2 0 | + | use_razor2 1 |
- | #use_dcc 0 | + | use_dcc 0 |
- | use_pyzor 0 | + | use_pyzor 1 |
</code> | </code> | ||
Line 56: | Line 61: | ||
smtp inet n - - - - smtpd | smtp inet n - - - - smtpd | ||
-o content_filter=spamassassin | -o content_filter=spamassassin | ||
- | # -o receive_override_options=no_address_mappings | + | -o receive_override_options=no_address_mappings |
</code> | </code> | ||
+ | First option is to activate spamassassin. | ||
+ | Second option prevents that some forwarded mails are sent twice. | ||
Add on the end of the file: | Add on the end of the file: | ||
Line 138: | Line 145: | ||
# Change to one to enable spamd | # Change to one to enable spamd | ||
- | ##ENABLED=0 | + | ENABLED=1 |
+ | |||
+ | # Set new created SAHOME | ||
+ | SAHOME="/var/lib/spamassassin/" | ||
# Options | # Options | ||
Line 148: | Line 158: | ||
##OPTIONS="--create-prefs --max-children 5 --helper-home-dir" | ##OPTIONS="--create-prefs --max-children 5 --helper-home-dir" | ||
+ | OPTIONS="-d -q -x --create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log" | ||
# Pid file | # Pid file | ||
Line 154: | Line 165: | ||
# Otherwise, the init script will not be able to shut spamd down. | # Otherwise, the init script will not be able to shut spamd down. | ||
##PIDFILE="/var/run/spamd.pid" | ##PIDFILE="/var/run/spamd.pid" | ||
+ | PIDFILE="${SAHOME}spamd.pid" | ||
# Set nice level of spamd | # Set nice level of spamd | ||
Line 162: | Line 174: | ||
# spamassassin's rules on a nightly basis | # spamassassin's rules on a nightly basis | ||
CRON=0 | CRON=0 | ||
- | |||
- | ENABLED=1 | ||
- | SAHOME="/var/lib/spamassassin/" | ||
- | OPTIONS="-d -q --create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log" | ||
- | PIDFILE="${SAHOME}spamd.pid" | ||
- | </code> | ||
- | |||
- | ===== Cron ===== | ||
- | <code> | ||
- | 13 */2 * * * /usr/local/bin/sa-update && /etc/init.d/spamassassin restart | ||
</code> | </code> | ||
===== FOR DEBUG ===== | ===== FOR DEBUG ===== | ||
+ | Please use this just for debug (no daemonize) | ||
<code> | <code> | ||
spamd -D -q -x --create-prefs --max-children 5 --username spamd --helper-home-dir /var/lib/spamassassin/ -s /var/lib/spamassassin/spamd.log --pidfile=/var/lib/spamassassin/spamd.pid | spamd -D -q -x --create-prefs --max-children 5 --username spamd --helper-home-dir /var/lib/spamassassin/ -s /var/lib/spamassassin/spamd.log --pidfile=/var/lib/spamassassin/spamd.pid | ||
Line 403: | Line 405: | ||
====== ToDo ====== | ====== ToDo ====== | ||
- | Mark as Junk2 Plugin for RC\\ | + | Mark as Junk2 Plugin for RC 0.8.x\\ |
- | sa-learn works ? \\ | + | |
- | This and that \\ | + |