spf-discuss
[Top] [All Lists]

Possible modification to Mail::SRS

2004-03-11 13:00:09
        After recently implimenting both SPF and SRS on the mail servers
for my home network I did run into a problem with Mail::SRS v0.29 that I
believe I have accurately patched. Given that SMTP is usually treated as
case insensitive the problem was arising when the $use_address sent to
forward() had any case sensitivity differences from what was sent as
$aliashost. For example "UnderGrid.net" was not equaling "undergrid.net"
and this it was running the address through SRS hashing and treating it
as a forwarding situation.

        The simple patch is as follows:

--- SRS.pm.orig 2004-03-03 01:31:48.000000000 -0800
+++ SRS.pm      2004-03-11 11:46:21.000000000 -0800
@@ -214,7 +214,7 @@
        }
        my $aliashost = $alias;
 
-       if ($aliashost eq $sendhost) {
+       if (lc($aliashost) eq lc($sendhost)) {
                return "$senduser\(_at_)$sendhost" unless 
$self->{AlwaysRewrite};
        }
 

        I'm not sure if it's the most elegant or in the most productive
point in the logic but it does allow the equality test to pass as case
insensitive and does not rewrite the address unless it has to.

        Regards,
        Jeremy T. Bouse


<Prev in Thread] Current Thread [Next in Thread>
  • Possible modification to Mail::SRS, Jeremy T. Bouse <=