#aptitude install procmail
#vi /etc/procmailrc DEFAULT=$HOME/Maildir MAILDIR=$HOME/Maildir
vi /home/<username>/.procmailrc # ~/.procmailrc PATH=/usr/bin:/usr/local/bin MAILDIR="$HOME/Maildir" DEFAULT="$HOME/Maildir" LOGFILE="$HOME/.procmail.log" SHELL="/bin/sh" VERBOSE=on #Heise-NL in heiseordner speichern :0: * ^From: .*listserv.heise.de .heise/ #mails mit spam-Flag in **SPAM** ordner speichern :0: * ^X-Spam-Status: .*yes .**SPAM**/ :0: ./
#vi /etc/postfix/main.cf mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir
#aptitude install spamassassin spamc
#groupadd -g 5001 spamd #useradd -u 5001 -g spamd -s /sbin/nologin -d /var/lib/spamassassin spamd #mkdir /var/lib/spamassassin #chown spamd:spamd /var/lib/spamassassin
#vi /etc/default/spamassassin ENABLED=1 OPTIONS="--create-prefs --max-children 5 --username spamd --helper-home-dir ${SAHOME} -s /var/log/spamd.log" PIDFILE="/var/run/spamd.pid" CRON=1
#vi /etc/spamassassin/local.cf rewrite_header Subject *****SPAM***** required_score 2.0 use_bayes 1 bayes_auto_learn 1
#vi /etc/postfix/master.cf #change smtp inet n - - - - smtpd to smtp inet n - - - - smtpd -o content_filter=spamassassin #add line at EOF spamassassin unix - n n - - pipe user=spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
#invoke-rc.d postfix stop && invoke-rc.d spamassassin stop && invoke-rc.d spamassassin start && invoke-rc.d postfix start