Multiple vacation
Michele Locati
mlocati at gmail.com
Tue Sep 8 15:53:19 UTC 2015
2015-09-08 17:34 GMT+02:00 Stephan Bosch <stephan at rename-it.nl>:
>
>
> Op 8-9-2015 om 17:15 schreef Michele Locati:
>
> I'm using Dovecot 2.2.9 and I'm having problems configuring multiple
>> vacation actions.
>> The problem is that I'd like to have two different senders and two
>> different messages, selecting the correct case by the recipient email
>> address.
>> I mean, if someone writes me to my email address "to-address1 at example.com
>> "
>> I'd like to answer from "from-address1 at example.com" with the message
>> "TEST
>> 1".
>> If someone writes me to my email address "to-address2 at example.com" I'd
>> like
>> to answer from "from-address2 at example.com" with the message "TEST 2".
>>
>> Here's my script:
>>
>> require ["fileinto","vacation"];
>>
>> vacation :addresses ["to-address1 at example.com"] :from "
>> from-address1 at example.com" text:
>> TEST 1
>> .
>> ;
>> }
>>
>> vacation :addresses ["to-address2 at example.com"] :from "
>> from-address2 at example.com" text:
>> TEST 2
>> .
>> ;
>>
>>
>> But the vacation filter doesn't work, and I see this message in the log
>> file:
>>
>> main script: line X: error: duplicate vacation action not allowed
>> (previously triggered one was here: main script: line Y).
>>
>> Is there a way to allow multiple vacation actions?
>>
>
> The script you posted will not even compile. There is a stray '}'.
>
> Anyway, you need to selectively trigger vacation responses. Your script
> tries to send both at all times, which is not allowed by the Sieve
> specification.
>
> You could do something like this:
>
> require ["fileinto","vacation", "envelope"];
>
> if envelope "to" "to-address1 at example.com" {
> vacation :addresses ["to-address1 at example.com"] :from "
> from-address1 at example.com" text:
> TEST 1
> .
> ;
> } elsif envelope "to" "to-address2 at example.com" {
> vacation :addresses ["to-address2 at example.com"] :from "
> from-address2 at example.com" text:
> TEST 2
> .
> ;
> }
>
> Read these for more information:
>
> https://tools.ietf.org/html/rfc5228
> https://tools.ietf.org/html/rfc5230
>
>
> Regards,
>
> Stephan.
>
>
Thank you Stephan
Sorry for the typo: I (badly) extracted part of my script, that is
generated by the managesieve plugin of Roundcube.
As for the RCF, vacation responses gets triggered only if the :address
contains the recipient of the message. Since the two vacation rules contain
different recipient address they wouldn't be triggered at the same time.
Manually editing that script would break the possibility to edit it via the
Roundcube plugin, and I can't absolutely teach every user of my company how
to connect via ssh and edit that script.
So, it's a big pity that is not possible to have two (or more) concurrent
vacation scripts: I'll have to manage every user by hand.
Thank you anyway for your explanation
--
Michele
More information about the dovecot
mailing list