speaking of sieve scripts... how to selectively not send vacation autoreply

Harondel J. Sibble help at pdscc.com
Sat Apr 4 16:44:08 UTC 2015



On 4 Apr 2015 at 12:19, Stephan Bosch wrote:

> >     #if header :contains "addressIdontwant at repliedtoo.tld" {
> >     #       stop;
> >     #}
> >
> >     vacation
> >       # Reply at most once a day to a same sender
> 
> You should really inspect your log files or test the scripts with the
> sieve-test command line tool. There is a syntax error in the part you
> commented out:
> 
> error: the header test requires 2 positional argument(s), but 1 is/are
> specified.
> 
> At delivery, this means that the script is not executed at all and the
> message is just filed into INBOX.
> 
> Regards,
> 
> Stephan.

I wasn't even aware of the sieve-test command, that'll really come in handy, 
thanks for that tip

I believe I based my entry on the 

    if header :contains "X-Spam-Level" "**********" {
      discard;
      stop;
    }

here and until you mentioned it, I did not realize the *'s were a second 
argument, I'd assumed it as part and parcel of the same argument.

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


I'll try the recipie RH posted

    if address :is ["From", "Sender"] ["h.reindl at thelounge.net", 
    "nick.z.edwards at gmail.com"]
    {
      discard;
    }

modified as below

if address :is ["From", "Sender"] ["addressIdontwant at repliedtoo.tld", 
"otheraddressIdontwant at repliedtoo.tld"]
{
  stop;
}

-- 
Harondel J. Sibble 
Sibble Computer Consulting Ltd.
Creating Solutions for the small and medium business computer user.
harondel at pdscc.com (use pgp keyid 0x3CC3CFCE not 0x3AD5C11D) 
http://www.pdscc.com
Blog: http://www.pdscc.com/blog
(604) 739-3709 (voice)



More information about the dovecot mailing list