Dovecot doveadm 백업이 오류 65로 인해 가끔 실패함 - 처리 방법

Dovecot doveadm 백업이 오류 65로 인해 가끔 실패함 - 처리 방법

두 서버 간에 비둘기장 이메일 백업을 설정하려고 합니다. 무거운 작업을 수행하는 명령은 다음과 같습니다.

 doveadm -D backup -R -u [email protected] ssh MAINSERVER.IP doveadm dsync-server -u [email protected]

대부분의 사용자에게는 잘 작동하지만 일부 사용자에게는 오류 65 또는 오류 75가 발생합니다. (스크립트에는 원격 명령이 오류 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에 대한 2개의 초기 라인과 관련이 있다고 생각합니다. 그러나 그것이 어떻게 발생했는지 이해하지 못합니다(나는 사서함의 동기화만 수행했습니다. 중단할 수도 있지만 다른 것은 없습니다). 조금 걱정됩니다.

MAILDIR 형식을 사용하고 있는데 문제의 일부가 MAILDIR과 관련되어 받은 편지함을 삭제할 수 없는 것으로 의심됩니다. 그러나 받은 편지함을 삭제하려고 하는 이유를 이해하지 못하며 그 의미도 모릅니다. '라는 폴더를 찾을 수 없기 때문에 받은 편지함에서/INBOX" 또는 "/.INBOX" 또는 서버나 백업에 이와 유사합니다. "Maildir/cur" 및 "Maildir/new"가 모두 존재합니다(클라이언트에서는 비어 있음). Maildir/new는 서버에 이메일이 있지만 클라이언트에서는 비어 있습니다. .

처음에는 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 - 백업 버전에서는 비어 있지만 서버 버전에는 데이터가 있습니다.

메일 서버의 "cur" 사서함을 백업으로 복사한 다음 "doveadm Mailbox status -u"를 실행하려고 하면[이메일 보호됨]all INBOX" 메시지 수가 524개로 반환되었는데, 상자를 백업하려고 하자마자 오류가 다시 나타나서 백업 서버의 INBOX에 0개의 메시지가 있었습니다.

"doveadm force-resync -u" 명령을 사용해 보세요.[이메일 보호됨]메일 서버의 INBOX" 및 백업(scp를 통해 백업에서 Maildir/cur을 다시 채운 후)이 도움이 되지 않았습니다.

관련 정보