You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by co...@spamassassin.apache.org on 2005/03/05 15:25:43 UTC
[SpamAssassin Wiki] Updated: IntegratedSpamdInPostfix
Date: 2005-03-05T06:25:43
Editor: DmitriMuntean
Wiki: SpamAssassin Wiki
Page: IntegratedSpamdInPostfix
URL: http://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix
no comment
Change Log:
------------------------------------------------------------------------------
@@ -1,6 +1,6 @@
= Integrating SpamAssassin into Postfix using spamd =
-The easiest way to integrate postfix and spamassassin is to use spamd.
+The easiest way to integrate postfix and spamassassin is to use spamd.
First, edit /etc/postfix/master.cf, find the
{{{
@@ -30,10 +30,10 @@
# (yes) (yes) (yes) (never) (50)
# ==========================================================================
...
-spamassassin
- unix - n n - - pipe
+spamassassin
+ unix - n n - - pipe
user=nobody argv=/path/to/spamc -f -e /path/to/postfix/sendmail -oi -f ${sender} ${recipient}
-# make sure it's all on one line or
+# make sure it's all on one line or
# start the consecutive lines with a whitespace
# like I did here
}}}
@@ -42,7 +42,19 @@
Then, setup spamd to start with the system, and you are ready to go. If you wish to provide spamassassin
preferences, change "user=nobody" to a valid system user (except for root, since Postfix will NOT call external programs as root), and add .spamassassin into that user's home directory.
+If you use user preferences stored in SQL, you should change "spamassassin" service in master.cf to following:
+{{{
+# ==========================================================================
+# service type private unpriv chroot wakeup maxproc command + args
+# (yes) (yes) (yes) (never) (50)
+# ==========================================================================
+...
+spamassassin
+ unix - n n - - pipe
+ user=nobody argv=/path/to/spamc -f -u ${recipinet} -e /path/to/postfix/sendmail -oi -f ${sender} ${recipient}
+}}}
+Notice "-u ${recepint}" added. Otherwise "username" field in database will always appear as 'spamd'.
+
Note that this exact method of invoking SpamAssassin is not very robust. Should spamc for some reason fail to start, Postfix will start bouncing mail. A more robust but also more I/O-intensive solution is the one proposed in the [http://www.postfix.org/FILTER_README.html FILTER_README file] that comes with the Postfix distribution.
Only mail received by SMTP will be scanned with this method, i.e. mail injected with sendmail(1) will not be fed to SpamAssassin.
-