From d441d61a1e6d982d408823d807028c8233abbb59 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Sat, 15 Jun 2013 12:34:16 +1000 Subject: [PATCH] TST/ENH: Improve regex around exim rejected by local_scan now has test cases. Unrouteable address error messages now normalised after looking into exim code. --- config/filter.d/exim.conf | 7 ++++++- testcases/files/logs/exim | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config/filter.d/exim.conf b/config/filter.d/exim.conf index d335c9fc..da975d61 100644 --- a/config/filter.d/exim.conf +++ b/config/filter.d/exim.conf @@ -13,7 +13,12 @@ # (?:::f{4,6}:)?(?P[\w\-.^_]+) # Values: TEXT # -failregex = ^ H=\S+ \(\S+\) \[\] sender verify fail for <\S+>: (?:rejected by local_scan|Unrouteable address)\s*$ + +# From exim source code: ./src/receive.c:add_host_info_for_log +host_info = H=\S+ (\(\S+\) )?\[\] (?:I=\[\S+\]:\d+ )?(?:U=\S+ )?(P=e?smtp )? + +failregex = ^ %(host_info)ssender verify fail for <\S+>: Unrouteable address\s*$ + ^ \S+ F=(?:<>|\S+@\S+) %(host_info)s(?:temporarily )?rejected by local_scan\(\): .{0,256}$ ^ login authenticator failed for (\S+ )?\(\S+\) \[\]: 535 Incorrect authentication data( \(set_id=.*\)|: \d+ Time\(s\))?\s*$ # Option: ignoreregex diff --git a/testcases/files/logs/exim b/testcases/files/logs/exim index d86b6455..d7f0e58b 100644 --- a/testcases/files/logs/exim +++ b/testcases/files/logs/exim @@ -4,3 +4,9 @@ 2013-06-12 03:57:58 login authenticator failed for (ylmf-pc) [120.196.140.45]: 535 Incorrect authentication data: 1 Time(s) 2013-06-12 13:18:11 login authenticator failed for (USER-KVI9FGS9KP) [101.66.165.86]: 535 Incorrect authentication data 2013-06-10 10:10:59 H=ufficioestampa.it (srv.ufficioestampa.it) [193.169.56.211] sender verify fail for : Unrouteable address +# http://forum.lissyara.su/viewtopic.php?f=20&t=2985 +2010-11-24 21:48:41 1PLKOW-00046U-EW F=wvhluo@droolindog.com H=93-143-146-237.adsl.net.t-com.hr (droolindog.com) [93.143.146.237] I=[10.10.10.32]:25 P=esmtp temporarily rejected by local_scan(): Temporary local problem +# http://us.generation-nt.com/answer/exim-spamassassin-2010-0-x64-help-204020461.html +2011-07-07 15:44:16 1QexIu-0006dj-PX F=XXXXXX@XXXXXXXXXXXX H=localhost (saf.bio.caltech.edu) [127.0.0.1] P=esmtp temporarily rejected by local_scan(): Local configuration error - local_scan() library failure/usr/lib/exim/sa-exim.so: cannot open shared object file: No such file or directory +# http://www.clues.ltd.uk/howto/debian-sa-fprot-HOWTO.html +2004-01-18 07:15:35 1Ai79e-0000Dq-8i F=uzwltcmwto24@melissacam.biz H=lsanca1-ar3-4-47-028-040.lsanca1.elnk.dsl.genuity.net [4.47.28.40] P=smtp rejected by local_scan(): Rejected: hits=7.5 required=5.0 trigger=5.0