On Fri, Jul 12, 2024 at 06:28:13PM GMT, John Fawcett via dovecot wrote:
Hi James
I want to avoid the -1 parameter because it doesn't do deletes in the target.
-l, not -1.
As for the lda to doveadm sync script, I have been wondering too about how to close the gap for emails arriving between syncs, even though the risk might not be so significant.
With delivering to two dovecot servers before accepting the email, either one going down will stop email delivery.
I was thinking my script will accept the email anyway if the sync fails. It would do this:
Pass to dovecot-lda. If dovecot-lda fails, something is seriously wrong, so stop and fail.
Fork a background process that attempts to doveadm sync.
Wait for the background process to finish, or a maximum of 2 seconds. Then return success regardless of whether sync worked.
This guards against a hard disk crash or filesystem failure on one machine, but falls back to single-homing the email if a server is down.
This is inspired by the documentation at https://doc.dovecot.org/configuration_manual/replication/
-- James