1 Index: spamass-milter/spamass-milter.1.in
2 ===================================================================
3 --- spamass-milter.orig/spamass-milter.1.in 2012-06-21 12:53:44.000000000 -0700
4 +++ spamass-milter/spamass-milter.1.in 2012-06-21 12:56:56.000000000 -0700
6 .Op Fl e Ar defaultdomain
14 flags will append to the list.
15 For example, if you list all your internal networks, no outgoing emails
18 +Ignores messages if the sender has authenticated via SMTP AUTH.
20 Disables modification of the
22 Index: spamass-milter/spamass-milter.cpp
23 ===================================================================
24 --- spamass-milter.orig/spamass-milter.cpp 2012-06-21 12:53:49.000000000 -0700
25 +++ spamass-milter/spamass-milter.cpp 2012-06-21 12:56:56.000000000 -0700
28 bool flag_full_email = false; /* pass full email address to spamc */
29 bool flag_expand = false; /* alias/virtusertable expansion */
30 +bool ignore_authenticated_senders = false;
31 bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */
35 main(int argc, char* argv[])
38 - const char *args = "fd:mMp:P:r:u:D:i:b:B:e:x";
39 + const char *args = "fd:mMp:P:r:u:D:i:Ib:B:e:x";
42 char *pidfilename = NULL;
44 debug(D_MISC, "Parsing ignore list");
45 parse_networklist(optarg, &ignorenets);
48 + debug(D_MISC, "Ignore authenticated senders");
49 + ignore_authenticated_senders = true;
52 dontmodifyspam = true;
53 smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
55 cout << PACKAGE_NAME << " - Version " << PACKAGE_VERSION << endl;
56 cout << "SpamAssassin Sendmail Milter Plugin" << endl;
57 cout << "Usage: spamass-milter -p socket [-b|-B bucket] [-d xx[,yy...]] [-D host]" << endl;
58 - cout << " [-e defaultdomain] [-f] [-i networks] [-m] [-M]" << endl;
59 + cout << " [-e defaultdomain] [-f] [-i networks] [-I] [-m] [-M]" << endl;
60 cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl;
61 cout << " [-- spamc args ]" << endl;
62 cout << " -p socket: path to create socket" << endl;
64 cout << " -f: fork into background" << endl;
65 cout << " -i: skip (ignore) checks from these IPs or netblocks" << endl;
66 cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0" << endl;
67 + cout << " -I: skip (ignore) checks if sender is authenticated" << endl;
68 cout << " -m: don't modify body, Content-type: or Subject:" << endl;
69 cout << " -M: don't modify the message at all" << endl;
70 cout << " -P pidfile: Put processid in pidfile" << endl;
73 /* debug(D_ALWAYS, "ZZZ got private context %p", sctx); */
75 + if (ignore_authenticated_senders)
79 + auth_authen = smfi_getsymval(ctx, "{auth_authen}");
80 + debug(D_MISC, "auth_authen=%s", auth_authen ?: "<unauthenticated>");
84 + debug(D_MISC, "sender authenticated (%s) - accepting message",
86 + debug(D_FUNC, "mlfi_envfrom: exit ignore");
87 + return SMFIS_ACCEPT;
91 debug(D_FUNC, "mlfi_envfrom: enter");
93 // launch new SpamAssassin