[Dovecot] Sieve segfault on sieve-before scripts
I use dovecot 1.2.4 release with sieve 0.1.12
If I setup sieve-before script and latest script contains "keep" at the very end and no personal scripts found then segfault take place.
here is part of exim log: 2009-09-01 18:43:06 1MiUZA-0005V9-IB ** ivanov_maxim@domain.my admin@domain.my R=localuser T=local_delivery: Child process of local_delivery transport (running command "/usr/libexec/dovecot/deliver -d $local_part") was terminated by signal 11 (Segmentation fault)
Once I remove "keep" from end of latest sieve-before script, everything goes fine.
Here is latest global sieve script:
# cat /etc/dovecot1.2/sieve-before.d/020-SENT-STORE.sieve require ["imap4flags"];
if header :contains "X-Set-Seen" ["Yes", "YES", "1"] { setflag "\\Seen"; } #keep;
Max Ivanov wrote:
I use dovecot 1.2.4 release with sieve 0.1.12
If I setup sieve-before script and latest script contains "keep" at the very end and no personal scripts found then segfault take place.
here is part of exim log: 2009-09-01 18:43:06 1MiUZA-0005V9-IB ** ivanov_maxim@domain.my admin@domain.my R=localuser T=local_delivery: Child process of local_delivery transport (running command "/usr/libexec/dovecot/deliver -d $local_part") was terminated by signal 11 (Segmentation fault)
Once I remove "keep" from end of latest sieve-before script, everything goes fine.
Here is latest global sieve script:
# cat /etc/dovecot1.2/sieve-before.d/020-SENT-STORE.sieve require ["imap4flags"];
if header :contains "X-Set-Seen" ["Yes", "YES", "1"] { setflag "\\Seen"; } #keep;
I can't reproduce this problem with just this script as the last sieve_before script in the sequence and no personal script for the user. All works well, also when I force the conditional to true, meaning that the flag is always set.
Could you produce a backtrace using gdb? E.g. execute gdb --args deliver -p <file containing example message> and then type 'r' and subsequently 'bt' when it has crashed. You need to have a deliver binary with debug symbols enabled.
Also, it would be useful to know what scripts are executed before that final script in the sequence and whether these contribute to the failure (i.e. does it still crash when these are disabled). Also, an example message causing the failure is useful, unless of course all messages fail.
Regards,
Stephan
Max Ivanov wrote:
I use dovecot 1.2.4 release with sieve 0.1.12
If I setup sieve-before script and latest script contains "keep" at the very end and no personal scripts found then segfault take place.
here is part of exim log: 2009-09-01 18:43:06 1MiUZA-0005V9-IB ** ivanov_maxim@domain.my admin@domain.my R=localuser T=local_delivery: Child process of local_delivery transport (running command "/usr/libexec/dovecot/deliver -d $local_part") was terminated by signal 11 (Segmentation fault)
Once I remove "keep" from end of latest sieve-before script, everything goes fine.
Using the backtrace and scripts you provided I could reproduce and fix this bug:
http://hg.rename-it.nl/dovecot-1.2-sieve/rev/c26e7c2300b4
Apparently, I haven't tested the execution imap4flags very well in multiscript context when I last restructured the implementation; I found more related bugs when I fixed the one above:
http://hg.rename-it.nl/dovecot-1.2-sieve/rev/b62291ff5faf http://hg.rename-it.nl/dovecot-1.2-sieve/rev/f3642d9934cf
The test suite is obviously in dire need of some multiscript support. I'll fix that before the next release to make sure this will not happen again.
Regards,
Stephan.
participants (2)
-
Max Ivanov
-
Stephan Bosch