lmtp with sieve editheader Panic: file edit-mail.c: line 1809 (merge_from_parent): assertion failed

Matthias Lay matthias.lay at securepoint.de
Tue Dec 6 15:14:10 UTC 2022


Hi,

I have experienced a crash in lmtp delivery on some mails when sieve
editheader plugin is used. The first one was an "analytics mail" from
azure exchange. I stripped down the mail to the relevant parts that
trigger this error.

log message:

lmtp(johnd)<27019><VM4XLJVVj2OLaQAA/TOvIg>: Error: Raw backtrace:
/usr/lib/dovecot/libdovecot.so.0(backtrace_append+0x42)
[0x7f3048ca0b72] ->
/usr/lib/dovecot/libdovecot.so.0(backtrace_get+0x1e) [0x7f3048ca0c8e]
-> /usr/lib/dovecot/libdovecot.so.0(+0xff5eb) [0x7f3048cad5eb] ->
/usr/lib/dovecot/libdovecot.so.0(+0xff681) [0x7f3048cad681] ->
/usr/lib/dovecot/libdovecot.so.0(+0x542c4) [0x7f3048c022c4] ->
/usr/lib/dovecot/libdovecot-sieve.so.0(+0x2e11d) [0x7f304841811d] ->
/usr/lib/dovecot/libdovecot.so.0(i_stream_read_memarea+0x74)
[0x7f3048cb92d4] -> /usr/lib/dovecot/libdovecot.so.0(+0x10eb05)
[0x7f3048cbcb05] -> /usr/lib/dovecot/libdovecot.so.0(+0x10f0a9)
[0x7f3048cbd0a9] ->
/usr/lib/dovecot/libdovecot.so.0(i_stream_read_memarea+0x74)
[0x7f3048cb92d4] ->
/usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x3a) [0x7f3048cb94ba]
-> /usr/lib/dovecot/libdovecot.so.0(+0x112f51) [0x7f3048cc0f51] ->
/usr/lib/dovecot/libdovecot.so.0(i_stream_read_memarea+0x74)
[0x7f3048cb92d4] ->
/usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x3a) [0x7f3048cb94ba]
-> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x3d)
[0x7f3048cb9ddd] ->
/usr/lib/dovecot/libdovecot.so.0(io_stream_copy+0x74) [0x7f3048cd28f4]
-> /usr/lib/dovecot/libdovecot.so.0(o_stream_send_istream+0x4f)
[0x7f3048cd25ef] ->
/usr/lib/dovecot/libdovecot-storage.so.0(index_storage_save_continue+0x29)
[0x7f3048e5dd39] ->
/usr/lib/dovecot/libdovecot-storage.so.0(maildir_save_continue+0x20)
[0x7f3048e07930] ->
/usr/lib/dovecot/libdovecot-storage.so.0(mailbox_save_continue+0x3a)
[0x7f3048ddff3a] ->
/usr/lib/dovecot/libdovecot-storage.so.0(mail_storage_copy+0xb1)
[0x7f3048dd0b71] -> /usr/lib/dovecot/libdovecot-lda.so.0(+0x475b)
[0x7f3048eed75b] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0x6439f)
[0x7f3048de039f] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x52ff4)
[0x7f304843cff4] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x473e9)
[0x7f30484313e9] -> /usr/lib/dovecot/libdovecot-sieve.so.0(+0x482a0)
[0x7f30484322a0] ->
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_result_execute+0x1af)
[0x7f3048432fbf] ->
/usr/lib/dovecot/libdovecot-sieve.so.0(sieve_multiscript_finish+0x218)
[0x7f3048446f38] -> /usr/lib/dovecot/lib90_sieve_plugin.so(+0x4030)
[0x7f3048ba9030] ->
/usr/lib/dovecot/libdovecot-lda.so.0(mail_deliver+0x16f)
[0x7f3048eee8ef]
lmtp(johnd)<27019><VM4XLJVVj2OLaQAA/TOvIg>: Fatal: master:
service(lmtp): child 27019 killed with signal 6 (core dumps disabled -
https://dovecot.org/bugreport.html#coredumps)


the sieve script only has one addheader line

require ["editheader","fileinto","body", "include"];
addheader :last "X-Long-Duration" "XXX";



I will attach doveconf and the lmtp communication. inserted to lmtp
with:

socat - UNIX-CONNECT:$lmtp_socket <<<"$(<$file)"

greetz Matze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: info.tar.gz
Type: application/gzip
Size: 2023 bytes
Desc: not available
URL: <https://dovecot.org/pipermail/dovecot/attachments/20221206/d568c882/attachment.gz>


More information about the dovecot mailing list