Thomas Koch
2007-Dec-30 12:23 UTC
[Pkg-exim4-users] spam filter irritated by duplicate headers
I just encountered an error(?) with debian''s default spam acl:
warn
spam = Debian-exim:true
message = X-Spam_score: $spam_score\n\
X-Spam_score_int: $spam_score_int\n\
X-Spam_bar: $spam_bar\n\
X-Spam_report: $spam_report
This acl seems to check also my outgoing mail. So this message, which
I''m
sending now to the mailing list will be scanned on sending and once again on
receiving back from the list.
This means, that there will be two sets of X-Spam_... headers which leads to
the following error:
The userforwardspam router encountered the following error(s):
? malformed numerical string "1
2"
No valid addresses were generated.
The filter is
if "${if def:header_X-Spam_score_int:{true}}" is true then
if $header_X-Spam_score_int is above 70 then
pipe "/usr/lib/dovecot/deliver -m spam"
endif
endif
The mail contains
X-Spam_score_int: 1
X-Spam_score_int: 2
both added by my server.
Should I rather check for $spam_score_int instead of $header_X-Spam_score_int
in my my userfilter?
There''s already an exim bug asking for the ability to remove headers at
acl
time:
http://bugs.exim.org/show_bug.cgi?id=501
Cheers,
Thomas Koch
Andreas Metzler
2007-Dec-30 12:46 UTC
[Pkg-exim4-users] spam filter irritated by duplicate headers
Thomas Koch <thomas at koch.ro> wrote: [...]> Should I rather check for $spam_score_int instead of $header_X-Spam_score_int > in my my userfilter?Yes, you should do that.> There''s already an exim bug asking for the ability to remove headers at acl > time: > http://bugs.exim.org/show_bug.cgi?id=501You can use a system filter to do that alternatively. # acl warn condition = ${if <{$message_size}{120k}{1}{0}} spam = nobody:true set acl_m0 = $spam_score ($spam_bar) set acl_m1 = $spam_report [...] # Exim filter if first_delivery then headers remove X-Spam-Score:X-Spam-Report if $acl_m0 contains "(" then headers add "X-Spam-Score: $acl_m0" headers add "X-Spam-Report: $acl_m1" endif endif cu andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.'' `I sew his ears on from time to time, sure''