Dovecot 2.1.7 randomly lost emails

Paolo Rinaldo prinaldo at robinson.it
Thu May 12 16:32:31 UTC 2016


Hi
Dovecot 2.1.7 Postfix 2.9.6 Maildir backend, emails filtered by a Postfix frontend (Sqlgrey, Amavis).
Lmtp delivering emails using a simple sieve script.
Ubuntu 12.04 VMware virtual server.

When email are CCed to other recipients on the same domain (the same backend), sometimes they are lost.
We hosts approx. 1500 mailboxes, the problem occurs one or two times a day.

Recently I changed the frontend, the previous one was delivering one email for each recipient, we had a couple of error per year, we thought it was due to client-side error.
The frequency increased with the new frontend, no more “splitting” messages for more than one recipient.

The following sample is from a client using a POP3 connection, leaving emails on server.

the Postfix mail.log
May 11 01:26:55 lmail01 postfix/qmgr[7054]: 96E9CA6628: from=<sender at external.com>, size=11822371, nrcpt=2 (queue active)
May 11 01:26:55 lmail01 postfix/lmtp[3106]: 96E9CA6628: to=<user-one at domain.com>, relay=mail4.robinson.it[private/dovecot-lmtp], delay=0.64,  delays=0.45/0/0/0.19, dsn=2.0.0, status=sent (250 2.0.0 <user-one at domain.com> 0vNzHyptMlezHgAAk+lh+g Saved)
May 11 01:26:55 lmail01 postfix/lmtp[3106]: 96E9CA6628: to=user-two at domain.com>, relay=mail4.robinson.it[private/dovecot-lmtp], delay=0.74,  delays=0.45/0/0/0.29, dsn=2.0.0, status=sent (250 2.0.0 user-two at domain.com> 0vNzHyptMlezHgAAk+lh+g Saved)
May 11 01:26:55 lmail01 postfix/qmgr[7054]: 96E9CA6628: removed

the dovecot-info.log
May 11 01:26:55 lmtp(7859, user-one at domain.com): Info: 0vNzHyptMlezHgAAk+lh+g: sieve: msgid=<003A2D931FFF0E48A2314A1ADC87E23E8E4BA1DE at t49-ms-exmb02.INTRANET.SAKSROOT.SAKSINC.com>: stored mail into mailbox 'INBOX'
May 11 01:26:55 lmtp(7859, user-two at domain.com): Info: 0vNzHyptMlezHgAAk+lh+g: sieve: msgid=<003A2D931FFF0E48A2314A1ADC87E23E8E4BA1DE at t49-ms-exmb02.INTRANET.SAKSROOT.SAKSINC.com>: stored mail into mailbox 'INBOX'

I cannot find the email 0vNzHyptMlezHgAAk+lh+g  for user-two at domain.com<mailto:user-two at domain.com>, nor I cannot suppose problems on the client, nothing changed on the back-end.

Please let me know if you need some more info or config dump.

Any help will be appreciated

Paolo Rinaldo

Dovecot config:
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.11.0-15-generic x86_64 Ubuntu 12.04.4 LTS
auth_mechanisms = plain login
debug_log_path = /var/log/dovecot/dovecot-debug.log
disable_plaintext_auth = no
info_log_path = /var/log/dovecot/dovecot-info.log
log_path = /var/log/dovecot/dovecot.log
mail_plugins = " quota"
managesieve_notify_capability = mailto
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
namespace inbox {
  inbox = yes
  location =
  prefix = INBOX.
  separator = .
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  autocreate = INBOX.Trash
  autocreate2 = INBOX.Spam
  autocreate3 = INBOX.Sent
  autocreate4 = INBOX.Drafts
  autosubscribe = INBOX.Trash
  autosubscribe2 = INBOX.Spam
  autosubscribe3 = INBOX.Sent
  autosubscribe4 = INBOX.Drafts
  quota = maildir:User quota
  quota_exceeded_message = Impossibile consegnare il messaggio: spazio insufficiente sulla casella di destinazione
  quota_grace = 10%%
  quota_warning = storage=95%% quota-warning 95 %u
  quota_warning2 = storage=80%% quota-warning 80 %u
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_path = /var/lib/dovecot/sieve/spam.sieve
}
protocols = imap pop3 lmtp sieve
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service quota-warning {
  executable = script /usr/local/bin/quota-warning.sh
  unix_listener quota-warning {
    user = vmail
  }
  user = vmail
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  driver = prefetch
}
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol lmtp {
  hostname = mail.robinson.it
  mail_plugins = sieve quota
  postmaster_address = postmaster at robinson.it
}
protocol lda {
  log_path = /var/log/dovecot/dovecot-lda.log
  postmaster_address = postmaster at robinson.it
}
protocol imap {
  mail_plugins = " quota autocreate imap_quota"
}

The spam.sieve

require ["fileinto", "envelope", "subaddress", "mailbox"];
if envelope :detail "to" "spam"{
  fileinto :create "INBOX.Spam";
}




More information about the dovecot mailing list