clientip and CusomConfig.pm

Matt Standish mstandish at gmail.com
Wed Jul 18 21:17:42 IST 2007


Hi,
I recently posted a similar message to the mailwatch list and after
further research I think it may be better asked here. I would also
like to add that the MailScanner source is documented beautifully.
Thanks for a great product.

I would like to alter MailWatch.pm in customfunctions to to log the IP
address of the original sender of the message or the last sender
before my spamassassin trusted_networks list.  Currently it logs
clientip which is the previous hop.  This would do if I could list my
scanner as the MX but because of my institutions size this is simply
not possible.

For example if I have a message that took this path:

10.10.100.1 badguy.spam.net
192.168.100.1  evil.internet.com
192.168.200.1  untrusted.internet.com
192.168.1.1  trustedrelay.mydomain.com
192.168.15.1 trustedrelay2.mydomain.com
192.168.10.1 mymailscanner.mydomain.com

spamassassin trusted_networds = 192.168.15.1/32 192.168.10.1/32 192.168.1.1/32

192.168.1.1 and 192.168.15.1 would not be logged but 192.168.200.1 would.

I am looking through Message.pm and CustomConfig.pm to try and create
another function to grab this info from the headers.  Am I correct in
assuming that I would add the function in CustomConfig.pm to avoid
problems when upgrading?  Am I even looking in the right place?  Has
this already been done?


Any ideas?
Thanks.
-- 
Matt Standish


More information about the MailScanner mailing list