Lucio Crusca writes:
Hello all,here are the first four lines of my .mailfilter file (lucio_at_sulweb_dot_org account): if (/^X-Spam-Flag: Yes/) { to Maildir/.spam/ } The system wide DEFAULTDELIVERY includes SpamAssassin: # cat /etc/courier/courierd | grep ^DEFAULTDELIVERY DEFAULTDELIVERY="|/usr/bin/spamc|/usr/bin/maildrop" That's working ok. The same server hosts another domain, namely softwareliberopinerolo.org, which has the info@ account that sends CC of every message to my account. Here is its .mailfilter root@nmx:/home/mail/softwareliberopinerolo.org/info# cat .mailfilter cc "!lu...@sulweb.org" Now the problem is that spamc is being called twice for CC'ed messages: the first time (info@) spamc correctly marks the messages as spam, but the second time (lucio@) the message is considered ham because the first spamc execution had already wrapped it in a "Spam detection software, running on the system nmx.sulweb.org, has identified..." container. So the second spamc run "overwrites" X-Spam-Flag and X-Spam-Level headers, and my .mailfilter does not move the message to the spam folder anymore. Solutions?
Instead of running spamc from DEFAULTDELIVERY, run it via xfilter from /etc/courier/maildroprc only if the mail does not already have SpamAssassin's headers.
This is not a perfect solution. Someone sending you spam can easily add the same headers to the spam, thus bypassing your spam filters.
Ideally, this should be handled entirely by SpamAssassin, which should pass through the message immediately, unmodified, if the message was already tagged with its headers. Each individual SpamAssassin's installation should generate a long random token, include it in the headers of all filtered messages, and pass through the message, unfiltered, if it already has its own token.
pgpO3kpgfzcmZ.pgp
Description: PGP signature
------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/
_______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users