diff options
author | brian <brian@FreeBSD.org> | 2004-06-10 18:51:05 +0800 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2004-06-10 18:51:05 +0800 |
commit | 6c1581441119cf2eb8b8c0f0420001ea8a08d7f9 (patch) | |
tree | 01780d60188c13804bb77dc146d60732b9123065 /mail/spamass-milter | |
parent | 37d3e7c382a74799d908b176787d6205252321cb (diff) | |
download | freebsd-ports-gnome-6c1581441119cf2eb8b8c0f0420001ea8a08d7f9.tar.gz freebsd-ports-gnome-6c1581441119cf2eb8b8c0f0420001ea8a08d7f9.tar.zst freebsd-ports-gnome-6c1581441119cf2eb8b8c0f0420001ea8a08d7f9.zip |
Handle plussed ``User'' names so that mail to user+something attempts to
read ~user/.spamassassin/user_prefs
Bump portrevision to 4
Diffstat (limited to 'mail/spamass-milter')
-rw-r--r-- | mail/spamass-milter/Makefile | 2 | ||||
-rw-r--r-- | mail/spamass-milter/files/patch-spamass-milter.cpp | 25 |
2 files changed, 20 insertions, 7 deletions
diff --git a/mail/spamass-milter/Makefile b/mail/spamass-milter/Makefile index a2e5453a4d42..fd9cc89f1954 100644 --- a/mail/spamass-milter/Makefile +++ b/mail/spamass-milter/Makefile @@ -7,7 +7,7 @@ PORTNAME= spamass-milter PORTVERSION= 0.2.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SAVANNAH} MASTER_SITE_SUBDIR= spamass-milt diff --git a/mail/spamass-milter/files/patch-spamass-milter.cpp b/mail/spamass-milter/files/patch-spamass-milter.cpp index abb9a0e48b75..c3fa0049b4c1 100644 --- a/mail/spamass-milter/files/patch-spamass-milter.cpp +++ b/mail/spamass-milter/files/patch-spamass-milter.cpp @@ -1,5 +1,5 @@ ---- spamass-milter.cpp.orig Thu Jun 26 17:10:44 2003 -+++ spamass-milter.cpp Tue May 25 00:29:58 2004 +--- spamass-milter.cpp.orig Thu Jun 26 16:10:44 2003 ++++ spamass-milter.cpp Thu Jun 10 11:46:12 2004 @@ -102,6 +102,10 @@ #include <csignal> #include <string> @@ -19,13 +19,26 @@ break; default: /* Parent */ exit(0); -@@ -350,6 +355,9 @@ - string::size_type eoh2(assassin->d().find("\n\r\n")); +@@ -351,6 +356,9 @@ string::size_type eoh = ( eoh1 < eoh2 ? eoh1 : eoh2 ); string::size_type bob = assassin->d().find_first_not_of("\r\n", eoh); -+ + + if (bob == string::npos) + bob = assassin->d().size(); - ++ update_or_insert(assassin, ctx, assassin->spam_flag(), &SpamAssassin::set_spam_flag, "X-Spam-Flag"); update_or_insert(assassin, ctx, assassin->spam_status(), &SpamAssassin::set_spam_status, "X-Spam-Status"); + +@@ -1341,7 +1349,11 @@ + { + // assuming we have a recipient in the form: <username@somehost.somedomain> + // we return 'username' +- return _rcpt.substr(1,_rcpt.find('@')-1); ++ int at = _rcpt.find('@'); ++ int plus = _rcpt.find('+'); ++ if (plus > 0 && plus < at) ++ at = plus; ++ return _rcpt.substr(1,at-1); + } + + int |