[Mimedefang] Spam graphs by domain

Jonas Eckerman jonas_lists at frukt.org
Sun Jan 4 00:02:00 EST 2004


On Sat, 3 Jan 2004 12:55:36 -0500 (EST), mimedefang at jameswcurtis.com wrote:

>  Or is there an easier way that I haven't read about yet?

You could also use graphdefang's filter. Cut from the example graphdefang-config:

--8<--
# Name:               filter (optional)
# Description:        Regular expression filter that can be
#                     used with value1, value2, sender,
#                     recipient, and subject
#                     Common uses:
#                     '@westover.org' to filter sender or recipient by domain
#                     '^(?:(?!klez).)*$' to filter OUT klez in a virusname
--8<--

> Could I add this after the if ($Features{"SpamAssassin"})

Yes, you could do something similar to:

foreach $recip (@Recipients) {
	$dom = $recip;
	$dom =~ s/[<>]//g;
	$dom =~ s/.*\@//;
	md_graphdefang_log('spam', $hits, $RelayAddr, $dom)
}

> Would this use less processor/memory than using the INPUTMSG
> and parse method (which I have no idea how to code).

Yes. And it would work, wich parsing the message wouldn't. :-)

The headers of the message does not have to contain any of the recipients for a mail. The @Recipients array allways contain the recipients. So, using the @Recipients domain is both easier and much better than parsing the headers of the mail.

Regards
/Jonas

-- 
Jonas Eckerman, jonas_lists at frukt.org
http://www.fsdb.org/




More information about the MIMEDefang mailing list