[Dovecot] Antispam only when LMTP delivers some specific messages

Robert Schetterer robert at schetterer.org
Fri Aug 3 15:45:33 EEST 2012


Am 03.08.2012 14:03, schrieb Sandro Tosi:
> 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,

you may use global sieve rules
perhaps look here for ideas

http://wiki2.dovecot.org/Pigeonhole/Sieve/Examples#Spam.2BAC8-Virus_rules

-- 
Best Regards
MfG Robert Schetterer



More information about the dovecot mailing list