diff options
author | miwi <miwi@FreeBSD.org> | 2006-11-16 03:40:10 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2006-11-16 03:40:10 +0800 |
commit | 76b7daad26bff7cf292549b08c615fba9d38333e (patch) | |
tree | b6857b462db9ffa84e599908aeae9db94651734d /mail | |
parent | 008b41ebbd663addfe80693d1f9c72bf2c9d886a (diff) | |
download | freebsd-ports-gnome-76b7daad26bff7cf292549b08c615fba9d38333e.tar.gz freebsd-ports-gnome-76b7daad26bff7cf292549b08c615fba9d38333e.tar.zst freebsd-ports-gnome-76b7daad26bff7cf292549b08c615fba9d38333e.zip |
- add patch to skip spam checks on SMTP authenticated users by setting
WITH_ADDAUTH_PATCH environment variable at build time
- thanks to Steve Watt <steve_AT_watt.com> for providing the patch
- bump PORTREVISION
PR: ports/105571
Submitted by: Thomas Abthorpe<thomas@goodking.ca> (maintainer)
Diffstat (limited to 'mail')
-rw-r--r-- | mail/spamass-milter/files/extra-patch-addauth | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/mail/spamass-milter/files/extra-patch-addauth b/mail/spamass-milter/files/extra-patch-addauth new file mode 100644 index 000000000000..59957119362d --- /dev/null +++ b/mail/spamass-milter/files/extra-patch-addauth @@ -0,0 +1,77 @@ +diff -u orig/spamass-milter.1.in spamass-milter.1.in +--- orig/spamass-milter.1.in Thu Mar 18 10:37:08 2004 ++++ spamass-milter.1.in Wed Oct 18 18:06:23 2006 +@@ -199,6 +199,9 @@ + Requires the + .Fl u + flag. ++.It Fl a ++Causes spamass-milter to pass through unchecked any messages from connections ++established using SMTP authentication. This is useful for sites with remote users. + .It Fl - Ar spamc flags ... + Pass all remaining options to spamc. + This allows you to connect to a remote spamd with +diff -u orig/spamass-milter.cpp spamass-milter.cpp +--- orig/spamass-milter.cpp Thu Mar 23 13:41:36 2006 ++++ spamass-milter.cpp Wed Oct 18 21:13:25 2006 +@@ -170,6 +170,7 @@ + bool flag_full_email = false; /* pass full email address to spamc */ + bool flag_expand = false; /* alias/virtusertable expansion */ + bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */ ++bool auth = false; /* don't scan authenticated users */ + + #if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */ + static pthread_mutex_t popen_mutex = PTHREAD_MUTEX_INITIALIZER; +@@ -181,7 +182,7 @@ + main(int argc, char* argv[]) + { + int c, err = 0; +- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x"; ++ const char *args = "fd:mMp:P:r:u:D:i:b:B:e:xa"; + char *sock = NULL; + bool dofork = false; + char *pidfilename = NULL; +@@ -196,6 +197,9 @@ + /* Process command line options */ + while ((c = getopt(argc, argv, args)) != -1) { + switch (c) { ++ case 'a': ++ auth = true; ++ break; + case 'f': + dofork = true; + break; +@@ -281,7 +285,7 @@ + cout << "SpamAssassin Sendmail Milter Plugin" << endl; + cout << "Usage: spamass-milter -p socket [-b|-B bucket] [-d xx[,yy...]] [-D host]" << endl; + cout << " [-e defaultdomain] [-f] [-i networks] [-m] [-M]" << endl; +- cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl; ++ cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x] [-a]" << endl; + cout << " [-- spamc args ]" << endl; + cout << " -p socket: path to create socket" << endl; + cout << " -b bucket: redirect spam to this mail address. The orignal" << endl; +@@ -302,6 +306,7 @@ + cout << " -u defaultuser: pass the recipient's username to spamc.\n" + " Uses 'defaultuser' if there are multiple recipients." << endl; + cout << " -x: pass email address through alias and virtusertable expansion." << endl; ++ cout << " -a: don't scan messages over an authenticated connection." << endl; + cout << " -- spamc args: pass the remaining flags to spamc." << endl; + + exit(EX_USAGE); +@@ -782,6 +787,15 @@ + return SMFIS_TEMPFAIL; + } + /* debug(D_ALWAYS, "ZZZ got private context %p", sctx); */ ++ ++ if (auth) { ++ const char *auth_type = smfi_getsymval(ctx, "{auth_type}"); ++ ++ if (auth_type) { ++ debug(D_MISC, "auth_type=%s", auth_type); ++ return SMFIS_ACCEPT; ++ } ++ } + + debug(D_FUNC, "mlfi_envfrom: enter"); + try { + |