| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- Index: spamass-milter.1.in
- --- spamass-milter.1.in.orig 2004-03-18 19:37:08 +0100
- +++ spamass-milter.1.in 2006-12-30 18:09:16 +0100
- @@ -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
- Index: spamass-milter.cpp
- --- spamass-milter.cpp.orig 2006-03-23 22:41:36 +0100
- +++ spamass-milter.cpp 2006-12-30 18:09:16 +0100
- @@ -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);
- @@ -783,6 +788,15 @@
- }
- /* 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 {
- // launch new SpamAssassin
|