2 --- spamass-milter.cpp 2005-02-04 23:03:22.000000000 -0800
3 +++ spamass-milter.cpp 2005-03-27 17:13:50.595882304 -0800
6 bool flag_full_email = false; /* pass full email address to spamc */
7 bool flag_expand = false; /* alias/virtusertable expansion */
8 +bool ignore_authenticated_senders = false;
10 #if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */
11 static pthread_mutex_t popen_mutex = PTHREAD_MUTEX_INITIALIZER;
13 main(int argc, char* argv[])
16 - const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x";
17 + const char *args = "fd:mMp:P:r:u:D:i:Ib:B:e:x";
20 char *pidfilename = NULL;
22 debug(D_MISC, "Parsing ignore list");
23 parse_networklist(optarg, &ignorenets);
26 + debug(D_MISC, "Ignore authenticated senders");
27 + ignore_authenticated_senders = true;
30 dontmodifyspam = true;
31 smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
33 cout << PACKAGE_NAME << " - Version " << PACKAGE_VERSION << endl;
34 cout << "SpamAssassin Sendmail Milter Plugin" << endl;
35 cout << "Usage: spamass-milter -p socket [-b|-B bucket] [-d xx[,yy...]] [-D host]" << endl;
36 - cout << " [-e defaultdomain] [-f] [-i networks] [-m] [-M]" << endl;
37 + cout << " [-e defaultdomain] [-f] [-i networks] [-I] [-m] [-M]" << endl;
38 cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl;
39 cout << " [-- spamc args ]" << endl;
40 cout << " -p socket: path to create socket" << endl;
42 cout << " -f: fork into background" << endl;
43 cout << " -i: skip (ignore) checks from these IPs or netblocks" << endl;
44 cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16/255.255.0.0" << endl;
45 + cout << " -I: skip (ignore) checks if sender is authenticated" << endl;
46 cout << " -m: don't modify body, Content-type: or Subject:" << endl;
47 cout << " -M: don't modify the message at all" << endl;
48 cout << " -P pidfile: Put processid in pidfile" << endl;
50 struct context *sctx = (struct context *)smfi_getpriv(ctx);
53 + if (ignore_authenticated_senders)
57 + auth_authen = smfi_getsymval(ctx, "{auth_authen}");
58 + debug(D_MISC, "auth_authen=%s", auth_authen ?: "<unauthenticated>");
62 + debug(D_MISC, "sender authenticated (%s) - accepting message",
64 + debug(D_FUNC, "mlfi_envfrom: exit ignore");
65 + return SMFIS_ACCEPT;
69 debug(D_FUNC, "mlfi_envfrom: enter");
71 // launch new SpamAssassin
73 --- spamass-milter.1.in 2004-03-18 10:37:08.000000000 -0800
74 +++ spamass-milter.1.in 2005-03-27 20:23:09.552408021 -0800
76 .Op Fl e Ar defaultdomain
84 flags will append to the list.
85 For example, if you list all your internal networks, no outgoing emails
88 +Ignores messages if the sender has authenticated via SMTP AUTH.
90 Disables modification of the