主题: 关于redmail无法收发邮件的报错

Jan 16 14:11:11 pop3(libinbin@urplus.cn): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2018-01-16 14:11:11]
Jan 16 14:12:29 pop3(libinbin@urplus.cn): Error: Corrupted transaction log file /var/vmail/vmail1/urplus.cn/l/i/b/libinbin-2016.04.25.17.04.12//Maildir/dovecot.index.log seq 79: Transaction log corrupted unexpectedly at 17616: Invalid size 0 (type=24) (sync_offset=17748)
Jan 16 14:12:29 pop3(libinbin@urplus.cn): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2018-01-16 14:12:29]
Jan 16 14:14:06 pop3(libinbin@urplus.cn): Error: Corrupted transaction log file /var/vmail/vmail1/urplus.cn/l/i/b/libinbin-2016.04.25.17.04.12//Maildir/dovecot.index.log seq 79: Transaction log corrupted unexpectedly at 17616: Invalid size 0 (type=24) (sync_offset=17748)
Jan 16 14:14:06 pop3(libinbin@urplus.cn): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2018-01-16 14:14:06]
Jan 16 14:16:07 pop3(libinbin@urplus.cn): Error: Corrupted transaction log file /var/vmail/vmail1/urplus.cn/l/i/b/libinbin-2016.04.25.17.04.12//Maildir/dovecot.index.log seq 79: Transaction log corrupted unexpectedly at 17616: Invalid size 0 (type=24) (sync_offset=17748)
Jan 16 14:16:07 pop3(libinbin@urplus.cn): Error: Couldn't init INBOX: Internal error occurred. Refer to server log for more information. [2018-01-16 14:16:07]
您好,张工
1.很多用户经常出现这种错误,以上是dovecot.log 的报错日志信息,以下是dovecot-sieve.log的报错
Jan 16 14:03:03 lda(libinbin@urplus.cn): Error: Corrupted transaction log file /var/vmail/vmail1/urplus.cn/l/i/b/libinbin-2016.04.25.17.04.12//Maildir/dovecot.index.log seq 79: Transaction log corrupted unexpectedly at 17616: Invalid size 0 (type=24) (sync_offset=17748)
Jan 16 14:03:03 lda(libinbin@urplus.cn): Error: sieve: msgid=<20180115085338.1804940FA5E5@mail1.urplus.cn>: failed to store into mailbox 'INBOX': Internal error occurred. Refer to server log for more information. [2018-01-16 14:03:03]
Jan 16 14:03:03 lda(libinbin@urplus.cn): Error: sieve: execution of script /var/vmail/sieve/dovecot.sieve was aborted due to temporary failure
2.个别用户的邮箱账户会出现无法正常登录收取邮件的问题,日志有索引错误,需要删除个人邮箱目录下的 dovecot.* 文件即可恢复,但是问题无法根本解决,使用过程中还会出现,而且需要全部移走cur目录下的历史邮件,不然再次登录客户端Foxmail outlook会全部重新收取历史邮件,而且重新回复后个人的文件目录下先比原来缺少了两个文件( dovecot.index.thread和dovecot.mailbox.log ),以致于还会重现相同的报错。不知道如何能够实现根本修复
cur                  dovecot.index.log.2   dovecot-uidvalidity.59a3802b  tmp
dovecot-acl-list     dovecot.index.thread  mail_bak                      wyz.txt
dovecot.index        dovecot.mailbox.log   maildirfolder
dovecot.index.cache  dovecot-uidlist       new
dovecot.index.log    dovecot-uidvalidity   subscriptions

回复: 关于redmail无法收发邮件的报错

打开 debug 参数后是否有更多信息?
参考文档: https://docs.iredmail.org/debug.dovecot.html

回复: 关于redmail无法收发邮件的报错

mail_debug = yes
#auth_verbose = yes
#auth_debug = yes
#auth_debug_passwords = yes
# Possible values: no, plain, sha1.
#auth_verbose_passwords = no
配置文件里是这样设置的,只是开启了mail_debug,

回复: 关于redmail无法收发邮件的报错

是否有更多相关的 debug log?

回复: 关于redmail无法收发邮件的报错

Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/vmail1/urplus.cn/g/a/o/gaoshuang-2017.09.25.17.14.55//Maildir/:INDEX=/var/vmail/vmail1/urplus.cn/g/a/o/gaoshuang-2017.09.25.17.14.55//Maildir/
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: maildir++: root=/var/vmail/vmail1/urplus.cn/g/a/o/gaoshuang-2017.09.25.17.14.55//Maildir, index=, indexpvt=, control=, inbox=/var/vmail/vmail1/urplus.cn/g/a/o/gaoshuang-2017.09.25.17.14.55//Maildir, alt=
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl: initializing backend with data: vfile
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl: acl username = gaoshuang@urplus.cn
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl: owner = 1
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl vfile: Global ACL directory: (none)
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/Shared/%u
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: shared: root=/var/run/dovecot, index=, indexpvt=, control=, inbox=, alt=
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl: initializing backend with data: vfile
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl: acl username = gaoshuang@urplus.cn
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl: owner = 0
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl vfile: Global ACL directory: (none)
Jan 25 10:10:21 pop3(gaoshuang@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/g/a/o/gaoshuang-2017.09.25.17.14.55//Maildir/dovecot-acl not found
Jan 25 10:10:22 imap-login: Info: Login: user=<fengjie@urplus.cn>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=28641, secured, session=<qJFBSJBjrQB/AAAB>
Jan 25 10:10:22 imap: Debug: Loading modules from directory: /usr/lib64/dovecot
Jan 25 10:10:22 imap: Debug: Module loaded: /usr/lib64/dovecot/lib01_acl_plugin.so
Jan 25 10:10:22 imap: Debug: Module loaded: /usr/lib64/dovecot/lib02_imap_acl_plugin.so
Jan 25 10:10:22 imap: Debug: Module loaded: /usr/lib64/dovecot/lib10_quota_plugin.so
Jan 25 10:10:22 imap: Debug: Module loaded: /usr/lib64/dovecot/lib11_imap_quota_plugin.so
Jan 25 10:10:22 imap: Debug: Module loaded: /usr/lib64/dovecot/lib20_mailbox_alias_plugin.so
Jan 25 10:10:22 imap: Debug: Added userdb setting: plugin/master_user=fengjie@urplus.cn
Jan 25 10:10:22 imap: Debug: Added userdb setting: plugin/quota_rule=*:bytes=2147483648
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36/
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota rule: root=user mailbox=* bytes=2147483648 messages=0
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota warning: bytes=2147483648 (100%) messages=0 reverse=no command=quota-warning 100 fengjie@urplus.cn
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota warning: bytes=2040109465 (95%) messages=0 reverse=no command=quota-warning 95 fengjie@urplus.cn
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota warning: bytes=1932735283 (90%) messages=0 reverse=no command=quota-warning 90 fengjie@urplus.cn
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota warning: bytes=1825361100 (85%) messages=0 reverse=no command=quota-warning 85 fengjie@urplus.cn
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Quota grace: root=user bytes=214748364 (10%)
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: dict quota: user=fengjie@urplus.cn, uri=proxy::quotadict, noenforcing=0
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/:INDEX=/var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: maildir++: root=/var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir, index=, indexpvt=, control=, inbox=/var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir, alt=
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl: initializing backend with data: vfile
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl: acl username = fengjie@urplus.cn
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl: owner = 1
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: Global ACL directory: (none)
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/Shared/%u
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: shared: root=/var/run/dovecot, index=, indexpvt=, control=, inbox=, alt=
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl: initializing backend with data: vfile
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl: acl username = fengjie@urplus.cn
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl: owner = 0
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: Global ACL directory: (none)
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/.Sent/dovecot-acl not found
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/.Drafts/dovecot-acl not found
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/.Trash/dovecot-acl not found
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/.Junk/dovecot-acl not found
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/.Archive/dovecot-acl not found
Jan 25 10:10:22 imap(fengjie@urplus.cn): Debug: acl vfile: file /var/vmail/vmail1/urplus.cn/f/e/n/fengjie-2016.07.25.14.55.36//Maildir/dovecot-acl not found
Jan 25 10:10:22 imap(fengjie@urplus.cn): Info: Disconnected: Logged out in=484 out=3560

以上是dovecot.log里截取的debug信息

以下是dovecot- sieve.log里截取的debug信息
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: shared: root=/var/run/dovecot, index=, indexpvt=, control=, inbox=, alt=
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: acl: initializing backend with data: vfile
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: acl: acl username = postmaster@urplus.cn
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: acl: owner = 0
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: acl vfile: Global ACL directory: (none)
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Destination address: postmaster@urplus.cn (source: user@hostname)
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota rule: root=user mailbox=* bytes=1073741824 messages=0
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota warning: bytes=1073741824 (100%) messages=0 reverse=no command=quota-warning 100 raw mail user
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota warning: bytes=1020054732 (95%) messages=0 reverse=no command=quota-warning 95 raw mail user
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: Pigeonhole version 0.4.2 initializing
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota warning: bytes=966367641 (90%) messages=0 reverse=no command=quota-warning 90 raw mail user
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota warning: bytes=912680550 (85%) messages=0 reverse=no command=quota-warning 85 raw mail user
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Quota grace: root=user bytes=107374182 (10%)
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: dict quota: user=raw mail user, uri=proxy::quotadict, noenforcing=0
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: Destination address: postmaster@urplus.cn (source: user@hostname)
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: Pigeonhole version 0.4.2 initializing
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: script file /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//sieve/dovecot.sieve not found
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: user's script /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//sieve/dovecot.sieve doesn't exist (trying default script location instead)
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: no default script configured for user
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: user has no valid location for a personal script
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: script file /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//sieve/dovecot.sieve not found
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: user's script /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//sieve/dovecot.sieve doesn't exist (trying default script location instead)
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: no default script configured for user
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: user has no valid location for a personal script
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: executed before user's personal Sieve script(1): /var/vmail/sieve/dovecot.sieve
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: loading script /var/vmail/sieve/dovecot.sieve
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: script binary /var/vmail/sieve/dovecot.svbin successfully loaded
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: binary save: not saving binary /var/vmail/sieve/dovecot.svbin, because it is already stored
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: executing script from /var/vmail/sieve/dovecot.svbin
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: executed before user's personal Sieve script(1): /var/vmail/sieve/dovecot.sieve
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: loading script /var/vmail/sieve/dovecot.sieve
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: executed before user's personal Sieve script(1): /var/vmail/sieve/dovecot.sieve
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: loading script /var/vmail/sieve/dovecot.sieve
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: script binary /var/vmail/sieve/dovecot.svbin successfully loaded
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: binary save: not saving binary /var/vmail/sieve/dovecot.svbin, because it is already stored
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: executing script from /var/vmail/sieve/dovecot.svbin
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: script binary /var/vmail/sieve/dovecot.svbin successfully loaded
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: binary save: not saving binary /var/vmail/sieve/dovecot.svbin, because it is already stored
Jan 25 10:08:07 lda(postmaster@urplus.cn): Debug: sieve: executing script from /var/vmail/sieve/dovecot.svbin
Jan 25 10:08:08 lda(postmaster@urplus.cn): Info: sieve: msgid=<20180125020007.C5FFC40FA613@mail1.urplus.cn>: stored mail into mailbox 'INBOX'
Jan 25 10:08:08 lda(postmaster@urplus.cn): Info: sieve: msgid=<20180125015007.A39DF40FA604@mail1.urplus.cn>: stored mail into mailbox 'INBOX'
Jan 25 10:08:09 lda(postmaster@urplus.cn): Error: Corrupted transaction log file /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//Maildir/dovecot.index.log seq 75: Transaction log corrupted unexpectedly at 18224: Invalid size 0 (type=24) (sync_offset=210588584)
Jan 25 10:08:09 lda(postmaster@urplus.cn): Error: Index /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//Maildir/dovecot.index: Lost log for seq=75 offset=18200
Jan 25 10:08:09 lda(postmaster@urplus.cn): Warning: fscking index file /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//Maildir/dovecot.index
Jan 25 10:08:09 lda(postmaster@urplus.cn): Error: Index /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//Maildir/dovecot.index: Lost log for seq=75 offset=18200
Jan 25 10:08:09 lda(postmaster@urplus.cn): Warning: fscking index file /var/vmail/vmail1/urplus.cn/p/o/s/postmaster-2016.04.14.23.36.44//Maildir/dovecot.index
Jan 25 10:08:09 lda(postmaster@urplus.cn): Error: sieve: msgid=<20180125013007.4773940FA5E1@mail1.urplus.cn>: failed to store into mailbox 'INBOX': Internal error occurred. Refer to server log for more information. [2018-01-25 10:08:07]
Jan 25 10:08:09 lda(postmaster@urplus.cn): Error: sieve: execution of script /var/vmail/sieve/dovecot.sieve was aborted due to temporary failure
麻烦您给看下是哪里的问题?

回复: 关于redmail无法收发邮件的报错

你是不是有两台 Dovecot 服务器同时访问邮箱目录?

回复: 关于redmail无法收发邮件的报错

是有两台mail_server ,都有这种日志的报错

回复: 关于redmail无法收发邮件的报错

您能帮我看下报错的具体原因吗?

回复: 关于redmail无法收发邮件的报错

不能两台或多台 dovecot 同时访问同一个邮箱,否则就会将 index 索引文件给破坏掉。

回复: 关于redmail无法收发邮件的报错

但是万一我一台服务器出现问题另外一台可以顶上啊,否则如何实现备灾啊

回复: 关于redmail无法收发邮件的报错

你设计灾备方案/架构的时候避免多台同时访问同一个邮箱即可。