[spamass-milter] Update to 0.4.0
Paul Howarth
pghmcfc at fedoraproject.org
Thu Feb 26 14:45:57 UTC 2015
commit dee64492f623312c3f789bf89280db05c70bf26e
Author: Paul Howarth <paul at city-fan.org>
Date: Thu Feb 26 14:41:51 2015 +0000
Update to 0.4.0
- New upstream release 0.4.0
- New options:
-C option to change the default reject code
-S option to specify a path to sendmail (for the -x option)
-R option to specify the rejection message
-a option to skip messages that were authenticated
- IPv6 address support
- Syntax clean-ups
- Drop upstreamed syntax, rejection text and IPv6 patches
- Update authuser patch: note that upstream has introduced a -a option that
does pretty much the same as the -I option added by this patch, so this
patch is deprecated and will not be included in builds for Fedora 22 onwards
- Clean up other patches to apply cleanly
.gitignore | 1 +
sources | 2 +-
spamass-milter-0.3.1-ipv6.patch | 297 ---------------------
spamass-milter-0.3.2-rejecttext.patch | 58 ----
spamass-milter-0.3.2-syntax.patch | 248 -----------------
...patch => spamass-milter-0.4.0-auth-no-ssf.patch | 8 +-
...er.patch => spamass-milter-0.4.0-authuser.patch | 100 ++++---
...2-bits.patch => spamass-milter-0.4.0-bits.patch | 48 ++--
...group.patch => spamass-milter-0.4.0-group.patch | 106 ++++----
...s.patch => spamass-milter-0.4.0-pathnames.patch | 7 +-
...2-rcvd.patch => spamass-milter-0.4.0-rcvd.patch | 7 +-
...ndir.patch => spamass-milter-0.4.0-rundir.patch | 28 +-
spamass-milter.spec | 74 ++---
13 files changed, 194 insertions(+), 790 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 05dd470..0c0fe60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/spamass-milter-0.3.2.tar.bz2
+/spamass-milter-0.4.0.tar.gz
diff --git a/sources b/sources
index d15c25a..37fd8f1 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-740b4bcb93eca2bbc3863d0042b26533 spamass-milter-0.3.2.tar.bz2
+aae2624770f5cb5a8b6484afb0fe5baa spamass-milter-0.4.0.tar.gz
diff --git a/spamass-milter-0.3.2-auth-no-ssf.patch b/spamass-milter-0.4.0-auth-no-ssf.patch
similarity index 89%
rename from spamass-milter-0.3.2-auth-no-ssf.patch
rename to spamass-milter-0.4.0-auth-no-ssf.patch
index ce38173..3992399 100644
--- a/spamass-milter-0.3.2-auth-no-ssf.patch
+++ b/spamass-milter-0.4.0-auth-no-ssf.patch
@@ -1,4 +1,4 @@
-This change is to help users with Postfix that aren't using the -I option
+This change is to help users with Postfix that aren't using the -a option
to not pass mail from authenticated users through SpamAssassin. Postfix,
unlike Sendmail, does not provide the {auth_ssf} macro, so in the case
where mail is from an authenticated user, the modified code can now add
@@ -7,9 +7,9 @@ add (authenticated bits=nnn)), and this is scored favourably by SpamAssassin.
http://bugzilla.redhat.com/730308
---- spamass-milter-0.3.2/spamass-milter.cpp
-+++ spamass-milter-0.3.2/spamass-milter.cpp
-@@ -1046,9 +1046,14 @@
+--- spamass-milter.cpp
++++ spamass-milter.cpp
+@@ -1069,9 +1069,14 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
rec_header = (string) "Received: from " + macro_s + " (" + macro__ + ")\r\n\t";
diff --git a/spamass-milter-0.3.1-authuser.patch b/spamass-milter-0.4.0-authuser.patch
similarity index 55%
rename from spamass-milter-0.3.1-authuser.patch
rename to spamass-milter-0.4.0-authuser.patch
index 7d3c7c5..890cfc9 100644
--- a/spamass-milter-0.3.1-authuser.patch
+++ b/spamass-milter-0.4.0-authuser.patch
@@ -1,55 +1,74 @@
-diff -up spamass-milter-0.3.1/spamass-milter.cpp.authuser spamass-milter-0.3.1/spamass-milter.cpp
---- spamass-milter-0.3.1/spamass-milter.cpp.authuser 2010-03-23 21:04:56.976920217 +0000
-+++ spamass-milter-0.3.1/spamass-milter.cpp 2010-03-23 21:07:12.508020535 +0000
-@@ -172,6 +172,7 @@ char *spambucket;
- bool flag_full_email = false; /* pass full email address to spamc */
+--- spamass-milter.1.in
++++ spamass-milter.1.in
+@@ -16,6 +16,7 @@
+ .Op Fl f
+ .Op Fl g Ar group
+ .Op Fl i Ar networks
++.Op Fl I
+ .Op Fl m
+ .Op Fl M
+ .Op Fl P Ar pidfile
+@@ -134,6 +135,8 @@ Multiple
+ flags will append to the list.
+ For example, if you list all your internal networks, no outgoing emails
+ will be filtered.
++.It Fl I
++Ignores messages if the sender has authenticated via SMTP AUTH.
+ .It Fl m
+ Disables modification of the
+ .Ql Subject:
+--- spamass-milter.cpp
++++ spamass-milter.cpp
+@@ -178,6 +178,7 @@ bool flag_full_email = false; /* pass f
bool flag_expand = false; /* alias/virtusertable expansion */
bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */
-+bool ignore_authenticated_senders = false; /* authenticated users bypass spam checks */
+ bool auth = false; /* don't scan authenticated users */
++bool ignore_authenticated_senders = false; /* authenticated users bypass spam checks */
// {{{ main()
-@@ -179,7 +180,7 @@ int
+@@ -185,7 +186,7 @@ int
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:Ib:B:e:x";
+- const char *args = "afd:mMp:P:r:u:D:i:b:B:e:xS:R:C:g:";
++ const char *args = "afd:mMp:P:r:u:D:i:Ib:B:e:xS:R:C:g:";
char *sock = NULL;
+ char *group = NULL;
bool dofork = false;
- char *pidfilename = NULL;
-@@ -211,6 +212,10 @@ main(int argc, char* argv[])
- debug(D_MISC, "Parsing ignore list");
- parse_networklist(optarg, &ignorenets);
- break;
-+ case 'I':
-+ debug(D_MISC, "Ignore authenticated senders");
-+ ignore_authenticated_senders = true;
-+ break;
- case 'm':
- dontmodifyspam = true;
- smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
-@@ -278,7 +283,7 @@ main(int argc, char* argv[])
+@@ -225,6 +226,10 @@ main(int argc, char* argv[])
+ debug(D_MISC, "Parsing ignore list");
+ parse_networklist(optarg, &ignorenets);
+ break;
++ case 'I':
++ debug(D_MISC, "Ignore authenticated senders");
++ ignore_authenticated_senders = true;
++ break;
+ case 'm':
+ dontmodifyspam = true;
+ smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
+@@ -301,7 +306,7 @@ main(int argc, char* argv[])
cout << PACKAGE_NAME << " - Version " << PACKAGE_VERSION << endl;
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 << " [-e defaultdomain] [-f] [-i networks] [-I] [-m] [-M]" << endl;
- cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl;
+ cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x] [-a]" << endl;
+ cout << " [-C rejectcode] [-R rejectmsg] [-g group]" << endl;
cout << " [-- spamc args ]" << endl;
- cout << " -p socket: path to create socket" << endl;
-@@ -292,6 +297,7 @@ main(int argc, char* argv[])
- cout << " -f: fork into background" << endl;
+@@ -318,6 +323,7 @@ main(int argc, char* argv[])
+ cout << " -g group: socket group (perms to 660 as well)" << endl;
cout << " -i: skip (ignore) checks from these IPs or netblocks" << endl;
cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0" << endl;
+ cout << " -I: skip (ignore) checks if sender is authenticated" << endl;
cout << " -m: don't modify body, Content-type: or Subject:" << endl;
cout << " -M: don't modify the message at all" << endl;
cout << " -P pidfile: Put processid in pidfile" << endl;
-@@ -746,6 +752,22 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
+@@ -850,6 +856,22 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
+ return SMFIS_ACCEPT;
+ }
}
- /* debug(D_ALWAYS, "ZZZ got private context %p", sctx); */
-
++
+ if (ignore_authenticated_senders)
+ {
+ char *auth_authen;
@@ -65,27 +84,6 @@ diff -up spamass-milter-0.3.1/spamass-milter.cpp.authuser spamass-milter-0.3.1/s
+ return SMFIS_ACCEPT;
+ }
+ }
-+
+
debug(D_FUNC, "mlfi_envfrom: enter");
try {
- // launch new SpamAssassin
-diff -up spamass-milter-0.3.1/spamass-milter.1.in.authuser spamass-milter-0.3.1/spamass-milter.1.in
---- spamass-milter-0.3.1/spamass-milter.1.in.authuser 2004-03-18 18:37:08.000000000 +0000
-+++ spamass-milter-0.3.1/spamass-milter.1.in 2010-03-23 21:06:27.148897685 +0000
-@@ -14,6 +14,7 @@
- .Op Fl e Ar defaultdomain
- .Op Fl f
- .Op Fl i Ar networks
-+.Op Fl I
- .Op Fl m
- .Op Fl M
- .Op Fl P Ar pidfile
-@@ -119,6 +120,8 @@ Multiple
- flags will append to the list.
- For example, if you list all your internal networks, no outgoing emails
- will be filtered.
-+.It Fl I
-+Ignores messages if the sender has authenticated via SMTP AUTH.
- .It Fl m
- Disables modification of the
- .Ql Subject:
diff --git a/spamass-milter-0.3.2-bits.patch b/spamass-milter-0.4.0-bits.patch
similarity index 83%
rename from spamass-milter-0.3.2-bits.patch
rename to spamass-milter-0.4.0-bits.patch
index 8b1cc75..61090fd 100644
--- a/spamass-milter-0.3.2-bits.patch
+++ b/spamass-milter-0.4.0-bits.patch
@@ -9,17 +9,18 @@ http://www.gossamer-threads.com/lists/spamassassin/users/146948
This patch also moves some of the macro collection to the
ENVFROM callback, where the required macros are available by default.
-diff -up spamass-milter-0.3.2/README.bits spamass-milter-0.3.2/README
---- spamass-milter-0.3.2/README.bits 2008-04-23 17:11:42.000000000 +0100
-+++ spamass-milter-0.3.2/README 2011-02-15 11:02:47.877271392 +0000
-@@ -55,15 +55,26 @@ configuring sendmail through m4 & the se
+--- README
++++ README
+@@ -55,16 +55,28 @@ configuring sendmail through m4 & the se
adding the lines
INPUT_MAIL_FILTER(`spamassassin', `S=local:/var/run/sendmail/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
-define(`confMILTER_MACROS_CONNECT',`t, b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl
-define(`confMILTER_MACROS_HELO',`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}')dnl
+-define(`confMILTER_MACROS_ENVFROM',`{auth_authen}, {auth_type}')dnl
-define(`confMILTER_MACROS_ENVRCPT',`r, v, Z')dnl
+define(`confMILTER_MACROS_ENVRCPT',confMILTER_MACROS_ENVRCPT`, b, r, v, Z')dnl
++
should do the trick. Of course you need to modify the path of the
socket if you put another one into the startup script. The timeouts
@@ -34,18 +35,18 @@ diff -up spamass-milter-0.3.2/README.bits spamass-milter-0.3.2/README
+confMILTER_MACROS_CONNECT must include the {j} and {_} macros
+(all included by default)
+
-+confMILTER_MACROS_ENVFROM must include the {i}, {auth_authen} and {auth_ssf}
-+macros (all included by default)
++confMILTER_MACROS_ENVFROM must include the {i}, {auth_authen}, {auth_ssf}
++and {auth_type} macros (all included by default)
+
+confMILTER_MACROS_ENVRCPT must include the {b}, {r}, {v}, and {Z} macros
+
++
Now recreate sendmail.cf, restart sendmail and experiment around a bit
with the setup to make sure it is working.
-diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spamass-milter.cpp
---- spamass-milter-0.3.2/spamass-milter.cpp.bits 2011-02-15 10:53:49.349259089 +0000
-+++ spamass-milter-0.3.2/spamass-milter.cpp 2011-02-15 10:53:49.353259721 +0000
-@@ -678,6 +678,7 @@ sfsistat
+--- spamass-milter.cpp
++++ spamass-milter.cpp
+@@ -702,6 +702,7 @@ sfsistat
mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
{
struct context *sctx;
@@ -53,7 +54,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
int rv;
debug(D_FUNC, "mlfi_connect: enter");
-@@ -695,8 +696,31 @@ mlfi_connect(SMFICTX * ctx, char *hostna
+@@ -726,8 +727,31 @@ mlfi_connect(SMFICTX * ctx, char *hostna
}
sctx->assassin = NULL;
sctx->helo = NULL;
@@ -87,7 +88,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
rv = smfi_setpriv(ctx, sctx);
if (rv != MI_SUCCESS)
{
-@@ -745,7 +769,7 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
+@@ -778,7 +802,7 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
{
SpamAssassin* assassin;
struct context *sctx = (struct context *)smfi_getpriv(ctx);
@@ -96,7 +97,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
if (sctx == NULL)
{
-@@ -787,17 +811,44 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
+@@ -814,17 +838,44 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
// remember the MAIL FROM address
assassin->set_from(string(envfrom[0]));
@@ -144,7 +145,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
// tell Milter to continue
debug(D_FUNC, "mlfi_envfrom: exit");
-@@ -888,7 +939,8 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -918,7 +969,8 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
*/
const char *macro_b, *macro_i, *macro_j, *macro_r,
@@ -154,7 +155,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
char date[32];
/* RFC 822 date. */
-@@ -903,20 +955,13 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -933,20 +985,13 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* queue ID */
@@ -181,7 +182,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
/* Protocol used to receive the message */
macro_r = smfi_getsymval(ctx, const_cast<char *>("r"));
-@@ -925,7 +970,11 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -955,7 +1000,11 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
macro_r = "SMTP";
warnmacro("r", "ENVRCPT");
}
@@ -194,7 +195,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
/* Sendmail currently cannot pass us the {s} macro, but
I do not know why. Leave this in for the day sendmail is
fixed. Until that day, use the value remembered by
-@@ -953,22 +1002,25 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -983,22 +1032,25 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
warnmacro("Z", "ENVRCPT");
}
@@ -232,7 +233,7 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
} else
assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
-@@ -1214,16 +1266,27 @@ mlfi_close(SMFICTX* ctx)
+@@ -1244,16 +1296,27 @@ mlfi_close(SMFICTX* ctx)
{
struct context *sctx;
debug(D_FUNC, "mlfi_close");
@@ -262,10 +263,9 @@ diff -up spamass-milter-0.3.2/spamass-milter.cpp.bits spamass-milter-0.3.2/spama
return SMFIS_ACCEPT;
}
-diff -up spamass-milter-0.3.2/spamass-milter.h.bits spamass-milter-0.3.2/spamass-milter.h
---- spamass-milter-0.3.2/spamass-milter.h.bits 2011-02-15 10:53:49.342257983 +0000
-+++ spamass-milter-0.3.2/spamass-milter.h 2011-02-15 10:53:49.354259879 +0000
-@@ -154,9 +154,6 @@ public:
+--- spamass-milter.h
++++ spamass-milter.h
+@@ -168,9 +168,6 @@ public:
// List of recipients after alias/virtusertable expansion
list <string> expandedrcpt;
@@ -275,9 +275,9 @@ diff -up spamass-milter-0.3.2/spamass-milter.h.bits spamass-milter-0.3.2/spamass
// Process handling variables
pid_t pid;
int pipe_io[2][2];
-@@ -167,6 +164,11 @@ struct context
+@@ -181,6 +178,11 @@ struct context
{
- struct in_addr connect_ip; // remote IP address
+ char connect_ip[64]; // remote IP address
char *helo;
+ char *our_fqdn;
+ char *sender_address;
diff --git a/spamass-milter-0.3.1-group.patch b/spamass-milter-0.4.0-group.patch
similarity index 56%
rename from spamass-milter-0.3.1-group.patch
rename to spamass-milter-0.4.0-group.patch
index 1e2a418..3887e1b 100644
--- a/spamass-milter-0.3.1-group.patch
+++ b/spamass-milter-0.4.0-group.patch
@@ -6,48 +6,78 @@ root and would otherwise be unable to use the socket).
http://bugzilla.redhat.com/452248
-diff -up spamass-milter-0.3.1/spamass-milter.cpp.group spamass-milter-0.3.1/spamass-milter.cpp
---- spamass-milter-0.3.1/spamass-milter.cpp.group 2010-03-24 13:30:19.030834527 +0000
-+++ spamass-milter-0.3.1/spamass-milter.cpp 2010-03-24 13:40:54.712898107 +0000
-@@ -89,6 +89,8 @@
+--- spamass-milter.1.in
++++ spamass-milter.1.in
+@@ -14,6 +14,7 @@
+ .Op Fl D Ar host
+ .Op Fl e Ar defaultdomain
+ .Op Fl f
++.Op Fl g Ar group
+ .Op Fl i Ar networks
+ .Op Fl m
+ .Op Fl M
+@@ -115,6 +116,12 @@ flag.
+ Causes
+ .Nm
+ to fork into the background.
++.It Fl g Ar group
++Makes the socket for communication with the MTA group-writable (mode 0750)
++and sets the socket's group to
++.Ar group .
++This option is intended for use with MTA's like Postfix that do not run as
++root, and is incompatible with Sendmail usage.
+ .It Fl i Ar networks
+ Ignores messages if the originating IP is in the network(s) listed.
+ The message will be passed through without calling SpamAssassin at all.
+--- spamass-milter.cpp
++++ spamass-milter.cpp
+@@ -89,6 +89,7 @@
#endif
#include <errno.h>
-
+ #include <netdb.h>
+#include <grp.h>
-+
+
// C++ includes
#include <cstdio>
- #include <cstddef>
-@@ -180,8 +182,9 @@ int
+@@ -184,8 +185,9 @@ int
main(int argc, char* argv[])
{
int c, err = 0;
-- const char *args = "fd:mMp:P:r:u:D:i:Ib:B:e:x";
-+ const char *args = "fd:mMp:P:r:u:D:i:Ib:B:e:xg:";
+- const char *args = "afd:mMp:P:r:u:D:i:b:B:e:xS:R:C:";
++ const char *args = "afd:mMp:P:r:u:D:i:b:B:e:xS:R:C:g:";
char *sock = NULL;
+ char *group = NULL;
bool dofork = false;
char *pidfilename = NULL;
FILE *pidfile = NULL;
-@@ -228,6 +231,9 @@ main(int argc, char* argv[])
- case 'p':
- sock = strdup(optarg);
- break;
-+ case 'g':
-+ group = strdup(optarg);
-+ break;
- case 'P':
- pidfilename = strdup(optarg);
- break;
-@@ -287,6 +293,7 @@ main(int argc, char* argv[])
- cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl;
+@@ -206,6 +208,9 @@ main(int argc, char* argv[])
+ case 'f':
+ dofork = true;
+ break;
++ case 'g':
++ group = strdup(optarg);
++ break;
+ case 'd':
+ parse_debuglevel(optarg);
+ break;
+@@ -298,7 +303,7 @@ main(int argc, char* argv[])
+ 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] [-a]" << endl;
+- cout << " [-C rejectcode] [ -R rejectmsg ]" << endl;
++ cout << " [-C rejectcode] [-R rejectmsg] [-g group]" << endl;
cout << " [-- spamc args ]" << endl;
cout << " -p socket: path to create socket" << endl;
-+ cout << " -g group: socket group (perms to 660 as well)" << endl;
cout << " -b bucket: redirect spam to this mail address. The orignal" << endl;
- cout << " recipient(s) will not receive anything." << endl;
- cout << " -B bucket: add this mail address as a BCC recipient of spam." << endl;
-@@ -354,6 +361,30 @@ main(int argc, char* argv[])
+@@ -310,6 +315,7 @@ main(int argc, char* argv[])
+ cout << " -e defaultdomain: pass full email address to spamc instead of just\n"
+ " username. Uses 'defaultdomain' if there was none" << endl;
+ cout << " -f: fork into background" << endl;
++ cout << " -g group: socket group (perms to 660 as well)" << endl;
+ cout << " -i: skip (ignore) checks from these IPs or netblocks" << endl;
+ cout << " example: -i 192.168.12.5,10.0.0.0/8,172.16.0.0/255.255.0.0" << endl;
+ cout << " -m: don't modify body, Content-type: or Subject:" << endl;
+@@ -378,6 +384,30 @@ main(int argc, char* argv[])
} else {
debug(D_MISC, "smfi_register succeeded");
}
@@ -78,27 +108,3 @@ diff -up spamass-milter-0.3.1/spamass-milter.cpp.group spamass-milter-0.3.1/spam
debug(D_ALWAYS, "spamass-milter %s starting", PACKAGE_VERSION);
err = smfi_main();
debug(D_ALWAYS, "spamass-milter %s exiting", PACKAGE_VERSION);
-diff -up spamass-milter-0.3.1/spamass-milter.1.in.group spamass-milter-0.3.1/spamass-milter.1.in
---- spamass-milter-0.3.1/spamass-milter.1.in.group 2010-03-24 13:30:19.026834927 +0000
-+++ spamass-milter-0.3.1/spamass-milter.1.in 2010-03-24 13:30:19.033834685 +0000
-@@ -13,6 +13,7 @@
- .Op Fl D Ar host
- .Op Fl e Ar defaultdomain
- .Op Fl f
-+.Op Fl g Ar group
- .Op Fl i Ar networks
- .Op Fl I
- .Op Fl m
-@@ -108,6 +109,12 @@ flag.
- Causes
- .Nm
- to fork into the background.
-+.It Fl g Ar group
-+Makes the socket for communication with the MTA group-writable (mode 0750)
-+and sets the socket's group to
-+.Ar group .
-+This option is intended for use with MTA's like Postfix that do not run as
-+root, and is incompatible with Sendmail usage.
- .It Fl i Ar networks
- Ignores messages if the originating IP is in the network(s) listed.
- The message will be passed through without calling SpamAssassin at all.
diff --git a/spamass-milter-0.3.1-pathnames.patch b/spamass-milter-0.4.0-pathnames.patch
similarity index 74%
rename from spamass-milter-0.3.1-pathnames.patch
rename to spamass-milter-0.4.0-pathnames.patch
index 8c90367..f3f95ab 100644
--- a/spamass-milter-0.3.1-pathnames.patch
+++ b/spamass-milter-0.4.0-pathnames.patch
@@ -1,6 +1,5 @@
-diff -up spamass-milter-0.3.1/README.pathnames spamass-milter-0.3.1/README
---- spamass-milter-0.3.1/README.pathnames 2010-03-23 20:54:37.630904869 +0000
-+++ spamass-milter-0.3.1/README 2010-03-23 20:55:22.007964867 +0000
+--- README
++++ README
@@ -42,7 +42,7 @@ put the spamass-milter binary and set th
you want to use. YOU WILL MOST LIKELY HAVE TO EDIT THE VARIABLES ON
TOP OF THIS FILE.
@@ -18,4 +17,4 @@ diff -up spamass-milter-0.3.1/README.pathnames spamass-milter-0.3.1/README
+INPUT_MAIL_FILTER(`spamassassin', `S=unix:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
define(`confMILTER_MACROS_ENVRCPT',confMILTER_MACROS_ENVRCPT`, b, r, v, Z')dnl
- should do the trick. Of course you need to modify the path of the
+
diff --git a/spamass-milter-0.3.2-rcvd.patch b/spamass-milter-0.4.0-rcvd.patch
similarity index 69%
rename from spamass-milter-0.3.2-rcvd.patch
rename to spamass-milter-0.4.0-rcvd.patch
index 7db55b1..35de10f 100644
--- a/spamass-milter-0.3.2-rcvd.patch
+++ b/spamass-milter-0.4.0-rcvd.patch
@@ -9,10 +9,9 @@ https://savannah.nongnu.org/bugs/index.php?17178
http://bugs.debian.org/510665
http://bugzilla.redhat.com/496763
-diff -up spamass-milter-0.3.2/spamass-milter.cpp.rcvd spamass-milter-0.3.2/spamass-milter.cpp
---- spamass-milter-0.3.2/spamass-milter.cpp.rcvd 2011-02-15 10:46:55.000000000 +0000
-+++ spamass-milter-0.3.2/spamass-milter.cpp 2011-02-15 10:50:25.538111680 +0000
-@@ -966,7 +966,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+--- spamass-milter.cpp
++++ spamass-milter.cpp
+@@ -996,7 +996,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
assassin->output((string)
"Received: from "+macro_s+" ("+macro__+")\r\n\t"+
diff --git a/spamass-milter-0.3.2-rundir.patch b/spamass-milter-0.4.0-rundir.patch
similarity index 67%
rename from spamass-milter-0.3.2-rundir.patch
rename to spamass-milter-0.4.0-rundir.patch
index ec08358..4701bec 100644
--- a/spamass-milter-0.3.2-rundir.patch
+++ b/spamass-milter-0.4.0-rundir.patch
@@ -1,18 +1,5 @@
-diff -up spamass-milter-0.3.2/README.orig spamass-milter-0.3.2/README
---- spamass-milter-0.3.2/README.orig 2011-07-25 15:23:45.490316629 +0100
-+++ spamass-milter-0.3.2/README 2011-07-25 15:27:47.647628663 +0100
-@@ -54,7 +54,7 @@ Now you need to make sendmail use the pl
- configuring sendmail through m4 & the sendmail.mc files. In this case
- adding the lines
-
--INPUT_MAIL_FILTER(`spamassassin', `S=unix:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
-+INPUT_MAIL_FILTER(`spamassassin', `S=unix:/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
- define(`confMILTER_MACROS_ENVRCPT',confMILTER_MACROS_ENVRCPT`, b, r, v, Z')dnl
-
- should do the trick. Of course you need to modify the path of the
-diff -up spamass-milter-0.3.2/README.Postfix.orig spamass-milter-0.3.2/README.Postfix
---- spamass-milter-0.3.2/README.Postfix.orig 2011-07-21 16:37:39.731590093 +0100
-+++ spamass-milter-0.3.2/README.Postfix 2011-07-25 15:26:45.575801806 +0100
+--- README.Postfix
++++ README.Postfix
@@ -2,12 +2,12 @@ Installing the spamass-milter-postfix pa
of spamass-milter to be more Postfix-friendly, i.e.:
@@ -28,3 +15,14 @@ diff -up spamass-milter-0.3.2/README.Postfix.orig spamass-milter-0.3.2/README.Po
For further information, see:
http://www.postfix.org/MILTER_README.html
+--- README
++++ README
+@@ -54,7 +54,7 @@ Now you need to make sendmail use the pl
+ configuring sendmail through m4 & the sendmail.mc files. In this case
+ adding the lines
+
+-INPUT_MAIL_FILTER(`spamassassin', `S=unix:/var/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
++INPUT_MAIL_FILTER(`spamassassin', `S=unix:/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
+ define(`confMILTER_MACROS_ENVRCPT',confMILTER_MACROS_ENVRCPT`, b, r, v, Z')dnl
+
+
diff --git a/spamass-milter.spec b/spamass-milter.spec
index cc1e04d..b9d3cd2 100644
--- a/spamass-milter.spec
+++ b/spamass-milter.spec
@@ -26,12 +26,12 @@
Summary: Milter (mail filter) for spamassassin
Name: spamass-milter
-Version: 0.3.2
-Release: 15%{?dist}
+Version: 0.4.0
+Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://savannah.nongnu.org/projects/spamass-milt/
-Source0: http://savannah.nongnu.org/download/spamass-milt/spamass-milter-%{version}.tar.bz2
+Source0: http://savannah.nongnu.org/download/spamass-milt/spamass-milter-%{version}.tar.gz
Source1: spamass-milter.README.Postfix
Source2: spamass-milter-tmpfs.conf
Source3: spamass-milter-postfix-tmpfs.conf
@@ -45,18 +45,15 @@ Source22: spamass-milter-sysconfig.systemd
Source23: spamass-milter-postfix-sysconfig.systemd
# Patches submitted upstream:
# http://savannah.nongnu.org/bugs/?29326
-Patch0: spamass-milter-0.3.2-syntax.patch
-Patch2: spamass-milter-0.3.1-authuser.patch
-Patch3: spamass-milter-0.3.2-rcvd.patch
-Patch4: spamass-milter-0.3.2-bits.patch
-Patch5: spamass-milter-0.3.1-group.patch
-Patch6: spamass-milter-0.3.2-rejecttext.patch
+Patch2: spamass-milter-0.4.0-authuser.patch
+Patch3: spamass-milter-0.4.0-rcvd.patch
+Patch4: spamass-milter-0.4.0-bits.patch
+Patch5: spamass-milter-0.4.0-group.patch
# Patches not yet submitted upstream
-Patch7: spamass-milter-0.3.1-ipv6.patch
-Patch8: spamass-milter-0.3.2-auth-no-ssf.patch
+Patch8: spamass-milter-0.4.0-auth-no-ssf.patch
# Fedora-specific patches
-Patch10: spamass-milter-0.3.1-pathnames.patch
-Patch11: spamass-milter-0.3.2-rundir.patch
+Patch10: spamass-milter-0.4.0-pathnames.patch
+Patch11: spamass-milter-0.4.0-rundir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRequires: spamassassin, sendmail-devel
Requires: spamassassin, /usr/sbin/sendmail
@@ -105,38 +102,32 @@ cp -p %{SOURCE1} README.Postfix
cp -p %{SOURCE2} spamass-milter-tmpfs.conf
cp -p %{SOURCE3} spamass-milter-postfix-tmpfs.conf
-# Address compiler warnings
-%patch0 -p1 -b .syntax
-
-# Add -I option to ignore (don't check) mail from authenticated users
-# (#437506, #496767) http://savannah.nongnu.org/bugs/?21046
-%patch2 -p1 -b .authuser
-
# Fix Received-header generation (#496763)
-%patch3 -p1 -b .rcvd
+%patch3 -b .rcvd
# Add authentication info to dummy Received-header (#496769)
-%patch4 -p1 -b .bits
+%patch4 -b .bits
# Add -g option for group-writable socket for Postfix support (#452248)
-%patch5 -p1 -b .group
-
-# Add -R option to specify SMTP rejection text (#1131667)
-# http://savannah.nongnu.org/patch/?func=detailitem&item_id=5189
-%patch6 -b .rejecttext
-
-# Add IPv6 whitelisting support
-%patch7 -p1 -b .ipv6
+%patch5 -b .group
# Help for users authenticating to Postfix (#730308)
-%patch8 -p1 -b .postfix-auth
+%patch8 -b .postfix-auth
# Local patch for initscript and socket paths
-%patch10 -p1 -b .pathnames
+%patch10 -b .pathnames
+
+# Add -I option to ignore (don't check) mail from authenticated users
+# (#437506, #496767) http://savannah.nongnu.org/bugs/?21046
+# Note: upstream introduced a similar -a option in version 0.4.0, so this
+# option is retained only in builds prior to Fedora 22 for compatibility
+%if 0%{?fedora} < 22 && 0%{?rhel} < 8
+%patch2 -b .authuser
+%endif
# With systemd, the runtime directory is /run rather than /var/run
%if %{use_systemd}
-%patch11 -p1 -b .rundir
+%patch11 -b .rundir
%endif
# Copy in SysV init files
@@ -220,7 +211,7 @@ if [ $1 -eq 1 ]; then
%else
/sbin/chkconfig --add spamass-milter || :
%endif
-%if 0%{?fedora} >= 18
+%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
/bin/systemctl preset spamass-milter.service &>/dev/null || :
/bin/systemctl preset spamass-milter-root.service &>/dev/null || :
%endif
@@ -300,6 +291,21 @@ fi
%ghost %{rundir}/spamass-milter/postfix/sock
%changelog
+* Thu Feb 26 2015 Paul Howarth <paul at city-fan.org> - 0.4.0-1
+- Update to 0.4.0
+ - New options:
+ -C option to change the default reject code
+ -S option to specify a path to sendmail (for the -x option)
+ -R option to specify the rejection message
+ -a option to skip messages that were authenticated
+ - IPv6 address support
+ - Syntax clean-ups
+- Drop upstreamed syntax, rejection text and IPv6 patches
+- Update authuser patch: note that upstream has introduced a -a option that
+ does pretty much the same as the -I option added by this patch, so this
+ patch is deprecated and will not be included in builds for Fedora 22 onwards
+- Clean up other patches to apply cleanly
+
* Tue Feb 24 2015 Paul Howarth <paul at city-fan.org> - 0.3.2-15
- Add -R option to specify SMTP rejection text (#1131667)
- Drop %%defattr, redundant since rpm 4.4
More information about the scm-commits
mailing list