Hi everyone, When I run sieve-filter to add a header, the application crashes with the following error message:
sieve-filter: Error: edit-mail: failed to open raw box: Invalid mailbox name: Has adjacent hierarchy separators Program received signal SIGSEGV, Segmentation fault. With the same arguments, just using a Sieve script that doesn't add the header, the application works. Calling arguments: sieve-filter -u [email protected] -v /var/lib/dovecot/sieve/before.d/04\ -\ phishing.sieve INBOX Sieve script: require ["editheader"]; if anyof( address :domain :matches "From" [ "andalousecars.com" ] ) { addheader :last "X-Phishing" "*"; } The script compiles fine. If I replace "04 - phishing.sieve" with another script, the application runs correctly. I see two issues: 1. There is no adjacent hierarchy separator in the mailbox name, otherwise, other scripts would fail, too. 2. Even if there were, it shouldn't lead to a segmentation fault. GDB backtrace: #0 edit_mail_header_add (edmail=0x0, field_name=0x55e8527bc6d8 "X-Phishing", value=0x55e852838190 "*", last=true) at util/edit-mail.c:933 #1 0x00007f1a12e27de0 in cmd_addheader_operation_execute (renv=<optimized out>, address=<optimized out>) at plugins/editheader/cmd-addheader.c:352 #2 0x00007f1a12df390e in sieve_interpreter_operation_execute (interp=0x55e85284c808) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/lib-sieve/sieve-interpreter.c:918 #3 sieve_interpreter_continue (interp=0x55e85284c808, interrupted=0x0) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/lib-sieve/sieve-interpreter.c:976 #4 0x00007f1a12e03793 in sieve_run (sbin=0x55e852833ed8, result=0x55e85284a7e0, eenv=0x7ffc2f2bdc50, ehandler=0x55e852830268) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/lib-sieve/sieve.c:417 #5 sieve_test (sbin=sbin@entry=0x55e852833ed8, msgdata=msgdata@entry=0x7ffc2f2bde10, senv=senv@entry=0x7ffc2f2bde50, ehandler=ehandler@entry=0x55e852830268, stream=0x55e852842560, flags=flags@entry=SIEVE_EXECUTE_FLAG_LOG_RESULT) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/lib-sieve/sieve.c:672 #6 0x000055e8135ff87c in filter_message (sfctx=0x7ffc2f2bddc0, mail=0x55e852845098) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/sieve-tools/sieve-filter.c:156 #7 filter_mailbox (sfdata=0x7ffc2f2bdde0, src_box=0x55e85283ab88) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/sieve-tools/sieve-filter.c:344 #8 main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/dovecot-2.4.5/dovecot-pigeonhole-2.4.5/src/sieve-tools/sieve-filter.c:599 Dovecot version: 2.4.5 All the best, Ákos _______________________________________________ dovecot mailing list -- [email protected] To unsubscribe send an email to [email protected]
