Hi all & thanks Aki for adding me to the list.
First of all, I'm not a dovecot user yet. For several years now I use cyrus imapd and never saw the urge to switch, until I recently lost random mails from my mailbox which were neither temporally connected nor related in some other way.
Fortunately, I had a rolling replication which never expunges, so I was able to restore them. While circumventing some pitfalls during the restore, I learned that the backup and restore procedure cyrus imapd offers is deprecated and will be removed.
Now I ponder whether or not I should switch the mda.
Does dovecot offer the following?
- setting up a rolling replication which replicates every action made to the mailbox (flags, mark as deleted, relocations, etc.) to a different server (one way only)
- NOT expunging the emails that have been marked as deleted on the slave server or expunging only manually
- restoring selected emails from the slave directly to the master
The slave server doesn't need to be accessible via imap, I'd be happy to search for some header data (subject, recipient, sender, date, ...) and restore the email by command line using its uuid or message-id or something like that.
Browsing the documentation I found "doveadm-backup" which is using "dsync", but I'm not sure whether or not it fits my requirements.
I'd love to hear your opinions.
Kind regards,
Philippe
- NOT expunging the emails that have been marked as deleted on the slave server or expunging only manually
Yes I think it is depending on your storage format (mdbox only?). I am running "doveadm purge -u" every two months. If I would make a new server I would also use the LAYOUT=index this does not give you issues with mailbox names, however there were some other issues, but I think new versions of dovecot are ok.
First of all, I'm not a dovecot user yet. For several years now I use cyrus imapd and never saw the urge to switch, until I recently lost random mails from my mailbox which were neither temporally connected nor related in some other way.
What do you mean lost? And how do you know it is related cyrus?
Hi Marc,
thanks for your answers.
On 11.11.24 15:47, Marc wrote:
Yes I think it is depending on your storage format (mdbox only?). I am running "doveadm purge -u" every two months. If I would make a new server I would also use the LAYOUT=index this does not give you issues with mailbox names, however there were some other issues, but I think new versions of dovecot are ok.
So the idea is to set up a classic dsync replication and to somehow make the slave only expunge the mails manually using "doveadm purge -u"? In this case I believe I could connect to the slave via imap and restore the missing mails (which might be marked for deletion but still accessible) using my mua?
On 11.11.24 15:48, Marc wrote:
What do you mean lost? And how do you know it is related cyrus?
I don't know whether or not it's related to cyrus, as the logs show nothing. It might also be a bug in one of my muas or a human error. The point is that cyrus imapd removes the backup feature with 3.10.
- Philippe
Yes I think it is depending on your storage format (mdbox only?). I am running "doveadm purge -u" every two months. If I would make a new server I would also use the LAYOUT=index this does not give you issues with mailbox names, however there were some other issues, but I think new versions of dovecot are ok.
So the idea is to set up a classic dsync replication
You should know that the replication feature will be removed from dovecot community edition without replacement (search the mailinglist archive for details).
and to somehow make the slave only expunge the mails manually using "doveadm purge -u"?
Purge is usually used in combination with mdbox storage format. With IMAP mails can be deleted (marked as deleted, often not shown anymore in mail user agents) and expunged (removed from server). With mdbox the IMAP expunge command does not remove the mail from storage and it cannot be restored via IMAP. The doveadm-purge command reorganizes mdbox storage files to ultimately remove mails from disk afterwards (e.g. using cron).
https://doc.dovecot.org/2.3/admin_manual/mailbox_formats/dbox/#accessing-exp...
In this case I believe I could connect to the slave via imap and restore the missing mails (which might be marked for deletion but still accessible) using my mua?
No.
The only thing that comes close to what you want and will be available in the future is this:
https://doc.dovecot.org/main/core/man/doveadm-backup.1.html See the three modes of operation (backup / sync / sync -1). You would have to write your own scripts to cobble up a solution.
IIRC dovecot once had an abox storage format for archival purpose, which was not part of the community edition though.
An email archive like mailpiler.org might be a better solution to your problem (no recommendation).
Best regards, Gerald
Hi Gerald,
Am 12.11.24 um 03:34 schrieb Gerald Galster via dovecot:
The only thing that comes close to what you want and will be available in the future is this:
This looks kind of promising.
Thanks!
- Philippe
participants (3)
-
Gerald Galster
-
Marc
-
Philippe