Replication: Mails deleted over POP3 aren't deleted at the same time from the second server

Lukas lukas.meuerer at gmail.com
Wed Aug 12 21:58:15 EEST 2020


Hi,

I have two Dovecot 2.3.8 (on RHEL 8.2) servers. Replication works great
except in one situation.

What works:
* If one server receives an email, it is immediately available on the other
server.
* If an email is deleted via IMAP from one server, it is immediately
deleted from the other server.

What doesn't work:
If a user retrieves (download + delete) an email via POP3 (Thunderbird),
then the mail is only deleted from the server from which it was downloaded
but not from the other server. The email is only deleted from the other
server in the following situations:
* If a new email arrives (triggers a sync action)
* When the next full sync happens (I temporarily set
replication_full_sync_interval to "1 hour")
* When forcing a manual full sync (doveadm replicator replicate user_name)

If I activate debug logging (mail_debug = yes), I can immediately see a
replication action when an email is deleted via IMAP. However, when an
email is deleted via POP3, nothing is logged (because no replication
happens).

Does anyone have an idea why deleting an email via POP3 isn't replicated
and how to configure this?

Thanks for your help.
Lukas


My config (it is identical on on both servers, except of the "mail_replica"
and "address" parameters):
auth_mechanisms = plain login
auth_username_format = %n
doveadm_password = # hidden, use -P to show it
doveadm_port = 12345
login_log_format_elements = user=<%u> method=%m rip=%r lip=%l mpid=%e %c %k
mail_gid = vmail
mail_home = /var/spool/dovecot/%u
mail_location = sdbox:/var/spool/dovecot/%u
mail_plugins = " notify replication"
mail_uid = vmail
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 index ihave
duplicate mime foreverypart extracttext
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Sent {
    auto = subscribe
    special_use = \Sent
  }
  mailbox Spam {
    auto = subscribe
  }
  mailbox Trash {
    auto = subscribe
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/deny.%s
  deny = yes
  driver = passwd-file
}
passdb {
  args = scheme=SSHA512 username_format=%n /etc/dovecot/passwd
  driver = passwd-file
}
plugin {
  mail_replica = tcps:server2.example.com:12345
  sieve = ~/sieve/.dovecot.sieve
}
protocols = imap pop3 lmtp sieve
replication_full_sync_interval = 1 hours
service aggregator {
  fifo_listener replication-notify-fifo {
    user = vmail
  }
  unix_listener replication-notify {
    user = vmail
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = $default_internal_user
}
service doveadm {
  inet_listener {
    address = ...
    port = 12345
    ssl = yes
  }
  user = vmail
}
service imap-login {
  inet_listener imap {
    port = 0
  }
  inet_listener imaps {
    address = ...
    port = 993
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service managesieve-login {
  inet_listener sieve {
    address = ...
    port = 4190
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 0
  }
  inet_listener pop3s {
    address = ...
    port = 995
  }
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
    mode = 0600
    user = vmail
  }
}
ssl = required
ssl_cert = </etc/letsencrypt/live/server1.example.com/fullchain.pem
ssl_client_ca_file = /etc/pki/tls/cert.pem
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
ssl_options = no_compression
syslog_facility = local5
userdb {
  args = username_format=%n /etc/dovecot/passwd
  driver = passwd-file
  result_failure = return-fail
  result_internalfail = return-fail
}
protocol sieve {
  ssl = required
}
protocol lmtp {
  mail_plugins = " notify replication sieve"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20200812/b11003a6/attachment-0001.html>


More information about the dovecot mailing list