Good morning,
I use «doveadm backup -R -m foo -s $state» to create a local mirror of
an imapc remote folder. When I run that command, wait for it to finish,
deliver a new message to the remote folder, and run that command again,
the new message does not get downloaded from the remote.
I'll attach the rawlog, doveconf, etc at the end. Allow me first to
summarize what I've already checked:
- I used «openssl s_client» to issue EXAMINE on the remote mailbox
before and after delivering a mail to the remote mailbox, and
HIGHESTMODSEQ does increase.
- I looked at rawlog for both runs. doveadm issues a «STATUS foo
(UIDNEXT UIDVALIDITY)» and receives a correct response (UIDNEXT in the
second run is one larger than in the first run).
- Other than that STATUS command, doveadm only issues LOGIN, LOGOUT,
LIST, and LSUB commands. The remote server's responses do not report
the new HIGHESTMODSEQ value for the folder.
- The message does get mirrored locally when I run without the -s flag.
I'm running dovecot 2.3.9.2 from FreeBSD ports. I've reviewed the
FreeBSD port¹; it does have some patches, but none of them seem relevant
to this issue.
The remote server runs Cyrus.
Debug output, etc follow:
[[[
% doveconf -n
# 2.3.9.2 (cf2918cac): /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 12.1-RELEASE amd64
# Hostname: imapmirror.v.shahaf.local2
disable_plaintext_auth = no
first_valid_uid = 1000
imapc_features = " rfc822.size fetch-headers modseq"
imapc_host = imap.fastmail.com
imapc_password = # hidden, use -P to show it
imapc_port = 993
imapc_ssl = imaps
imapc_user = ...
last_valid_uid = 65500
mail_location = maildir:~/Maildir:UTF-8
mail_prefetch_count = 99
namespace {
inbox = yes
location =
prefix =
separator = /
}
passdb {
driver = pam
}
protocols = imap lmtp
service imap {
drop_priv_before_exec = yes
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
ssl_cert = <>: Debug: auth-master: userdb lookup(fmsync): Started
userdb lookup
doveadm(fmsync)<966><>: Debug: auth-master: conn
unix:/var/run/dovecot/auth-userdb: Connecting
doveadm(fmsync)<966><>: Debug: auth-master: conn
unix:/var/run/dovecot/auth-userdb (uid=0): Client connected (fd=10)
doveadm(fmsync)<966><>: Debug: auth-master: userdb lookup(fmsync): auth USER
input: fmsync system_groups_user=fmsync uid=1002 gid=1002 home=/home/fmsync
doveadm(fmsync)<966><>: Debug: auth-master: userdb lookup(fmsync): Finished
userdb lookup (username=fmsync system_groups_user=fmsync uid=1002 gid=1002
home=/home/fmsync)
doveadm(fmsync): Debug: Effective uid=1002, gid=1002, home=/home/fmsync
doveadm(fmsync): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes,
hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir:UTF-8
doveadm(fmsync): Debug: maildir++: root=/home/fmsync/Maildir, index=,
indexpvt=, control=, inbox=/home/fmsync/Maildir, alt=
doveadm(fmsync): Debug: brain M: Imported mailbox states:
doveadm(fmsync): Debug: brain M: Mailbox $guid1 state: uidvalidity=1529153257
uid=24288 modseq=4910711 pvt_modseq=0 messages=24117 changes_during_sync=0
doveadm(fmsync): Debug: brain M: Namespace has location maildir:~/Maildir:UTF-8
doveadm(fmsync): Debug: Namespace : Using permissions from
/home/fmsync/Maildir: mode=0700 gid=default
dsync(fmsync): Debug: Effective uid=1002, gid=1002, home=/home/fmsync
dsync(fmsync): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes,
hidden=no, list=yes, subscriptions=yes location=imapc:/home/fmsync/imapcdir
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Created new connection
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Looking up IP address
(reconnect_ok=true, last_connect=1580957435)
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Connecting to
66.111.4.135:993
dsync(fmsync): Info: imapc(imap.fastmail.com:993): Connected to
66.111.4.135:993 (local 192.168.122.253:59074)
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Starting SSL handshake
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): SSL handshake successful
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Server capabilities: IMAP4
IMAP4rev1 LITERAL+ ENABLE UIDPLUS SASL-IR NAMESPACE CONDSTORE SORT
LIST-EXTENDED QRESYNC MOVE SPECIAL-USE CREATE-SPECIAL-USE IDLE AUTH=PLAIN
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Authenticating as ...
dsync(fmsync): Debug: imapc(imap.fastmail.com:993): Server capabilities:
IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA MAILBOX-REFERRALS NAMESPACE
UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE
CONDSTORE ESEARCH SEARCH=FUZZY SORT SORT=MODSEQ SORT=DISPLAY SORT=UID
THREAD=ORDEREDSUBJECT THREAD=REFERENCES THREAD=REFS ANNOTATE-EXPERIMENT-1
METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS LIST-METADATA WITHIN QRESYNC
SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE DIGEST=SHA1 X-REPLICATION
STATUS=SIZE OBJECTID SAVEDATE