[Dovecot] Sieve scripts
Nick Lunt
nick.lunt at patech-solutions.com
Tue Apr 6 10:48:39 EEST 2010
Hi Jerry
> -----Original Message-----
> From: dovecot-bounces+nick.lunt=patech-solutions.com at dovecot.org
> [mailto:dovecot-bounces+nick.lunt=patech-solutions.com at dovecot.org] On
> Behalf Of Jerry
> Sent: 01 April 2010 18:14
> To: dovecot at dovecot.org
> Subject: Re: [Dovecot] Sieve scripts
>
> 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;}
Testing this now, I'll let you know how it goes.
Thank you.
Nick .
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5002 (20100405) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
More information about the dovecot
mailing list