
我正在嘗試在兩台伺服器之間設定 dovecot 電子郵件的備份。執行繁重任務的命令是:
doveadm -D backup -R -u [email protected] ssh MAINSERVER.IP doveadm dsync-server -u [email protected]
對於大多數用戶來說,它工作得很好,但對於一些用戶來說,我收到錯誤65 或錯誤75。中時,回傳代碼是65。
失敗帳號的 dovecot 輸出如下:
Debug: Loading modules from directory: /usr/lib/dovecot/modules/doveadm
Debug: Skipping module doveadm_acl_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so: undefined symbol: acl_user_module (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_expire_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: undefined symbol: expire_set_deinit (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_quota_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so: undefined symbol: quota_user_module (this is usually intentional, so just ignore this message)
Debug: Module loaded: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_sieve_plugin.so
Debug: Skipping module doveadm_fts_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so: undefined symbol: fts_user_get_language_list (this is usually intentional, so just ignore this message)
Debug: Skipping module doveadm_mail_crypt_plugin, because dlopen() failed: /usr/lib/dovecot/modules/doveadm/libdoveadm_mail_crypt_plugin.so: undefined symbol: mail_crypt_box_get_pvt_digests (this is usually intentional, so just ignore this message)
doveadm([email protected]): Debug: Effective uid=999, gid=999, home=/data/mail/[email protected]
doveadm([email protected]): Debug: maildir++: root=/data/mail/[email protected]/Maildir, index=, indexpvt=, control=, inbox=/data/mail/[email protected]/Maildir, alt=
doveadm([email protected]): Debug: Namespace : Using permissions from /data/mail/[email protected]/Maildir: mode=0700 gid=default
dsync-local([email protected]): Debug: brain M: Local mailbox tree: INBOX guid=58eedf276bc33864df08000079bc729c uid_validity=1681441643 uid_next=2 subs=no last_change=0 last_subs=0
dsync-local([email protected]): Debug: brain M: Remote mailbox tree: INBOX guid=58eedf276bc33864df08000079bc729c uid_validity=1396487587 uid_next=60912 subs=no last_change=0 last_subs=0
dsync-local([email protected]): Debug: brain M: Remote mailbox tree: Deleted Messages guid=c803c2075f1e625874120000b8a5d860 uid_validity=1396487588 uid_next=36883 subs=yes last_change=0 last_subs=1482825311
dsync-local([email protected]): Debug: brain M: Remote mailbox tree: Sent Messages guid=55567b0e54b57d58770d0000b8a5d860 uid_validity=1396487589 uid_next=345 subs=yes last_change=0 last_subs=1484633428
dsync-local([email protected]): Debug: brain M: Remote mailbox tree: Drafts guid=8e1b6a01ab197e602d700000b8a5d860 uid_validity=1396487591 uid_next=1 subs=yes last_change=0 last_subs=1618876837
dsync-local([email protected]): Debug: brain M: Remote mailbox tree: Notes guid=da8ed0191098355c672d0000b8a5d860 uid_validity=1396487590 uid_next=1 subs=yes last_change=0 last_subs=1547016208
dsync-local([email protected]): Debug: brain M: Mailbox Deleted Messages: local=00000000000000000000000000000000/0/0, remote=c803c2075f1e625874120000b8a5d860/0/1: mailbox not selectable yet
dsync-local([email protected]): Debug: brain M: Mailbox Drafts: local=00000000000000000000000000000000/0/0, remote=8e1b6a01ab197e602d700000b8a5d860/0/1: mailbox not selectable yet
dsync-local([email protected]): Debug: brain M: Mailbox INBOX: local=58eedf276bc33864df08000079bc729c/0/1, remote=58eedf276bc33864df08000079bc729c/0/1: Mailboxes are equal
dsync-local([email protected]): Debug: brain M: Mailbox Notes: local=00000000000000000000000000000000/0/0, remote=da8ed0191098355c672d0000b8a5d860/0/1: mailbox not selectable yet
dsync-local([email protected]): Debug: brain M: Mailbox Sent Messages: local=00000000000000000000000000000000/0/0, remote=55567b0e54b57d58770d0000b8a5d860/0/1: mailbox not selectable yet
dsync-local([email protected]): Debug: brain M: Deleting mailbox 'INBOX' (GUID 58eedf276bc33864df08000079bc729c): UIDVALIDITY changed (1396487587 -> 1681441643)
dsync-local([email protected]): Debug: doveadm-sieve: Iterating Sieve mailbox attributes
dsync-local([email protected]): Debug: sieve: Pigeonhole version 0.4.21 (92477967) initializing
dsync-local([email protected]): Debug: sieve: include: sieve_global is not set; it is currently not possible to include `:global' scripts.
dsync-local([email protected]): Debug: sieve: file storage: Using active Sieve script path: /data/mail/[email protected]/.dovecot.sieve
dsync-local([email protected]): Debug: sieve: file storage: Using script storage path: /data/mail/[email protected]/sieve
dsync-local([email protected]): Debug: sieve: file storage: Using permissions from /data/mail/[email protected]/sieve: mode=0700 gid=-1
dsync-local([email protected]): Debug: sieve: file storage: Relative path to sieve storage in active link: sieve/
dsync-local([email protected]): Debug: sieve: file storage: sync: Synchronization active
dsync-local([email protected]): Error: Mailbox INBOX sync: mailbox_delete failed: INBOX can't be deleted.
dsync-local([email protected]): Error: Remote command returned error 75: ssh 60.234.77.233 doveadm dsync-server -u [email protected] dsync-server
儘管“遠端命令返回錯誤75”,我知道如果我刪除本地伺服器上的郵箱並重新發出命令,它將重新同步- 但這意味著刪除本地伺服器上的客戶端郵箱,這是我不想做的,因為它們可能會變得相當大,並且站點之間的頻寬有點貴。
我還相信,如果我進行同步而不是備份(我不想這樣做,因為我是 doveadm 的新手,我不想讓原始版本處於危險之中),那麼就不會出現錯誤。
我相信這個問題可能與以下事實有關:關於 INBOX 的最初兩行 - 但我不明白它是如何發生的(我只完成了郵箱的同步 - 可能會中斷它們,但沒有其他),這也是有點擔心。
我正在使用MAILDIR格式,我懷疑部分問題與MAILDIR有關並且無法刪除收件箱,但我不明白為什麼它試圖刪除收件箱,我什至不知道這意味著什麼通過收件箱,因為我找不到名為“的資料夾”/收件匣」或“伺服器或備份上的「/.INBOX」或類似內容。但在客戶端上為空。
我最初在Ubuntu 18.04、Dovecot 1:2.2.33.2-1ubuntu4.8 上的伺服器上嘗試過此操作,然後我僅升級了我要從中拉出的備份盒,以使用Dovecot 2.3.7.2 運行Ubuntu 20.04 - 同樣的問題。
這是 Dovecot 中的已知錯誤嗎?有什麼方法可以解決刪除信箱的問題嗎?
更新
doveconf mail_location 設定為 mail_location = maildir:/data/mail/%u/Maildir (這看起來像是我所期望的)。我找不到任何帶有“命名空間”一詞的配置訊息
當我做
doveadm mailbox status -u [email protected] all INBOX
我在客戶端和伺服器上得到不同的結果。在郵件伺服器上我得到
INBOX messages=524 recent=0 uidnext=60920 uidvalidity=1396487587 unseen=2 highestmodseq=59948 vsize=77692641 guid=58eedf276bc33864df08000079bc729c firstsaved=1680336216
在備份中我得到
INBOX messages=0 recent=0 uidnext=2 uidvalidity=1681441643 unseen=0 highestmodseq=3 vsize=0 guid=58eedf276bc33864df08000079bc729c firstsaved=18446744073709551615
在每個有問題的郵件目錄中,「MAILDIR/cur -s 在備份版本上為空,而伺服器上的版本中有資料。
當我嘗試將“cur”郵箱從郵件伺服器複製到備份,然後運行“doveadm Mailbox status -u[電子郵件受保護]all INBOX」訊息數回到 524,但當我嘗試備份該盒子時,錯誤再次出現,備份伺服器上的 INBOX 中有 0 則訊息。
使用命令“doveadm force-resync -u[電子郵件受保護]郵件伺服器上的「INBOX」和備份(透過 scp 重新填充備份上的 Maildir/cur 後)沒有幫助。