Daniele Nicolodi wrote:
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.
How you integrate any given kind of content filtering "best" depends on
what you want to do with the filtering results.
(spam messages will be then discarded or archived with
dedicated Sieve rules implemented by dovecot-lda)
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?
Since you're happy to deliver the spam somewhere, rather than trying to
reject it during the SMTP conversation, you're probably best off calling
spamc early in your local-delivery rules rather than trying to integrate
it into Postfix somewhere. This way mail for a given real recipient
will always get processed by that recipient's filtering rules.
The cost is a slightly higher overall processing load from SpamAssassin,
since messages sent to "many" recipients by way of an alias will pass
through SA for each real recipient, instead of once.
Look up the standard procmailrc example from the SpamAssassin docs, and
adapt as necessary for sieve.
-kgd