- How not to deal with fraud
- More on domain squatting
- The 45nm Xeon 5400 series in the lab
- Domain squatting for fun and profit
- If the shoe fits
- Full circle: How Microsoft is trying to eradicate email
- The Air, a month later
- /etc/hosts.deny, hackers, and automation run amok
- Finally, Leopard
- Clearing the Air
August 05, 2006 | Comments: (0)
Relaydelay patch
After I don't know how many years using and coding on Evan Harris's relaydelay Sendmail milter, I just recently found and fixed a small bug in the recipient whitelisting code on version 0.04. Prior to this fix, recipient whitelisting wouldn't work if the database entry for the address wasn't enclosed in <> brackets. This was due to the way that the rcpt_to variable was handled prior to the database call. The patch below yanks those out of the string if they exist, rendering normal addresses viable for recipient whitelisting.
Note that this patch was made against a heavily modified milter, so it might fail on the stock version. Just add the regex in the patch in the right place in your version.
--- relaydelay.rcpt_to.pl Sat Aug 5 12:27:25 2006
+++ relaydelay.pl Thu Aug 3 10:18:41 2006
@@ -743,6 +743,7 @@
# See if this recipient (or domain/subdomain) is wildcard white/blacklisted
# Do the check in such a way that more exact matches are returned first
if ($check_wildcard_rcpt_to) {
+ $rcpt_to =~ s/(?:<|>)//g;
my $subquery = "rcpt_to = " . $dbh->quote($rcpt_to);
my $tstr = $rcpt_domain;
while(index($tstr, ".") > 0) {
Posted by Paul Venezia on August 5, 2006 03:34 PM
RATE THIS ARTICLE:
-

- COMMENTS







