我有一台运行 dovecot 和 dovecot-antispam 插件的服务器。这些都来自标准 Ubuntu 14.04 存储库。
我知道邮件不应该被移动到“不确定”类型的邮箱中。服务器应该拒绝此操作。但实际发生的是 imap 进程抛出错误并终止:
Aug 12 17:53:07 255c7fc2d2f0 imap: antispam: mailbox_is_unsure(Review-Classification): 1
Aug 12 17:53:07 255c7fc2d2f0 dovecot: imap([email protected]): Panic: file mail-storage.c: line 2141 (mailbox_copy): assertion failed: (!ctx->unfinished)
Aug 12 17:53:07 255c7fc2d2f0 dovecot: imap([email protected]): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x5e271) [0x7f718e7dd271] -> /usr/lib/dovecot/libdovecot.so.0(+0x5e34e) [0x7f718e7dd34e] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f718e798a9e] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x7196f) [0x7f718eab896f] -> /usr/lib/dovecot/libdovecot-storage.so.0(mailbox_move+0x15) [0x7f718eab8985] -> dovecot/imap(+0xded5) [0x7f718ef84ed5] -> dovecot/imap(command_exec+0x3c) [0x7f718ef8f6dc] -> dovecot/imap(+0x176cf) [0x7f718ef8e6cf] -> dovecot/imap(+0x17785) [0x7f718ef8e785] -> dovecot/imap(client_handle_input+0x125) [0x7f718ef8eaa5] -> dovecot/imap(client_input+0x75) [0x7f718ef8ee35] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x27) [0x7f718e7ed247] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7) [0x7f718e7edfd7] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7f718e7ecde8] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7f718e79dc93] -> dovecot/imap(main+0x2c4) [0x7f718ef832f4] -> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f718e3dbec5] -> dovecot/imap(+0xc460) [0x7f718ef83460]
Aug 12 17:53:07 255c7fc2d2f0 dovecot: imap([email protected]): Fatal: master: service(imap): child 58 killed with signal 6 (core dumped)
因此,主要问题是我想弄清楚如何让我的服务器更优雅地处理这个问题,并正确拒绝移动,而不会让进程终止。我不确定如何解决这个问题。我可以根据需要提供配置,但大概这不仅仅是一个配置问题。我已经安装了 dovecot-dbg 包,但这似乎并没有改善记录的堆栈跟踪。
次要问题是 Thunderbird 对此的处理也相当糟糕。消息从显示屏和它被移出的邮件文件夹中消失,并且没有出现在目标文件夹中。Thunderbird 不断尝试在服务器上移动消息,但失败了。我知道打破这种模式的唯一方法是暂时从 dovecot 中的 antispam_unsure 指令中删除目标文件夹,这对于解决问题来说很麻烦。欢迎提出任何建议,但这是次要问题。
编辑:
在 IRC 的帮助下http://www.dovecot.org/bugreport.html我弄清楚了如何获取堆栈跟踪(ulimit -c unlimited
在启动 dovecot 之前设置 docker,并从容器外部设置 /proc/sys/kernel/core_pattern ...如果这是容器特定的就好了)。所以,我现在有一个核心文件和一个堆栈跟踪:
#0 0x00007f5dd5394cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 61
selftid = 61
#1 0x00007f5dd53980d8 in __GI_abort () at abort.c:89
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x800, sa_sigaction = 0x800}, sa_mask = {__val = {140041026109520, 178, 140041026077952, 512,
140040990095251, 140041026077952, 140041026077952, 512, 140040990087565, 140734823456136, 140040990231826, 140041026077952, 140734823456040, 0,
140040990231929, 140041026077952}}, sa_flags = -713567062, sa_restorer = 0x7fff6128dd01}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007f5dd5781298 in default_fatal_finish (type=<optimized out>, status=status@entry=0) at failures.c:192
backtrace = 0x7f5dd79d0538 "/usr/lib/dovecot/libdovecot.so.0(+0x5e271) [0x7f5dd5781271] -> /usr/lib/dovecot/libdovecot.so.0(+0x5e34e) [0x7f5dd578134e] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7f5dd573ca9e] -> /usr/lib/d"...
#3 0x00007f5dd578134e in i_internal_fatal_handler (ctx=0x7fff6128dd70, format=<optimized out>, args=<optimized out>) at failures.c:653
status = 0
#4 0x00007f5dd573ca9e in i_panic (format=format@entry=0x7f5dd5ab1e68 "file %s: line %d (%s): assertion failed: (%s)") at failures.c:264
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fff6128de60, reg_save_area = 0x7fff6128dda0}}
#5 0x00007f5dd5a5c96f in mailbox_copy (_ctx=<optimized out>, mail=mail@entry=0x7f5dd79ffbc0) at mail-storage.c:2141
ctx = 0x7f5dd7a043e0
t = 0x7f5dd79fdf00
keywords = 0x0
pvt_flags = 0
real_mail = <optimized out>
ret = -1
__FUNCTION__ = "mailbox_copy"
#6 0x00007f5dd5a5c985 in mailbox_move (_ctx=<optimized out>, mail=0x7f5dd79ffbc0) at mail-storage.c:2153
ctx = 0x7f5dd7a043e0
#7 0x00007f5dd5f28ed5 in fetch_and_copy (copy_count_r=<synthetic pointer>, src_uidset_r=<synthetic pointer>, search_args=<optimized out>,
src_trans_r=0x7fff6128df18, t=<optimized out>, move=true, client=0x7f5dd79ee440) at cmd-copy.c:67
search_ctx = 0x7f5dd79ff920
src_trans = 0x7f5dd79fec10
srcset_ctx = {str = 0x7f5dd79d0350, first_uid = 0, last_uid = 4294967295}
ret = 1
save_ctx = 0x0
mail = 0x7f5dd79ffbc0
copy_count = 1
src_uidset = 0x7f5dd79d0350
#8 cmd_copy_full (cmd=0x7f5dd79eee70, move=<optimized out>) at cmd-copy.c:123
client = 0x7f5dd79ee440
dest_storage = <optimized out>
destbox = 0x7f5dd79f8d10
t = 0x7f5dd79fdf00
src_trans = 0x7f5dd573d029 <t_pop_check+9>
search_args = 0x7f5dd79f73a0
messageset = 0x7f5dd79dbc10 "76"
mailbox = 0x7f5dd79dbc18 "Review-Classification"
src_uidset = <optimized out>
sync_flags = (unknown: 0)
imap_flags = (unknown: 0)
changes = {pool = 0x7f5dd79d0350, uid_validity = 0, saved_uids = {arr = {buffer = 0x1, element_size = 140040986301132}, v = 0x1, v_modifiable = 0x1},
ignored_modseq_changes = 3617438728, changed = 93, no_read_perm = 127}
msg = <optimized out>
ret = <optimized out>
__FUNCTION__ = "cmd_copy_full"
#9 0x00007f5dd5f336dc in command_exec (cmd=0x7f5dd79eee70) at imap-commands.c:158
hook = 0x7f5dd79d90d0
ret = <optimized out>
#10 0x00007f5dd5f326cf in client_command_input (cmd=0x7f5dd79eee70) at imap-client.c:780
client = 0x7f5dd79ee440
command = <optimized out>
__FUNCTION__ = "client_command_input"
#11 0x00007f5dd5f32785 in client_command_input (cmd=0x7f5dd79eee70) at imap-client.c:841
client = 0x7f5dd79ee440
command = <optimized out>
__FUNCTION__ = "client_command_input"
#12 0x00007f5dd5f32aa5 in client_handle_next_command (remove_io_r=<synthetic pointer>, client=0x7f5dd79ee440) at imap-client.c:879
No locals.
#13 client_handle_input (client=client@entry=0x7f5dd79ee440) at imap-client.c:891
_data_stack_cur_id = 3
remove_io = false
handled_commands = false
__FUNCTION__ = "client_handle_input"
#14 0x00007f5dd5f32e35 in client_input (client=0x7f5dd79ee440) at imap-client.c:933
cmd = 0x7f5dd79e5ae0
output = 0x7f5dd79eeca0
bytes = 39
__FUNCTION__ = "client_input"
#15 0x00007f5dd5791247 in io_loop_call_io (io=0x7f5dd79eed90) at ioloop.c:388
ioloop = 0x7f5dd79d8720
t_id = 2
#16 0x00007f5dd5791fd7 in io_loop_handler_run (ioloop=ioloop@entry=0x7f5dd79d8720) at ioloop-epoll.c:220
ctx = 0x7f5dd79d93b0
list = 0x7f5dd79dade0
io = <optimized out>
tv = {tv_sec = 1799, tv_usec = 999178}
events_count = <optimized out>
msecs = <optimized out>
ret = 1
i = 0
call = <optimized out>
__FUNCTION__ = "io_loop_handler_run"
#17 0x00007f5dd5790de8 in io_loop_run (ioloop=0x7f5dd79d8720) at ioloop.c:412
__FUNCTION__ = "io_loop_run"
#18 0x00007f5dd5741c93 in master_service_run (service=0x7f5dd79d85b0, callback=<optimized out>) at master-service.c:566
No locals.
#19 0x00007f5dd5f272f4 in main (argc=1, argv=0x7f5dd79d8390) at main.c:400
set_roots = {0x7f5dd614aa00 <imap_setting_parser_info>, 0x0}
login_set = {auth_socket_path = 0x7f5dd79d0048 "\001", postlogin_socket_path = 0x0, postlogin_timeout_secs = 60,
callback = 0x7f5dd5f3c0f0 <login_client_connected>, failure_callback = 0x7f5dd5f3be20 <login_client_failed>, request_auth_token = 1}
service_flags = <optimized out>
storage_service_flags = <optimized out>
username = 0x0
c = <optimized out>
- Ubuntu 14.04.3
- dovecot-imapd 1:2.2.9-1ubuntu2
- dovecot-antispam 2.0+20130822-2build1