[Dovecot] sieve or another vacation/autoreply

Lampa lampacz at gmail.com
Mon Jan 25 22:47:14 EET 2010


Hello,

thank you for pointing in right direction.

require ["enotify", "variables", "fileinto", "envelope"];

#if address :matches :all "from" "*" {
#       set "from_addr" "${1}";
#}

if envelope :matches "from" "*" {
        # URI-encode the recipient address when necessary
        set :encodeurl "from" "${1}";

        if envelope :matches "to" "*" {
                set "to" "${1}";
                set :encodeurl "body" "Thank you for contacting us...
We will contact you as soom as possible

Blah blah blah...";
                notify :message "Automatic reply - delivery
notification" :from "${to}" "mailto:${from}?body=${body}";
                keep;
        }
}

2010/1/25 Stephan Bosch <stephan at rename-it.nl>:
> Lampa wrote:
>>
>> Hello,
>>
>> i'm trying to do some delivery notification for each incoming address.
>> Problem is that sieve vacation has :days but minimum value is 1 eg
>> period in which addresses
>>   are kept and are not responded to - but that is not that i want.
>>
>> Is there other extension (in devel ???) or some other way (lda using
>> procmail or maildrop) how to implement my request ? (Before migration
>> we used qmail + procmail).
>>
>
> I am not quite sure what you are trying to achieve with this, however I've
> devised something that matches your description:
>
> require "enotify";
> require "variables";
> require "envelope";
>
> # Let's not reply to robots and mailing lists
> if allof (not exists "list-id",
>    anyof (not exists "auto-submitted",
>        header "auto-submitted" "no")) {
>
>    # Get the return path
>    if envelope :matches "from" "*" {
>
>        # URI-encode the recipient address when necessary
>        set :encodeurl "from" "${1}";
>
>        # Send notification back to sender
>        notify :message "Message received!" "mailto:${from}";
>    }
> }
>
> This is somewhat scary though.
>
> Regards,
>
> --
> Stephan Bosch
> stephan at rename-it.nl
>



-- 
Lampa


More information about the dovecot mailing list