]> git.donarmstrong.com Git - deb_pkgs/spamass-milter.git/blobdiff - debian/patches/disabled_30_deal_correctly_with_plus.patch
Load spamass-milter-0.3.0 into spamass-milter/trunk.
[deb_pkgs/spamass-milter.git] / debian / patches / disabled_30_deal_correctly_with_plus.patch
diff --git a/debian/patches/disabled_30_deal_correctly_with_plus.patch b/debian/patches/disabled_30_deal_correctly_with_plus.patch
new file mode 100644 (file)
index 0000000..3ed4da7
--- /dev/null
@@ -0,0 +1,16 @@
+--- spamass-milter.cpp.orig    2004-09-30 13:47:49.000000000 -0700
++++ spamass-milter.cpp 2004-09-30 13:50:15.000000000 -0700
+@@ -1375,8 +1375,11 @@
+ SpamAssassin::local_user()
+ {
+   // assuming we have a recipient in the form: <username@somehost.somedomain>
+-  // we return 'username'
+-  return _rcpt.substr(1,_rcpt.find('@')-1);
++  // (angle brackets optional) we return 'username'
++  if (_rcpt[0] == '<')
++    return _rcpt.substr(1,_rcpt.find_first_of("@+")-1);
++  else
++    return _rcpt.substr(0,_rcpt.find_first_of("@+"));
+ }
+ int