[Dovecot] sieve 0.1.2 problem with address and :regex
I'm getting a core dump with the following script:
require [ "fileinto", "regex", "variables" ];
if address :domain :regex ["Reply-To", "Sender", "To", "Cc"]
"antlr.org|mailman.unixodbc.org|research.att.com|wireshark.org" {
if address :regex ["Reply-To", "Sender", "To", "Cc"]
["([^-@]*)-([^-@]*)(-bounces)?@[^:space:,]*"] {
fileinto "1: ${1} 2: ${2} 3: ${3} 4: ${4} 5: ${5} 6: ${6} 7: ${7} 8: ${8}";
}
}
and using the mail below to test with. Looks likes it another regex problem. The
sieve-test I'm using had the previous regex patch applied.
Stack trace is:
#0 0x003e4893 in regexec@@GLIBC_2.3.4 () from /lib/i686/nosegneg/libc.so.6
#1 0x08071289 in mcht_regex_match (mctx=0x896b3d0, val=0x896b728 "antlr.org", val_size=9,
key=0x8974ffd "antlr.org|mailman.unixodbc.org|research.att.com|wireshark.org",
key_size=61, key_index=0)
at mcht-regex.c:256
#2 0x080847c9 in sieve_match_value (mctx=0x896b3d0, value=0x896b728 "antlr.org",
val_size=9) at sieve-match.c:83
#3 0x080841c5 in sieve_address_match (addrp=0x8187a20, mctx=0x896b3d0,
data=0x897f080 "antlr-interest-bounces@antlr.org") at sieve-address-parts.c:258
#4 0x0806a5fd in tst_address_operation_execute (op=0x8186688, renv=0x89861b4,
address=0x89861a4)
at tst-address.c:259
#5 0x080804b6 in sieve_interpreter_execute_operation (interp=0x8986190) at
sieve-interpreter.c:437
#6 0x08080573 in sieve_interpreter_continue (interp=0x8986190, interrupted=0x0) at
sieve-interpreter.c:464
#7 0x080806df in sieve_interpreter_start (interp=0x8986190, msgdata=0xbfccc6b0,
senv=0xbfccc688, msgctx=0x0,
result=0x8984180, estatus=0xbfccc6c4, interrupted=0x0) at sieve-interpreter.c:506
#8 0x08080789 in sieve_interpreter_run (interp=0x8986190, msgdata=0xbfccc6b0,
senv=0xbfccc688, result=0xbfccc60c,
estatus=0xbfccc6c4) at sieve-interpreter.c:528
#9 0x0806eb09 in sieve_test (sbin=0x89752e0, msgdata=0xbfccc6b0, senv=0xbfccc688,
estatus=0xbfccc6c4,
stream=0x897cab4, ehandler=0x897adb0, trace_stream=0x0) at sieve.c:256
#10 0x08064349 in main (argc=3, argv=0xbfccc7b4) at sieve-test.c:174
I tried to walk through the core, but I'm not adept enough to figure it out.
Thanks,
Andy
Sample mail:
Received: from gsce0ae1cfad8d ([68.61.157.18])
by OMTA11.emeryville.ca.mail.comcast.net with comcast
id 7syP1b00K0Q5oY48XsyQAh; Sun, 25 Jan 2009 16:58:25 +0000
From: "FFFF S. ffff"
Andy Howell wrote:
I'm getting a core dump with the following script:
require [ "fileinto", "regex", "variables" ];
if address :domain :regex ["Reply-To", "Sender", "To", "Cc"] "antlr.org|mailman.unixodbc.org|research.att.com|wireshark.org" { if address :regex ["Reply-To", "Sender", "To", "Cc"] ["([^-@]*)-([^-@]*)(-bounces)?@[^:space:,]*"] { fileinto "1: ${1} 2: ${2} 3: ${3} 4: ${4} 5: ${5} 6: ${6} 7: ${7} 8: ${8}"; } }
and using the mail below to test with. Looks likes it another regex problem. The sieve-test I'm using had the previous regex patch applied.
Looks like I implicitly fixed this with another regex segfault problem I found (I can reproduce your segfault without this particular fix). I didn't give it a second thought, but I should have notified you. This should fix it:
http://hg.rename-it.nl/dovecot-libsieve/rev/6ed559a5f677
Regards,
Stephan.
Stephan Bosch wrote:
Andy Howell wrote:
I'm getting a core dump with the following script:
require [ "fileinto", "regex", "variables" ];
if address :domain :regex ["Reply-To", "Sender", "To", "Cc"] "antlr.org|mailman.unixodbc.org|research.att.com|wireshark.org" { if address :regex ["Reply-To", "Sender", "To", "Cc"] ["([^-@]*)-([^-@]*)(-bounces)?@[^:space:,]*"] { fileinto "1: ${1} 2: ${2} 3: ${3} 4: ${4} 5: ${5} 6: ${6} 7: ${7} 8: ${8}"; } }
and using the mail below to test with. Looks likes it another regex problem. The sieve-test I'm using had the previous regex patch applied.
Looks like I implicitly fixed this with another regex segfault problem I found (I can reproduce your segfault without this particular fix). I didn't give it a second thought, but I should have notified you. This should fix it:
http://hg.rename-it.nl/dovecot-libsieve/rev/6ed559a5f677
Regards,
Stephan.
Stephan,
Thanks for the fix. Applied and confirmed it works.
Regards,
Andy
participants (2)
-
Andy Howell
-
Stephan Bosch