[Dovecot] Sieve scripts
Jerry
dovecot.user at seibercom.net
Thu Apr 1 20:13:37 EEST 2010
On Thu, 1 Apr 2010 16:17:23 +0100, Nick Lunt
<nick.lunt at patech-solutions.com> articulated:
> Hi
>
> I have a simple sieve script to discard email with a certain string in
> the subject.
> I now need to beef this up a bit with the following:
>
> if header :contains "subject" "A" and "B" and not "C"
> discard
> if header :contains "subject" "A" and "D" and not "C"
> discard
> else
> pass
>
>
> Maybe my google skills are failing but I can't find much info on
> creating sieve scripts.
> Can anyone point me in the right direction to achieve this please ?
((untested))
require ["fileinto", "reject"];
if allof (header :contains "Subject" ["A", "B"],
not header :contains "Subject" "C")
{discard; stop;}
elsif allof (header :contains "Subject" ["A", "D"],
not header :contains "Subject" "C")
{discard; stop;}
else {keep;}
--
Jerry
Dovecot.user at seibercom.net
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________
You know you're a little fat if you have stretch marks on your car.
Cyrus, Chicago Reader 1/22/82
More information about the dovecot
mailing list