Duplicate e-mail with Dovecot and Sieve

James Cassell fedoraproject at cyberpear.com
Tue Nov 26 23:51:13 EET 2019


On Tue, Nov 26, 2019, at 5:13 AM, Claudio Corvino via dovecot wrote:
>  
> Hi everyone,
> 
> we have a duplicate e-mail problem with Dovecot 2.2.13 (LMTP as MDA) on 
> a Debian 8 server.
> 
> Our users are on external LDAP.
> 
> We just need to setup a vacation responder (with Sieve) for our 
> employees with a redirect to an alias (a distribution list), let's call 
> it *LIST at domain.com*, that comprehends even the user that just 
> activated the out of office.
> 
> This generates a loop: when someone write to LIST at domain.com every user 
> of the aforementioned distribution list receives a duplicate e-mail 
> generated from the sieve script of the user with vacation responder 
> active that contains the redirect to LIST at domain.com.
> 
> We just tried activating the duplicate extension into sieve script but 
> the redirected e-mail has a different MSG-ID and it's not recognized as 
> a duplicate by the server.
> 
> Our dovecot conf is:
> 
[snip]
> An example of user sieve script is:
> 
> *require ["vnd.dovecot.duplicate","copy","fileinto","vacation-seconds"];
>  # rule:[Outofoffice]
>  if true
>  {
>  vacation :addresses "xxxxxxx at domain.tld" :subject "Automatic Reply" text:
> *
> 
> *<Text here>
>  .
>  ;
>  fileinto "INBOX";*
> 
> * redirect "LIST at domain.com";*
> 
> *}*
> 

You've not used the duplicate test anywhere in your example.  See the RFC for examples:
https://tools.ietf.org/html/rfc7352#section-5


Specifically, example 3 might help: https://tools.ietf.org/html/rfc7352#section-5.3

but most simply, you can probably replace `if true` with `if not duplicate`


V/r,
James Cassell


More information about the dovecot mailing list