[Mimedefang] Spam graphs by domain
mimedefang at jameswcurtis.com
mimedefang at jameswcurtis.com
Sat Jan 3 12:55:36 EST 2004
I don't know much about programming, so I was hoping that you could help
me out further on this. I am wanting to capture per domain statistics for
graphing on each of the domains that I host/filter on the same server. I
looked at the code for stream_by_domain, and it appears that it has a lot
of stuff for sending multiple e-mails because of what it was intended for,
which I don't really need because of it breaking the ability to reject at
the MTA level. But the relevant code for what I am needing appears to be
this.
# Grab list of domains of recipients
foreach $recip (@Recipients) {
$dom = $recip;
# Remove angle brackets
$dom =~ s/[<>]//g;
# Get domain
$dom =~ s/.*\@//;
That sets $dom to just the portion of the address after the @ sign. Could
I add this after the if ($Features{"SpamAssassin"}) line and use it in
that section. Would this use less processor/memory than using the INPUTMSG
and parse method (which I have no idea how to code). This should give me
the ability to
md_graphdefang_log('spam', $hits, $RelayAddr, $dom)
After it gets into the SummaryDB file that way I could generate
graphdefang reports with the grouping $dom. I sure something else is
Or is there an easier way that I haven't read about yet?
I am sure something else is missing, but I am not sure what, and I don't
know how this would effect performance.
James W Curtis
More information about the MIMEDefang
mailing list