.forward fatal regex error
Terry Roy
tech at futurecourse.com
Fri Mar 13 05:43:22 GMT 2026
Hello,
I run exim-daemon-heavy on Trixie. I have used a .forward file for quite
some time with no issues. I added a new filter and tested it with:
/usr/sbin/exim4 -bf /path/to/.forward <testemail
This is the filter:
if
$header_subject: contains "cron.daily" and
$message_body: matches "\\N\\/etc.+:\\nTo.+git\\n.+master(?!\\n.*)\\N"
then
logfile /var/log/vmail/filterlog
logwrite "$tod_log Subject: $header_subject filter etckeeper"
save /dev/null
seen finish
endif
This is the message body I am testing against:
/etc/cron.daily/etckeeper:
To bitbucket.org:myrepos/etckeeper.git
933a414..27bc913 master -> master
When I run exim4 -bf, I get the following output:
Filtering did not set up a significant delivery.
Normal delivery will occur.
I have tested the filter with only the $header_subject condition and it
matches so the issue is not there. I also tested it without the negative
lookahead and it still didn't set up a significant delivery.
I have tested the message_body regex using several online regex testers
set to pcre and the regex matches the body text. I've read the exim docs
on string expansion and regular expressions again as well as rereading
the filter specification. Duck Duck Go has not been my friend.
I am at a loss. Any help would be appreciated.
--
Terry
More information about the Pkg-exim4-users
mailing list