Hi,
It seems that the "-D" option of mailsync has a problem
(I am using version 4.3.1-3 of the debian mailsync
package)
I tried to synchronize two local directories say D1 and D2,
containing mailboxes, say a, b, c, and d in unix format.
If I empty the mailbox a (marking all messages deleted)
and synchronize with mailsync -D, then D1/a and D2/a
will be emptied (zero length files) by mailsync. During this
process, D1/a and D2/a are locked properly (if I create
some D1/a.lock and D2/a.lock, mailsync waits). So far so
good.synchronized,
But then mailsync removes the lock and proceeds with
b, c, and d. During this time, a message can be delivered
to D1/a. The bad news is that at the end, mailsync
removes D1/a and D2/a without noticing that a mail has
been delivered to D1/a. Unfortunately, since a is not
locked when b, c, d are the time window
for delivering this mail is quite large (tens of seconds with
my large mailbox).
BTW, if some mailbox m in D1 is locked with a file
m.lock at the time mailsync is started and the stores D1
and D2 are declared with "pat=D1/*", mailsync considers
"m.lock" is a mailbox and duplicates it on D2 (more
precisely, it first wait for m.lock to be removed before it
processes "m", then it considers "m.lock" is an empty
mailbox and it creates a zero-length D1/m.lock and
D2/m.lock; then no mail can be delivered to D1/m nor D2/m
and mailsync can not synchronize again D1 and D2 until
the lock expires).
Sincerly yours,
Judicaël Courant.
Judicael.Courant@lri.fr