Hello, on the web there are several recipes to integrate Spamassassin with Postfix, but no one seems to me to be the definitive recipe. I think that this configuration is quite common (for low volume smtp servers) and would deserve a small space in Postfix official documentation, but maybe it is already there and I missed it.
What I' doing is the following. From my master.cf: smtp inet n - - - - smtpd -o content_filter=spamassassin spamassassin unix - n n - - pipe flags=Rq user=nobody argv=/usr/bin/spamc -u ${user} -e /usr/sbin/sendmail -oi -f ${sender} ${recipient} The purpose is to have incoming mail scanned by Spamassassin (using spamd and smpamc) running as the user to whom the email will be delivered to (spam messages will be then discarded or archived with dedicated Sieve rules implemented by dovecot-lda). This works pretty well for all users but for the ones that are aliases. For example I have an alias routing messages sent to root to my user account. For those messages, the substitution variable ${user} takes the value of "root" and therefore spamd tries to run as root. There is a way to have the filtering done after postfix has resolved the aliases? There are other problems with this configuration that I'm not aware of? There are better ways of doing what I want to do? Thank you. Cheers, -- Daniele