[Dovecot] Antispam only when LMTP delivers some specific messages

Sandro Tosi sandro.tosi at dada.eu
Fri Aug 3 15:03:28 EEST 2012


Hello,
we're setting up a weird platform where every incoming email is passed 
from the MTA directly to a tool that then uses dovecot LMTP to deliver 
the message into the user mailbox.

We are legally *not* allowed to run antispam on all the incoming 
messages, but only on some of them, as they are recognized by the 
aforementioned tool; but given that tool directly uses LMTP to delivers 
the mail we need to find a way to parse the messages passing thru LMTP 
and run spamassassin only on those matching some regex on subject and 
mail body.

Is is possible to do that with some dovecot LMTP feature?

i've read a lot of documentation about how to possibly implement it and 
it *seems* there would be a way using pigeonhole sieve and extprograms - 
what do you think?

The idea I have in mind is something like:

  1. identify the mails we want to scan with spamassassin (using regex 
or whatever else to precisely pin-point them)
  2. run SA on those
  3. in case it's spam, rewrite the subject (or similar)

Do you think it's something doable with dovecot?

Thanks in advance,
-- 
Sandro Tosi
Product Engineer
Shared Hosting Products
R&D | Dada.pro
eml sandro.tosi at register.it



More information about the dovecot mailing list