[Mimedefang] Problems with filter for graphdefang

Martin Ferguson martin at mve.com
Tue Jul 6 10:16:25 EDT 2004


Hello!

I need to log what percentage of messages sent from one address on my domain
are sent to or cc'ed to another address on the domain.

i.e. I need to log the percentage of messages sent from sales at mydomain.com
which get cc'ed to filing at mydomain.com

I can find out the total number of messages sent from sales pretty easily
from filtering the mail_out graph. To find the number of messages which
sales sends to filing, I have the following in my mimedefang-filter;

==========================
if ($Sender =~ /sales\@mydomain.com/i )
{
foreach $recipient (@Recipients)
{
if ( $recipient =~

/filing\@mydomain.com/i )
   {
   	md_graphdefang_log('mail_sales_filing',,$RelayAddr);
   }
 }
}

==========================

This works fine for messages sent from sales at mydomain.com when
filing at mydomain.com is the only recipient, it prints one line in the log
file.

However if there are multiple recipients, one line with the
'mail_sales_filing' tag is added to the log for each of the recipient. This
is obviously not what I'm after.

Any help with my filter or other suggested ways of doing this are much
appreciated.

Thanks
Martin.



More information about the MIMEDefang mailing list