Actually, spamassassin as setup runs as a deamon (spamd), and hooksSo how do you feed the mails from postfix into spamd and how does spamd handles the mail back to postfix?
into Postfix as a filter.
I am not going to pretend I understand everything, but he's my (over simplified) explaination:
Postfix gets an email (inbound)
Postfix content filter (spamfilter.sh) passes email to spamd, using spamc (spamc is a light-weight client for spamd).
Upon completion, the processed email is reinjected into postfix (through another content filter) for delivery.
The content filters are configured in /etc/postfix/master.cf:
# SpamAssassin-start
spamfilter unix - n n - - pipe
user=spamfilter argv=/etc/mail/spamfilter.sh -f ${sender} -- ${recipient}
smtp inet n - y - - smtpd
-o content_filter=spamfilter:
smtp unix - - y - - smtp
-o content_filter=spamfilter:
# SpamAssassin-endHope this helps!
S
