
spf at anarres
Mar 12, 2004, 6:55 AM
Post #2 of 2
(1354 views)
Permalink
|
On Thu, 11 Mar 2004, Jeremy T. Bouse wrote: > 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\@$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. Thankyou. This patch will be in version 0.31 to be released (hopefully) later today or tomorrow. This particular piece of logic is a special case anyway, so we can hardly expect it to look elegant. I appreciate tests with patches. I do not believe I currently have tests for this feature at all. There are some other important case-smashing related fixes in version 0.30, released earlier today following bug reports I received offlist. Thanks again. S. -- Shevek http://www.anarres.org/ I am the Borg. http://www.gothnicity.org/
|