<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi everyone,</p>
    <p>we have a duplicate e-mail problem with Dovecot 2.2.13 (LMTP as
      MDA) on a Debian 8 server.<br>
    </p>
    <p>Our users are on external LDAP.</p>
    <p>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 <i><a class="moz-txt-link-abbreviated" href="mailto:LIST@domain.com">LIST@domain.com</a></i>, that comprehends even the user
      that just activated the out of office.</p>
    <p>This generates a loop: when someone write to <a class="moz-txt-link-abbreviated" href="mailto:LIST@domain.com">LIST@domain.com</a>
      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
      <a class="moz-txt-link-abbreviated" href="mailto:LIST@domain.com">LIST@domain.com</a>.</p>
    <p>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.<br>
    </p>
    <p>Our dovecot conf is:</p>
    <p><font color="#333333"><i><font size="-2"># 2.2.13:
            /etc/dovecot/dovecot.conf<br>
            auth_mechanisms = plain login<br>
            default_vsz_limit = 512 M<br>
            disable_plaintext_auth = no<br>
            dotlock_use_excl = no<br>
            info_log_path = /var/log/dovecot-info.log<br>
            log_path = /var/log/dovecot.log<br>
            mail_fsync = never<br>
            mail_location = maildir:~/Maildir<br>
            mail_max_userip_connections = 50<br>
            managesieve_notify_capability = mailto<br>
            managesieve_sieve_capability = fileinto reject envelope
            encoded-character vacation subaddress
            comparator-i;ascii-numeric relational regex imap4flags copy
            include variables body enotify environment mailbox date
            ihave duplicate<br>
            mmap_disable = yes<br>
            passdb {<br>
              args = /etc/dovecot/dovecot-ldap.conf<br>
              driver = ldap<br>
            }<br>
            passdb {<br>
              args = /etc/dovecot/dovecot-ldap-archive.conf<br>
              driver = ldap<br>
            }<br>
            plugin {<br>
              sieve = <a class="moz-txt-link-freetext"
              href="file:/var/www/html/ooo/%n/script">file:/var/www/html/ooo/%n/script</a><br>
              sieve_dir = /var/www/html/ooo/%n/<br>
              sieve_duplicate_default_period = 1m<br>
              sieve_duplicate_max_period = 1d<br>
              sieve_extensions = +vnd.dovecot.duplicate +notify
            +imapflags +vacation-seconds<br>
              sieve_global = /etc/dovecot/sieve/<br>
              sieve_max_redirects = 10<br>
              sieve_user_log = <a class="moz-txt-link-freetext"
              href="file:/var/www/html/ooo/%n/sieve_error.log">file:/var/www/html/ooo/%n/sieve_error.log</a><br>
              sieve_vacation_default_period = 1d<br>
              sieve_vacation_max_period = 90d<br>
              sieve_vacation_min_period = 5s<br>
            }<br>
            protocols = imap pop3 lmtp sieve<br>
            service auth {<br>
              unix_listener /var/spool/postfix/private/auth {<br>
                group = postfix<br>
                mode = 0660<br>
                user = postfix<br>
              }<br>
              unix_listener auth-master {<br>
                group = vmail<br>
                mode = 0660<br>
                user = vmail<br>
              }<br>
              user = root<br>
            }<br>
            service imap-login {<br>
              process_limit = 200<br>
            }<br>
            service lmtp {<br>
              executable = lmtp -L<br>
              process_min_avail = 5<br>
              unix_listener /var/spool/postfix/private/dovecot-lmtp {<br>
                group = postfix<br>
                mode = 0666<br>
                user = postfix<br>
              }<br>
              user = vmail<br>
            }<br>
            service managesieve-login {<br>
              executable = /usr/lib/dovecot/managesieve-login<br>
              inet_listener sieve {<br>
                port = 4190<br>
              }<br>
              process_min_avail = 10<br>
              service_count = 1<br>
            }<br>
            service managesieve {<br>
              executable = /usr/lib/dovecot/managesieve<br>
            }<br>
            ssl_cert = </etc/ssl/<b>xxxxxxxxxxxxxxxxxxxxxxxx</b><br>
            ssl_cipher_list =
            ALL:!LOW:!aNULL:!eNULL:!SSLv2:!RC4:!MD5:!DES:!EXP:!SEED:!IDEA:!3DES<br>
            ssl_key = </etc/ssl/private/<b>xxxxxxxxxxxxxxxxxx</b><br>
            userdb {<br>
              args = /etc/dovecot/dovecot-ldap.conf<br>
              driver = ldap<br>
            }<br>
            userdb {<br>
              args = /etc/dovecot/dovecot-ldap-archive.conf<br>
              driver = ldap<br>
            }<br>
            protocol lda {<br>
              auth_socket_path = /var/run/dovecot/auth-master<br>
              hostname = <b>xxxxxxxxxxxxxxxxx</b><br>
              info_log_path = /var/log/dovecot-lda.log<br>
              log_path = /var/log/dovecot-lda-errors.log<br>
              mail_plugins = " autocreate sieve quota"<br>
            }<br>
            protocol lmtp {<br>
              info_log_path = /var/log/dovecot-lmtp.log<br>
              log_path = /var/log/dovecot-lmtp-errors.log<br>
              mail_plugins = " autocreate sieve quota"<br>
              postmaster_address = postmaster@<b>xxxxxxxxxx</b><br>
            }<br>
            protocol sieve {<br>
              info_log_path = <br>
              log_path = <br>
              mail_max_userip_connections = 10<br>
              managesieve_implementation_string = dovecot<br>
              managesieve_logout_format = bytes=%i/%o<br>
              managesieve_max_compile_errors = 5<br>
              managesieve_max_line_length = 65536<br>
            }</font></i></font><br>
    </p>
    <p>An example of user sieve script is:</p>
    <p><font color="#333333"><i><font size="-2">require
            ["vnd.dovecot.duplicate","copy","fileinto","vacation-seconds"];<br>
            # rule:[Outofoffice]<br>
            if true<br>
            {<br>
                vacation :addresses <a class="moz-txt-link-rfc2396E" href="mailto:xxxxxxx@domain.tld">"xxxxxxx@domain.tld"</a> :subject
            "Automatic Reply" text:<br>
          </font></i></font></p>
    <p><font color="#333333"><i><font size="-2"><Text here><br>
            .<br>
            ;<br>
                fileinto "INBOX";</font></i></font></p>
    <p><font color="#333333"><i><font size="-2">    redirect
            <a class="moz-txt-link-rfc2396E" href="mailto:LIST@domain.com">"LIST@domain.com"</a>;</font></i></font></p>
    <p><font color="#333333"><i><font size="-2">}</font></i></font><br>
    </p>
    <p>Please could someone give us support on the matter?</p>
    <p>Removing the redirect from sieve user script is not an option :-)</p>
    <p>Thanks</p>
    <p>Cheers<br>
    </p>
    <div class="moz-signature">-- <br>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title></title>
      <style type="text/css">
    .attacca {
        margin-top: -15px;
    }
</style>
      <div>
        <p style="line-height:normal"> <strong><span
              style="font-size:11.0pt;font-family:Helvetica;color:black">Claudio
              Corvino</span><br>
            <span
              style="font-size:9.0pt;font-family:Helvetica;color:gray;">IT
              Systems Administrator</span></strong> </p>
        <p> <a href="https://www.trustitalia.it/"><span
style="font-size:9.0pt;font-family:Helvetica;color:windowtext;text-decoration:none;text-underline:none">
              <img
                src="https://www.trustitalia.it/immagini/logoMail.png"
                alt="Trust Italia S.p.A." width="130" height="40"
                border="0"></span> </a><br>
        </p>
        <div class="attacca"
          style="font-size:9.0pt;font-family:Helvetica;color:gray"> <strong>DigiCert
            Italian Affiliate<br>
            Certified Partner Platinum Elite</strong> </div>
        <p> <span
            style="font-size:8.0pt;font-family:Helvetica;color:gray">Via
            Flaminia, 497 - 00191 Roma</span><br>
          <strong><span
style="font-size:8.0pt;font-family:Helvetica;font-weight:normal;color:gray">tel.:
              +39 06332287</span></strong><br>
          <strong><span
style="font-size:8.0pt;font-family:Helvetica;font-weight:normal;color:gray">fax:
              +39 063336145</span></strong><br>
          <strong><span
style="font-size:8.0pt;font-family:Helvetica;font-weight:normal;color:gray">e-mail:
            </span></strong> <span style="font-size:8.0pt"><a
              href="mailto:ccorvino@trustitalia.it"><span
                style="font-family:Helvetica;color:#990033;">ccorvino@trustitalia.it</span></a></span><br>
          <strong><span
style="font-size:8.0pt;font-family:Helvetica;font-weight:normal;color:gray">website:
            </span></strong> <span style="font-size:8.0pt"><a
              href="https://www.trustitalia.it"><span
                style="font-family:Helvetica;color:#990033;">www.trustitalia.it</span></a></span>
        </p>
        <div class="attacca" <p=""> <img
src="https://www.trustitalia.it/immagini/DigiCertSymantecWebsiteSecurity_LockupLogo_H.png"
            alt="Symantec Authentication Service" moz-do-not-send="true"
            width="280" height="80" border="0"><br>
          <span
style="font-size:6pt;font-family:Helvetica;font-weight:normal;color:gray">Le
            modalità di trattamento dei dati a cui è stato dato il
            consenso e le relative finalità sono consultabili al <a
href="https://www.trustitalia.it/archivio/legal_agreements/informativa_privacy_email_marketing.pdf">
              <span style="font-family:Helvetica;color:#990033;">link</span></a>.<br>
            Qualora non desiderasse ricevere le nostre comunicazioni,
            potrà comunicarlo mediante il seguente <a
href="https://www.trustitalia.it/site/info_css/05110101/revoca-del-consenso"><span
                style="font-family:Helvetica;color:#990033;">link</span></a>.<br>
            Inoltre, in ogni momento, potrà modificare o cancellare i
            dati presenti nel nostro archivio contattandoci
            all'indirizzo <span style="font-size:6.0pt"><a
                href="mailto:privacy@trustitalia.it"><span
                  style="font-family:Helvetica;color:#990033;">privacy@trustitalia.it</span></a></span></span><br>
          <span
style="position:relative;z-index:251659264;left:-1px;top:0px;width:237px;height:2px"><img
              src="https://www.trustitalia.it/immagini/trasp.png" alt=""
              moz-do-not-send="true" width="237" height="2"></span><br>
          <span style="z-index:251660288;width:24px;height:10px"><img
              src="https://www.trustitalia.it/immagini/noprintme.png"
              alt="Se possibile non stamparmi!" moz-do-not-send="true"
              width="24" height="10"></span> <span style="left:
            3px;font-size:7.0pt;font-family:Helvetica;color:black">Se
            possibile, non stamparmi!</span> </div>
      </div>
    </div>
  </body>
</html>