Local Relay patch for MS

Lindsay Snider lindsay at pa.net
Tue Feb 10 22:22:17 GMT 2004

Julian and fellow Mailscanneriers,
  Here is a patch which allows MailScanner to ignore ips acting as
relays to your mailscanner server.  For example, if you collect mail on
a mx server and then relay it to a mailscanner server, you can specify
your mx server as a local relay.  Then, mailscanner will not report the
mx server as the source of the message but rather the ip which connected
to the mx.

sender-> localrelay1 -> localrelay2 -> mailscanner
mailscanner will report the sender's ip.

if this happens:
localrelay1 -> localrealy2 -> mailscanner
mailscanner will report localrelay1

Would anyone else find this useful?

Patch Detail:
For now only postfix support is coded.

I left debugging in so you can watch what its doing.

I originally had the mailscanner.conf -> message object load in during
Message.pm:new() but from what I recall, it wasn't running before
<mta>.pm:ReadQF.  Perhaps it should be moved to Postfix.pm:new().

Something like the following will work for the conf file.
# Local Relay
Local Relay =

Lindsay Snider <lindsay at pa.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: localrelay.mailscanner.diff
Type: text/x-patch
Size: 2092 bytes
Desc: not available
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20040210/2cea8db7/localrelay.mailscanner-0001.bin

More information about the MailScanner mailing list