Permalink
Browse files

Handle sender addresses containing "=" (this is what happens when you…

… borrow code from elsewhere)
  • Loading branch information...
1 parent 125c4fd commit c98a68d9ed86054726c29bfc9ce6ea245dd2bff2 @purcell committed Aug 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/postfix-policy-whois
View
4 bin/postfix-policy-whois
@@ -55,8 +55,8 @@ while true
attr = Hash.new
while rp = client.gets
break if rp == "\n"
- rp2 = rp.split(/=/)
- attr[rp2[0]] = rp2[1].chomp
+ rp2 = rp.scan(/^(\w+)=(.*?)\s*$/).first
+ attr[rp2[0]] = rp2[1]
end
sender = attr["sender"]

0 comments on commit c98a68d

Please sign in to comment.