[Exim] filter out multiple forwards

Top Page
Delete this message
Reply to this message
Author: Rossz Vamos-Wentworth
Date:  
To: exim-users
Subject: [Exim] filter out multiple forwards
I get annoyed by messages with the subject "fwd: fwd: fwd: fwd: This is funny". You know what
I'm talking about. So I wrote this little filter:

if $header_subject matches "(fwd?: *?){2}" and not error_message
then
fail text "Multigenerational forwards rejected by the mail server."
seen finish
endif

More than one fwd: or fw: and the message bounces. My wife made me write a friendly bounce
message. The one I originally wrote might have caused her to lose friends. Hell, my attitude is,
"with friends like that, who needs spammers?"

I'd also like to implement a filter that counts the number of addresses in the To: line and bounces
if there are too many. I'm just not sure how to go about doing that (I'm new at exim, give me
time).

Rossz