rpms/spamass-milter/F-12 spamass-milter-0.3.1-syntax.patch, NONE, 1.1 spamass-milter-0.3.1-authuser.patch, 1.2, 1.3 spamass-milter-0.3.1-bits.patch, 1.2, 1.3 spamass-milter-0.3.1-group.patch, 1.1, 1.2 spamass-milter-0.3.1-pathnames.patch, 1.1, 1.2 spamass-milter-0.3.1-popen.patch, 1.1, 1.2 spamass-milter-0.3.1-rcvd.patch, 1.1, 1.2 spamass-milter.spec, 1.23, 1.24 spamass-milter-0.3.1-prototype.patch, 1.1, NONE
Paul Howarth
pghmcfc at fedoraproject.org
Thu Mar 25 10:58:36 UTC 2010
- Previous message: rpms/arptables_jf/F-11 arptables_jf-0.0.8-byteorder.patch, NONE, 1.1 arptables_jf.spec, 1.22, 1.23
- Next message: rpms/spamass-milter/F-13 spamass-milter-0.3.1-syntax.patch, NONE, 1.1 spamass-milter-0.3.1-authuser.patch, 1.2, 1.3 spamass-milter-0.3.1-bits.patch, 1.2, 1.3 spamass-milter-0.3.1-group.patch, 1.1, 1.2 spamass-milter-0.3.1-pathnames.patch, 1.1, 1.2 spamass-milter-0.3.1-popen.patch, 1.1, 1.2 spamass-milter-0.3.1-rcvd.patch, 1.1, 1.2 spamass-milter.spec, 1.23, 1.24 spamass-milter-0.3.1-prototype.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pghmcfc
Update of /cvs/pkgs/rpms/spamass-milter/F-12
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv10540/F-12
Modified Files:
spamass-milter-0.3.1-authuser.patch
spamass-milter-0.3.1-bits.patch
spamass-milter-0.3.1-group.patch
spamass-milter-0.3.1-pathnames.patch
spamass-milter-0.3.1-popen.patch
spamass-milter-0.3.1-rcvd.patch spamass-milter.spec
Added Files:
spamass-milter-0.3.1-syntax.patch
Removed Files:
spamass-milter-0.3.1-prototype.patch
Log Message:
* Tue Mar 23 2010 Paul Howarth <paul at city-fan.org> 0.3.1-18
- Add patch to get rid of compiler warnings
- Reorder and re-base patches to optimize chances of upstream accepting them
- Improve Received-header patch (#496763) incorporating additional fix from
upstream update (http://savannah.nongnu.org/bugs/?17178)
spamass-milter-0.3.1-syntax.patch:
spamass-milter.cpp | 51 ++++++++++++++++++++++++++++-----------------------
spamass-milter.h | 2 +-
2 files changed, 29 insertions(+), 24 deletions(-)
--- NEW FILE spamass-milter-0.3.1-syntax.patch ---
Fix compiler warnings in recent gcc versions, mainly relating to deprecated
conversions from string constants to char *.
Most of these relate to missing "const" declarations in the libmilter API
so I just used const_cast to clear them. For non libmilter-related issues,
I tried to fix them more cleanly.
The only other change of note is to check the result of the fwrite()
function and log a warning if all of the data wasn't written (this is in
the spambucket code).
diff -up spamass-milter-0.3.1/spamass-milter.cpp.syntax spamass-milter-0.3.1/spamass-milter.cpp
--- spamass-milter-0.3.1/spamass-milter.cpp.syntax 2006-03-23 21:41:36.000000000 +0000
+++ spamass-milter-0.3.1/spamass-milter.cpp 2010-03-23 16:44:54.570023100 +0000
@@ -129,9 +129,11 @@ int daemon(int nochdir, int noclose);
static const char Id[] = "$Id: spamass-milter.cpp,v 1.90 2006/03/23 21:41:36 dnelson Exp $";
+static char FilterName[] = "SpamAssassin";
+
struct smfiDesc smfilter =
{
- "SpamAssassin", // filter name
+ FilterName, // filter name
SMFI_VERSION, // version code -- leave untouched
SMFIF_ADDHDRS|SMFIF_CHGHDRS|SMFIF_CHGBODY, // flags
mlfi_connect, // info filter callback
@@ -361,7 +363,7 @@ main(int argc, char* argv[])
// }}}
/* Update a header if SA changes it, or add it if it is new. */
-void update_or_insert(SpamAssassin* assassin, SMFICTX* ctx, string oldstring, t_setter setter, char *header )
+void update_or_insert(SpamAssassin* assassin, SMFICTX* ctx, string oldstring, t_setter setter, const char *header )
{
string::size_type eoh1 = assassin->d().find("\n\n");
string::size_type eoh2 = assassin->d().find("\n\r\n");
@@ -387,12 +389,12 @@ void update_or_insert(SpamAssassin* assa
if (oldsize > 0)
{
debug(D_UORI, "u_or_i: changing");
- smfi_chgheader(ctx, header, 1, newstring.size() > 0 ?
+ smfi_chgheader(ctx, const_cast<char*>(header), 1, newstring.size() > 0 ?
cstr : NULL );
} else if (newstring.size() > 0)
{
debug(D_UORI, "u_or_i: inserting");
- smfi_addheader(ctx, header, cstr);
+ smfi_addheader(ctx, const_cast<char*>(header), cstr);
}
} else
{
@@ -452,7 +454,7 @@ assassinate(SMFICTX* ctx, SpamAssassin*
if (do_reject)
{
debug(D_MISC, "Rejecting");
- smfi_setreply(ctx, "550", "5.7.1", "Blocked by SpamAssassin");
+ smfi_setreply(ctx, const_cast<char*>("550"), const_cast<char*>("5.7.1"), const_cast<char*>("Blocked by SpamAssassin"));
if (flag_bucket)
@@ -470,7 +472,7 @@ assassinate(SMFICTX* ctx, SpamAssassin*
#else
char buf[1024];
#endif
- char *fmt="%s \"%s\"";
+ const char *fmt="%s \"%s\"";
FILE *p;
#if defined(HAVE_ASPRINTF)
@@ -500,7 +502,10 @@ assassinate(SMFICTX* ctx, SpamAssassin*
} else
{
// Send message provided by SpamAssassin
- fwrite(assassin->d().c_str(), assassin->d().size(), 1, p);
+ if (fwrite(assassin->d().c_str(), assassin->d().size(), 1, p) != 1)
+ {
+ debug(D_COPY, "fwrite incomplete (%s) when copying to spambucket", strerror(errno));
+ }
pclose(p); p = NULL;
}
#if defined(__FreeBSD__)
@@ -531,7 +536,7 @@ assassinate(SMFICTX* ctx, SpamAssassin*
// time. Note, this may generate multiple X-Spam-Orig-To
// headers, but that's okay.
while( !assassin->recipients.empty()) {
- if ( smfi_addheader( ctx, "X-Spam-Orig-To", (char *)assassin->recipients.front().c_str()) != MI_SUCCESS ) {
+ if ( smfi_addheader( ctx, const_cast<char *>("X-Spam-Orig-To"), (char *)assassin->recipients.front().c_str()) != MI_SUCCESS ) {
throw string( "Failed to save recipient" );
}
@@ -774,7 +779,7 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
{
SpamAssassin* assassin;
struct context *sctx = (struct context *)smfi_getpriv(ctx);
- char *queueid;
+ const char *queueid;
if (sctx == NULL)
{
@@ -801,7 +806,7 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
// remember the MAIL FROM address
assassin->set_from(string(envfrom[0]));
- queueid=smfi_getsymval(ctx,"i");
+ queueid=smfi_getsymval(ctx, const_cast<char *>("i"));
if (!queueid)
{
queueid="unknown";
@@ -842,7 +847,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
/* open a pipe to sendmail so we can do address expansion */
char buf[1024];
- char *fmt="%s -bv \"%s\" 2>&1";
+ const char *fmt="%s -bv \"%s\" 2>&1";
#if defined(HAVE_SNPRINTF)
snprintf(buf, sizeof(buf)-1, fmt, SENDMAIL, envrcpt[0]);
@@ -928,7 +933,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
char date[32];
/* RFC 822 date. */
- macro_b = smfi_getsymval(ctx, "b");
+ macro_b = smfi_getsymval(ctx, const_cast<char *>("b"));
if (!macro_b)
{
time_t tval;
@@ -939,7 +944,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* queue ID */
- macro_i = smfi_getsymval(ctx, "i");
+ macro_i = smfi_getsymval(ctx, const_cast<char *>("i"));
if (!macro_i)
{
macro_i = "unknown";
@@ -947,7 +952,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* FQDN of this site */
- macro_j = smfi_getsymval(ctx, "j");
+ macro_j = smfi_getsymval(ctx, const_cast<char *>("j"));
if (!macro_j)
{
macro_j = "localhost";
@@ -955,7 +960,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* Protocol used to receive the message */
- macro_r = smfi_getsymval(ctx, "r");
+ macro_r = smfi_getsymval(ctx, const_cast<char *>("r"));
if (!macro_r)
{
macro_r = "SMTP";
@@ -967,14 +972,14 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
fixed. Until that day, use the value remembered by
mlfi_helo()
*/
- macro_s = smfi_getsymval(ctx, "s");
+ macro_s = smfi_getsymval(ctx, const_cast<char *>("s"));
if (!macro_s)
macro_s = sctx->helo;
if (!macro_s)
macro_s = "nohelo";
/* Sendmail binary version */
- macro_v = smfi_getsymval(ctx, "v");
+ macro_v = smfi_getsymval(ctx, const_cast<char *>("v"));
if (!macro_v)
{
macro_v = "8.13.0";
@@ -982,7 +987,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* Sendmail .cf version */
- macro_Z = smfi_getsymval(ctx, "Z");
+ macro_Z = smfi_getsymval(ctx, const_cast<char *>("Z"));
if (!macro_Z)
{
macro_Z = "8.13.0";
@@ -990,7 +995,7 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* Validated sending site's address */
- macro__ = smfi_getsymval(ctx, "_");
+ macro__ = smfi_getsymval(ctx, const_cast<char *>("_"));
if (!macro__)
{
macro__ = "unknown";
@@ -1378,10 +1383,10 @@ void SpamAssassin::Connect()
// XXX arbitrary 100-argument max
int argc = 0;
char** argv = (char**) malloc(100*sizeof(char*));
- argv[argc++] = SPAMC;
+ argv[argc++] = strdup(SPAMC);
if (flag_sniffuser)
{
- argv[argc++] = "-u";
+ argv[argc++] = strdup("-u");
if ( expandedrcpt.size() != 1 )
{
// More (or less?) than one recipient, so we pass the default
@@ -1406,7 +1411,7 @@ void SpamAssassin::Connect()
}
if (spamdhost)
{
- argv[argc++] = "-d";
+ argv[argc++] = strdup("-d");
argv[argc++] = spamdhost;
}
if (spamc_argc)
@@ -2148,7 +2153,7 @@ char *strlwr(char *str)
}
/* Log a message about missing milter macros, but only the first time */
-void warnmacro(char *macro, char *scope)
+void warnmacro(const char *macro, const char *scope)
{
if (warnedmacro)
return;
diff -up spamass-milter-0.3.1/spamass-milter.h.syntax spamass-milter-0.3.1/spamass-milter.h
--- spamass-milter-0.3.1/spamass-milter.h.syntax 2006-03-23 22:07:55.000000000 +0000
+++ spamass-milter-0.3.1/spamass-milter.h 2010-03-23 16:29:58.281863158 +0000
@@ -185,6 +185,6 @@ void parse_networklist(char *string, str
int ip_in_networklist(struct in_addr ip, struct networklist *list);
void parse_debuglevel(char* string);
char *strlwr(char *str);
-void warnmacro(char *macro, char *scope);
+void warnmacro(const char *macro, const char *scope);
#endif
spamass-milter-0.3.1-authuser.patch:
spamass-milter.1.in | 3 +++
spamass-milter.cpp | 26 ++++++++++++++++++++++++--
2 files changed, 27 insertions(+), 2 deletions(-)
Index: spamass-milter-0.3.1-authuser.patch
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter-0.3.1-authuser.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- spamass-milter-0.3.1-authuser.patch 22 Mar 2010 16:14:50 -0000 1.2
+++ spamass-milter-0.3.1-authuser.patch 25 Mar 2010 10:58:35 -0000 1.3
@@ -1,6 +1,7 @@
---- spamass-milter-0.3.1/spamass-milter.cpp.authuser 2010-03-18 15:38:38.414240811 +0000
-+++ spamass-milter-0.3.1/spamass-milter.cpp 2010-03-18 15:39:27.751241308 +0000
-@@ -172,6 +172,7 @@
+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 */
bool flag_expand = false; /* alias/virtusertable expansion */
bool warnedmacro = false; /* have we logged that we couldn't fetch a macro? */
@@ -8,16 +9,16 @@
// {{{ main()
-@@ -179,7 +180,7 @@
+@@ -179,7 +180,7 @@ int
main(int argc, char* argv[])
{
int c, err = 0;
-- const char *args = "fd:mMp:P:r:u:D:i:b:B:e:xg:";
-+ const char *args = "fd:mMp:P:r:u:D:i:Ib:B:e:xg:";
+- 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";
char *sock = NULL;
- char *group = NULL;
bool dofork = false;
-@@ -212,6 +213,10 @@
+ char *pidfilename = NULL;
+@@ -211,6 +212,10 @@ main(int argc, char* argv[])
debug(D_MISC, "Parsing ignore list");
parse_networklist(optarg, &ignorenets);
break;
@@ -28,7 +29,7 @@
case 'm':
dontmodifyspam = true;
smfilter.xxfi_flags &= ~SMFIF_CHGBODY;
-@@ -282,7 +287,7 @@
+@@ -278,7 +283,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;
@@ -37,7 +38,7 @@
cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl;
cout << " [-- spamc args ]" << endl;
cout << " -p socket: path to create socket" << endl;
-@@ -297,6 +302,7 @@
+@@ -292,6 +297,7 @@ main(int argc, char* argv[])
cout << " -f: fork into background" << 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;
@@ -45,7 +46,7 @@
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;
-@@ -773,6 +779,22 @@
+@@ -746,6 +752,22 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
}
/* debug(D_ALWAYS, "ZZZ got private context %p", sctx); */
@@ -53,7 +54,7 @@
+ {
+ char *auth_authen;
+
-+ auth_authen = smfi_getsymval(ctx, "{auth_authen}");
++ auth_authen = smfi_getsymval(ctx, const_cast<char *>("{auth_authen}"));
+ debug(D_MISC, "auth_authen=%s", auth_authen ?: "<unauthenticated>");
+
+ if (auth_authen)
@@ -68,17 +69,18 @@
debug(D_FUNC, "mlfi_envfrom: enter");
try {
// launch new SpamAssassin
---- spamass-milter-0.3.1/spamass-milter.1.in.authuser 2010-03-18 15:38:38.407240309 +0000
-+++ spamass-milter-0.3.1/spamass-milter.1.in 2010-03-18 15:38:38.417240342 +0000
-@@ -15,6 +15,7 @@
+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 g Ar group
.Op Fl i Ar networks
+.Op Fl I
.Op Fl m
.Op Fl M
.Op Fl P Ar pidfile
-@@ -126,6 +127,8 @@
+@@ -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.
spamass-milter-0.3.1-bits.patch:
README | 16 +++++-
spamass-milter.cpp | 133 +++++++++++++++++++++++++++++++++++++++--------------
spamass-milter.h | 8 +--
3 files changed, 117 insertions(+), 40 deletions(-)
Index: spamass-milter-0.3.1-bits.patch
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter-0.3.1-bits.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- spamass-milter-0.3.1-bits.patch 22 Mar 2010 16:14:51 -0000 1.2
+++ spamass-milter-0.3.1-bits.patch 25 Mar 2010 10:58:35 -0000 1.3
@@ -1,17 +1,25 @@
+Add authenticated bits information into the dummy generated
+Received-header for SpamAssassin to facilitate adding a rule
+to score mail from authenticated clients.
+
+Discussion:
+http://bugzilla.redhat.com/496769
+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.1/README.bits spamass-milter-0.3.1/README
---- spamass-milter-0.3.1/README.bits 2010-03-22 14:50:10.404092602 +0000
-+++ spamass-milter-0.3.1/README 2010-03-22 14:51:26.198958883 +0000
-@@ -54,15 +54,27 @@ Now you need to make sendmail use the pl
- configuring sendmail through m4 & the sendmail.mc files. In this case
+--- spamass-milter-0.3.1/README.bits 2005-08-15 16:10:47.000000000 +0100
++++ spamass-milter-0.3.1/README 2010-03-23 20:53:44.477918068 +0000
+@@ -55,14 +55,26 @@ configuring sendmail through m4 & the se
adding the lines
--INPUT_MAIL_FILTER(`spamassassin', `S=unix:%{_localstatedir}/run/spamass-milter/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
+ 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
--
-+INPUT_MAIL_FILTER(`spamassassin', `S=unix:%{_localstatedir}/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
socket if you put another one into the startup script. The timeouts
have been increased somewhat because SpamAssassin may chew on it for a
@@ -34,9 +42,9 @@ diff -up spamass-milter-0.3.1/README.bit
with the setup to make sure it is working.
diff -up spamass-milter-0.3.1/spamass-milter.cpp.bits spamass-milter-0.3.1/spamass-milter.cpp
---- spamass-milter-0.3.1/spamass-milter.cpp.bits 2010-03-22 14:50:10.433025554 +0000
-+++ spamass-milter-0.3.1/spamass-milter.cpp 2010-03-22 14:53:16.528833350 +0000
-@@ -736,6 +736,7 @@ sfsistat
+--- spamass-milter-0.3.1/spamass-milter.cpp.bits 2010-03-23 20:52:11.178272813 +0000
++++ spamass-milter-0.3.1/spamass-milter.cpp 2010-03-23 20:52:11.182271053 +0000
+@@ -741,6 +741,7 @@ sfsistat
mlfi_connect(SMFICTX * ctx, char *hostname, _SOCK_ADDR * hostaddr)
{
struct context *sctx;
@@ -44,7 +52,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
int rv;
debug(D_FUNC, "mlfi_connect: enter");
-@@ -753,8 +754,31 @@ mlfi_connect(SMFICTX * ctx, char *hostna
+@@ -758,8 +759,31 @@ mlfi_connect(SMFICTX * ctx, char *hostna
}
sctx->assassin = NULL;
sctx->helo = NULL;
@@ -57,7 +65,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
+ sctx->auth_ssf = NULL;
+
+ /* store our FQDN */
-+ macro_j = smfi_getsymval(ctx, "j");
++ macro_j = smfi_getsymval(ctx, const_cast<char *>("j"));
+ if (!macro_j)
+ {
+ macro_j = "localhost";
@@ -66,7 +74,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
+ sctx->our_fqdn = strdup(macro_j);
+
+ /* store the validated sending site's address */
-+ macro__ = smfi_getsymval(ctx, "_");
++ macro__ = smfi_getsymval(ctx, const_cast<char *>("_"));
+ if (!macro__)
+ {
+ macro__ = "unknown";
@@ -78,23 +86,23 @@ diff -up spamass-milter-0.3.1/spamass-mi
rv = smfi_setpriv(ctx, sctx);
if (rv != MI_SUCCESS)
{
-@@ -803,7 +827,7 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
+@@ -808,7 +832,7 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
{
SpamAssassin* assassin;
struct context *sctx = (struct context *)smfi_getpriv(ctx);
-- char *queueid;
+- const char *queueid;
+ const char *queueid, *macro_auth_ssf, *macro_auth_authen;
if (sctx == NULL)
{
-@@ -829,17 +853,44 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
+@@ -834,17 +858,44 @@ mlfi_envfrom(SMFICTX* ctx, char** envfro
// remember the MAIL FROM address
assassin->set_from(string(envfrom[0]));
-
+
+ // remember the queueid for this message
- queueid=smfi_getsymval(ctx,"i");
+ queueid=smfi_getsymval(ctx, const_cast<char *>("i"));
if (!queueid)
{
queueid="unknown";
@@ -106,7 +114,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
debug(D_MISC, "queueid=%s", queueid);
+ // remember the SMTP AUTH login name
-+ macro_auth_authen = smfi_getsymval(ctx, "{auth_authen}");
++ macro_auth_authen = smfi_getsymval(ctx, const_cast<char *>("{auth_authen}"));
+ if (!macro_auth_authen)
+ {
+ macro_auth_authen = "";
@@ -122,7 +130,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
+ sctx->auth_authen = strdup(macro_auth_authen);
+
+ // remember the SASL cipher bits
-+ macro_auth_ssf = smfi_getsymval(ctx, "{auth_ssf}");
++ macro_auth_ssf = smfi_getsymval(ctx, const_cast<char *>("{auth_ssf}"));
+ if (!macro_auth_ssf)
+ {
+ macro_auth_ssf = "";
@@ -135,7 +143,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
// tell Milter to continue
debug(D_FUNC, "mlfi_envfrom: exit");
-@@ -953,7 +1004,8 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -958,7 +1009,8 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
*/
const char *macro_b, *macro_i, *macro_j, *macro_r,
@@ -145,11 +153,11 @@ diff -up spamass-milter-0.3.1/spamass-mi
char date[32];
/* RFC 822 date. */
-@@ -968,20 +1020,13 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -973,20 +1025,13 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
}
/* queue ID */
-- macro_i = smfi_getsymval(ctx, "i");
+- macro_i = smfi_getsymval(ctx, const_cast<char *>("i"));
- if (!macro_i)
- {
- macro_i = "unknown";
@@ -158,7 +166,7 @@ diff -up spamass-milter-0.3.1/spamass-mi
+ macro_i = sctx->queueid;
- /* FQDN of this site */
-- macro_j = smfi_getsymval(ctx, "j");
+- macro_j = smfi_getsymval(ctx, const_cast<char *>("j"));
- if (!macro_j)
- {
- macro_j = "localhost";
@@ -171,8 +179,8 @@ diff -up spamass-milter-0.3.1/spamass-mi
+ macro__ = sctx->sender_address;
/* Protocol used to receive the message */
- macro_r = smfi_getsymval(ctx, "r");
-@@ -990,7 +1035,11 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+ macro_r = smfi_getsymval(ctx, const_cast<char *>("r"));
+@@ -995,7 +1040,11 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
macro_r = "SMTP";
warnmacro("r", "ENVRCPT");
}
@@ -185,45 +193,45 @@ diff -up spamass-milter-0.3.1/spamass-mi
/* 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
-@@ -1018,22 +1067,24 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
+@@ -1023,22 +1072,25 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
warnmacro("Z", "ENVRCPT");
}
- /* Validated sending site's address */
-- macro__ = smfi_getsymval(ctx, "_");
+- macro__ = smfi_getsymval(ctx, const_cast<char *>("_"));
- if (!macro__)
-- {
-- macro__ = "unknown";
-- warnmacro("_", "ENVRCPT");
-- }
--
- assassin->output((string)"X-Envelope-From: "+assassin->from()+"\r\n");
- assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
-
-- assassin->output((string)
-- "Received: from "+macro_s+" ("+macro__+")\r\n\t"+
-- "by "+macro_j+" ("+macro_v+"/"+macro_Z+") with "+macro_r+" id "+macro_i+"\r\n\t"+
-- macro_b+"\r\n\t"+
-- "(envelope-from "+assassin->from()+")\r\n");
++ assassin->output((string)"X-Envelope-From: "+assassin->from()+"\r\n");
++ assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
++
+ string rec_header;
+
+ rec_header = (string) "Received: from " + macro_s + " (" + macro__ + ")\r\n\t";
+
-+ if (strlen(macro_auth_ssf)) {
++ if (strlen(macro_auth_ssf))
+ {
+- macro__ = "unknown";
+- warnmacro("_", "ENVRCPT");
+ rec_header += (string) "(authenticated bits=" + macro_auth_ssf + ")\r\n\t";
-+ }
-+
+ }
+
+- assassin->output((string)"X-Envelope-From: "+assassin->from()+"\r\n");
+- assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
+ rec_header += (string) "by " + macro_j + " (" + macro_v + "/" + macro_Z + ") with " +
-+ macro_r + " id " + macro_i + "\r\n\t" +
++ macro_r + " id " + macro_i + ";\r\n\t" +
+ macro_b + "\r\n\t" +
+ "(envelope-from " + assassin->from() + ")\r\n";
-+
+
+- assassin->output((string)
+- "Received: from "+macro_s+" ("+macro__+")\r\n\t"+
+- "by "+macro_j+" ("+macro_v+"/"+macro_Z+") with "+macro_r+" id "+macro_i+";\r\n\t"+
+- macro_b+"\r\n\t"+
+- "(envelope-from "+assassin->from()+")\r\n");
+ debug(D_SPAMC, "Received header for spamc: %s", rec_header.c_str());
+ assassin->output(rec_header);
} else
assassin->output((string)"X-Envelope-To: "+envrcpt[0]+"\r\n");
-@@ -1279,16 +1330,27 @@ mlfi_close(SMFICTX* ctx)
+@@ -1284,16 +1336,27 @@ mlfi_close(SMFICTX* ctx)
{
struct context *sctx;
debug(D_FUNC, "mlfi_close");
@@ -254,8 +262,8 @@ diff -up spamass-milter-0.3.1/spamass-mi
}
diff -up spamass-milter-0.3.1/spamass-milter.h.bits spamass-milter-0.3.1/spamass-milter.h
---- spamass-milter-0.3.1/spamass-milter.h.bits 2006-03-23 22:07:55.000000000 +0000
-+++ spamass-milter-0.3.1/spamass-milter.h 2010-03-22 14:51:52.766971871 +0000
+--- spamass-milter-0.3.1/spamass-milter.h.bits 2010-03-23 20:52:11.171272762 +0000
++++ spamass-milter-0.3.1/spamass-milter.h 2010-03-23 20:52:11.183271628 +0000
@@ -154,9 +154,6 @@ public:
// List of recipients after alias/virtusertable expansion
list <string> expandedrcpt;
spamass-milter-0.3.1-group.patch:
spamass-milter.1.in | 7 +++++++
spamass-milter.cpp | 33 ++++++++++++++++++++++++++++++++-
2 files changed, 39 insertions(+), 1 deletion(-)
Index: spamass-milter-0.3.1-group.patch
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter-0.3.1-group.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- spamass-milter-0.3.1-group.patch 2 Feb 2009 15:05:30 -0000 1.1
+++ spamass-milter-0.3.1-group.patch 25 Mar 2010 10:58:35 -0000 1.2
@@ -1,5 +1,14 @@
---- spamass-milter-0.3.1/spamass-milter.cpp.group 2006-03-23 22:41:36.000000000 +0100
-+++ spamass-milter-0.3.1/spamass-milter.cpp 2008-06-19 18:04:05.000000000 +0200
+Add option -g group to have the milter create a group-writeable socket
+for communication with the MTA and set the GID of the socket to the
+specified group. This makes it possible to use the milter via a
+unix-domain socket with Postfix as the MTA (Postfix doesn't run as
+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 @@
#endif
#include <errno.h>
@@ -9,18 +18,18 @@
// C++ includes
#include <cstdio>
#include <cstddef>
-@@ -181,8 +183,9 @@
+@@ -180,8 +182,9 @@ 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:b:B:e:xg:";
+- 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:";
char *sock = NULL;
+ char *group = NULL;
bool dofork = false;
char *pidfilename = NULL;
FILE *pidfile = NULL;
-@@ -225,6 +228,9 @@
+@@ -228,6 +231,9 @@ main(int argc, char* argv[])
case 'p':
sock = strdup(optarg);
break;
@@ -30,54 +39,57 @@
case 'P':
pidfilename = strdup(optarg);
break;
-@@ -284,6 +290,7 @@
+@@ -287,6 +293,7 @@ main(int argc, char* argv[])
cout << " [-P pidfile] [-r nn] [-u defaultuser] [-x]" << endl;
cout << " [-- spamc args ]" << endl;
cout << " -p socket: path to create socket" << endl;
-+ cout << " -g group: socket group (perms to 750 as well)" << 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;
-@@ -350,6 +357,28 @@
+@@ -354,6 +361,30 @@ main(int argc, char* argv[])
} else {
debug(D_MISC, "smfi_register succeeded");
}
+
-+ if(group) {
-+ struct group *gr;
++ if (group)
++ {
++ struct group *gr;
+
-+ (void) smfi_opensocket(0);
-+ gr = getgrnam(group);
-+ if(gr) {
-+ int rc;
-+ rc = chown(sock, (uid_t)-1, gr->gr_gid);
-+ if(! rc) {
-+ (void) chmod(sock, 0660);
-+ } else {
-+ perror("group option, chmod");
-+ exit(EX_NOPERM);
++ (void) smfi_opensocket(0);
++ gr = getgrnam(group);
++ if (gr)
++ {
++ int rc;
++ rc = chown(sock, (uid_t)-1, gr->gr_gid);
++ if (!rc)
++ {
++ (void) chmod(sock, 0660);
++ } else {
++ perror("group option, chown");
++ exit(EX_NOPERM);
++ }
++ } else {
++ perror("group option, getgrnam");
++ exit(EX_NOUSER);
++ }
+ }
-+ } else {
-+ perror("group option, getgrnam");
-+ exit(EX_NOUSER);
-+ }
-+ }
-+
+
debug(D_ALWAYS, "spamass-milter %s starting", PACKAGE_VERSION);
err = smfi_main();
debug(D_ALWAYS, "spamass-milter %s exiting", PACKAGE_VERSION);
---- spamass-milter-0.3.1/spamass-milter.1.in.group 2008-07-03 14:11:46.000000000 +0100
-+++ spamass-milter-0.3.1/spamass-milter.1.in 2008-07-03 14:18:17.000000000 +0100
+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
- .Op Fl M
-@@ -107,6 +108,12 @@
+@@ -108,6 +109,12 @@ flag.
Causes
.Nm
to fork into the background.
spamass-milter-0.3.1-pathnames.patch:
README | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: spamass-milter-0.3.1-pathnames.patch
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter-0.3.1-pathnames.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- spamass-milter-0.3.1-pathnames.patch 12 Oct 2007 11:29:06 -0000 1.1
+++ spamass-milter-0.3.1-pathnames.patch 25 Mar 2010 10:58:35 -0000 1.2
@@ -1,6 +1,7 @@
---- spamass-milter-0.3.1/README 2007-08-02 15:27:55.000000000 +0100
-+++ spamass-milter-0.3.1/README 2007-08-02 15:31:29.000000000 +0100
-@@ -42,7 +42,7 @@
+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
+@@ -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.
@@ -9,12 +10,12 @@
sure it didn't crash/terminate immediately. If it does, there should
usually be syslog output.
-@@ -54,7 +54,7 @@
+@@ -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=local:/var/run/sendmail/spamass.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl
+INPUT_MAIL_FILTER(`spamassassin', `S=unix:%{_localstatedir}/run/spamass-milter/spamass-milter.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_ENVRCPT',confMILTER_MACROS_ENVRCPT`, b, r, v, Z')dnl
+ should do the trick. Of course you need to modify the path of the
spamass-milter-0.3.1-popen.patch:
spamass-milter.cpp | 156 ++++++++++++++++++++++++++---------------------------
spamass-milter.h | 1
2 files changed, 80 insertions(+), 77 deletions(-)
Index: spamass-milter-0.3.1-popen.patch
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter-0.3.1-popen.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- spamass-milter-0.3.1-popen.patch 22 Mar 2010 16:14:51 -0000 1.1
+++ spamass-milter-0.3.1-popen.patch 25 Mar 2010 10:58:35 -0000 1.2
@@ -1,11 +1,6 @@
-Index: spamass-milter.cpp
-===================================================================
-RCS file: /cvsroot/spamass-milt/spamass-milt/spamass-milter.cpp,v
-retrieving revision 1.91
-diff -u -r1.91 spamass-milter.cpp
---- spamass-milter.cpp 24 Jul 2006 19:59:17 -0000 1.91
-+++ spamass-milter.cpp 10 Mar 2010 18:52:22 -0000
-@@ -171,10 +171,6 @@
+--- spamass-milter.cpp 2010-03-23 20:34:29.069957988 +0000
++++ spamass-milter.cpp 2010-03-23 20:41:02.082834050 +0000
+@@ -175,10 +175,6 @@ 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? */
@@ -16,7 +11,7 @@ diff -u -r1.91 spamass-milter.cpp
// {{{ main()
int
-@@ -461,59 +457,24 @@
+@@ -492,42 +488,15 @@ assassinate(SMFICTX* ctx, SpamAssassin*
send another copy. The milter API will not let you send the
message AND return a failure code to the sender, so this is
the only way to do it. */
@@ -29,8 +24,9 @@ diff -u -r1.91 spamass-milter.cpp
-#else
- char buf[1024];
-#endif
-- char *fmt="%s \"%s\"";
-+ char *popen_argv[3];
+- const char *fmt="%s \"%s\"";
++ char sendmail_prog[] = SENDMAIL;
++ char *const popen_argv[] = { sendmail_prog, spambucket, NULL };
FILE *p;
-#if defined(HAVE_ASPRINTF)
@@ -54,10 +50,6 @@ diff -u -r1.91 spamass-milter.cpp
- }
-#endif
- p = popen(buf, "w");
-+ popen_argv[0] = SENDMAIL;
-+ popen_argv[1] = spambucket;
-+ popen_argv[2] = NULL;
-+
+ debug(D_COPY, "calling %s %s", SENDMAIL, spambucket);
+ p = popenv(popen_argv, "w");
if (!p)
@@ -67,7 +59,10 @@ diff -u -r1.91 spamass-milter.cpp
} else
{
// Send message provided by SpamAssassin
- fwrite(assassin->d().c_str(), assassin->d().size(), 1, p);
+@@ -535,19 +504,8 @@ assassinate(SMFICTX* ctx, SpamAssassin*
+ {
+ debug(D_COPY, "fwrite incomplete (%s) when copying to spambucket", strerror(errno));
+ }
- pclose(p); p = NULL;
+ fclose(p); p = NULL;
}
@@ -85,11 +80,11 @@ diff -u -r1.91 spamass-milter.cpp
}
return SMFIS_REJECT;
}
-@@ -842,30 +803,19 @@
+@@ -927,30 +885,16 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
/* open a pipe to sendmail so we can do address expansion */
char buf[1024];
-- char *fmt="%s -bv \"%s\" 2>&1";
+- const char *fmt="%s -bv \"%s\" 2>&1";
-
-#if defined(HAVE_SNPRINTF)
- snprintf(buf, sizeof(buf)-1, fmt, SENDMAIL, envrcpt[0]);
@@ -97,15 +92,11 @@ diff -u -r1.91 spamass-milter.cpp
- /* XXX possible buffer overflow here */
- sprintf(buf, fmt, SENDMAIL, envrcpt[0]);
-#endif
-+ char *popen_argv[4];
-+
-+ popen_argv[0] = SENDMAIL;
-+ popen_argv[1] = "-bv";
-+ popen_argv[2] = envrcpt[0];
-+ popen_argv[3] = NULL;
-
+-
- debug(D_RCPT, "calling %s", buf);
-+ debug(D_RCPT, "calling %s -bv %s", SENDMAIL, envrcpt[0]);
++ char sendmail_prog[] = SENDMAIL;
++ char sendmail_mode[] = "-bv";
++ char * const popen_argv[] = { sendmail_prog, sendmail_mode, envrcpt[0], NULL };
-#if defined(__FreeBSD__) /* popen bug - see PR bin/50770 */
- rv = pthread_mutex_lock(&popen_mutex);
@@ -115,7 +106,8 @@ diff -u -r1.91 spamass-milter.cpp
- abort();
- }
-#endif
--
++ debug(D_RCPT, "calling %s -bv %s", SENDMAIL, envrcpt[0]);
+
- p = popen(buf, "r");
+ p = popenv(popen_argv, "r");
if (!p)
@@ -125,7 +117,7 @@ diff -u -r1.91 spamass-milter.cpp
assassin->expandedrcpt.push_back(envrcpt[0]);
} else
{
-@@ -890,16 +840,8 @@
+@@ -975,16 +919,8 @@ mlfi_envrcpt(SMFICTX* ctx, char** envrcp
assassin->expandedrcpt.push_back(p+7);
}
}
@@ -143,7 +135,7 @@ diff -u -r1.91 spamass-milter.cpp
} else
{
assassin->expandedrcpt.push_back(envrcpt[0]);
-@@ -2157,5 +2099,71 @@
+@@ -2254,5 +2190,71 @@ void warnmacro(const char *macro, const
warnedmacro = true;
}
@@ -215,17 +207,12 @@ diff -u -r1.91 spamass-milter.cpp
+
// }}}
// vim6:ai:noexpandtab
-Index: spamass-milter.h
-===================================================================
-RCS file: /cvsroot/spamass-milt/spamass-milt/spamass-milter.h,v
-retrieving revision 1.23
-diff -u -r1.23 spamass-milter.h
---- spamass-milter.h 7 Apr 2005 02:04:24 -0000 1.23
-+++ spamass-milter.h 10 Mar 2010 18:52:22 -0000
-@@ -186,5 +186,6 @@
+--- spamass-milter.h 2010-03-23 20:34:29.070958127 +0000
++++ spamass-milter.h 2010-03-23 20:34:29.073958016 +0000
+@@ -188,5 +188,6 @@ int ip_in_networklist(struct in_addr ip,
void parse_debuglevel(char* string);
char *strlwr(char *str);
- void warnmacro(char *macro, char *scope);
+ void warnmacro(const char *macro, const char *scope);
+FILE *popenv(char *const argv[], const char *type);
#endif
spamass-milter-0.3.1-rcvd.patch:
spamass-milter.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: spamass-milter-0.3.1-rcvd.patch
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter-0.3.1-rcvd.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- spamass-milter-0.3.1-rcvd.patch 24 Apr 2009 16:01:25 -0000 1.1
+++ spamass-milter-0.3.1-rcvd.patch 25 Mar 2010 10:58:36 -0000 1.2
@@ -1,3 +1,14 @@
+The code in spamass-milter.cpp that tries to create a
+Sendmail-compatible header is broken and generates a header
+that is incorrectly parsed by SpamAssassin.
+
+This is mostly fixed in CVS apart from the space that needs
+adding prior to the "(" between macro_j and macro_v.
+
+https://savannah.nongnu.org/bugs/index.php?17178
+http://bugs.debian.org/510665
+http://bugzilla.redhat.com/496763
+
--- spamass-milter-0.3.1/spamass-milter.cpp.ori 2006-03-23 15:41:36.000000000 -0600
+++ spamass-milter-0.3.1/spamass-milter.cpp 2009-04-20 20:03:31.000000000 -0500
@@ -1002,9 +1002,9 @@
@@ -5,7 +16,7 @@
assassin->output((string)
"Received: from "+macro_s+" ("+macro__+")\r\n\t"+
- "by "+macro_j+"("+macro_v+"/"+macro_Z+") with "+macro_r+" id "+macro_i+"\r\n\t"+
-+ "by "+macro_j+" ("+macro_v+"/"+macro_Z+") with "+macro_r+" id "+macro_i+"\r\n\t"+
++ "by "+macro_j+" ("+macro_v+"/"+macro_Z+") with "+macro_r+" id "+macro_i+";\r\n\t"+
macro_b+"\r\n\t"+
- "(envelope-from "+assassin->from()+"\r\n");
+ "(envelope-from "+assassin->from()+")\r\n");
Index: spamass-milter.spec
===================================================================
RCS file: /cvs/pkgs/rpms/spamass-milter/F-12/spamass-milter.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -p -r1.23 -r1.24
--- spamass-milter.spec 22 Mar 2010 16:14:51 -0000 1.23
+++ spamass-milter.spec 25 Mar 2010 10:58:36 -0000 1.24
@@ -1,7 +1,7 @@
Summary: Milter (mail filter) for spamassassin
Name: spamass-milter
Version: 0.3.1
-Release: 17%{?dist}
+Release: 18%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://savannah.nongnu.org/projects/spamass-milt/
@@ -10,13 +10,16 @@ Source1: spamass-milter-wrapper
Source2: spamass-milter.sysv
Source3: spamass-milter.sysconfig
Source4: spamass-milter.README.Postfix
-Patch0: spamass-milter-0.3.1-pathnames.patch
-Patch2: spamass-milter-0.3.1-group.patch
+# Patches submitted upstream:
+# http://savannah.nongnu.org/bugs/?29326
+Patch0: spamass-milter-0.3.1-syntax.patch
+Patch1: spamass-milter-0.3.1-popen.patch
+Patch2: spamass-milter-0.3.1-authuser.patch
Patch3: spamass-milter-0.3.1-rcvd.patch
Patch4: spamass-milter-0.3.1-bits.patch
-Patch5: spamass-milter-0.3.1-popen.patch
-Patch6: spamass-milter-0.3.1-prototype.patch
-Patch7: spamass-milter-0.3.1-authuser.patch
+Patch5: spamass-milter-0.3.1-group.patch
+# Fedora-specific patches
+Patch10: spamass-milter-0.3.1-pathnames.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: spamassassin, sendmail-devel
Requires: spamassassin, /usr/sbin/sendmail
@@ -48,11 +51,18 @@ socket to communicate with the Postfix M
%prep
%setup -q
-# Local patch for initscript and socket paths
-%patch0 -p1 -b .pathnames
+# Address compiler warnings
+%patch0 -p1 -b .syntax
-# Add -g option for group-writable socket for Postfix support (#452248)
-%patch2 -p1 -b .group
+# Preliminary upstream patch for input validation bug letting
+# remote users execute arbitrary code (#572117, #572119)
+# http://savannah.nongnu.org/bugs/?29136
+# (patch modified to apply after patch0)
+%patch1 -p0 -b .popen
+
+# 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
@@ -60,17 +70,11 @@ socket to communicate with the Postfix M
# Add authentication info to dummy Received-header (#496769)
%patch4 -p1 -b .bits
-# Preliminary upstream patch for input validation bug letting
-# remote users execute arbitrary code (#572117, #572119)
-# https://savannah.nongnu.org/bugs/?29136
-%patch5 -p0 -b .popen
-
-# Add function prototype missing from patch5
-%patch6 -p1 -b .proto
+# Add -g option for group-writable socket for Postfix support (#452248)
+%patch5 -p1 -b .group
-# Add -I option to ignore (don't check) mail from authenticated users
-# (#437506, #496767) https://savannah.nongnu.org/bugs/?21046
-%patch7 -p1 -b .authuser
+# Local patch for initscript and socket paths
+%patch10 -p1 -b .pathnames
%{__cp} -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
%{__sed} -i -e 's|%%{_localstatedir}|%{_localstatedir}|g;
@@ -143,12 +147,18 @@ fi
%dir %attr(-,sa-milt,postfix) %{_localstatedir}/run/spamass-milter/postfix/
%changelog
+* Tue Mar 23 2010 Paul Howarth <paul at city-fan.org> 0.3.1-18
+- Add patch to get rid of compiler warnings
+- Reorder and re-base patches to optimize chances of upstream accepting them
+- Improve Received-header patch (#496763) incorporating additional fix from
+ upstream update (http://savannah.nongnu.org/bugs/?17178)
+
* Fri Mar 12 2010 Paul Howarth <paul at city-fan.org> 0.3.1-17
- Update initscript to support running the milter as root, which is needed
for the -x (expand aliases) option; note that the milter does not run as
root by default
- Add patch for popen unsanitized input vulnerability
- (#572117, #572119, https://savannah.nongnu.org/bugs/?29136)
+ (#572117, #572119, http://savannah.nongnu.org/bugs/?29136)
- Rebase authuser patch
- Update patch adding auth info to dummy Received-header so that it doesn't
generate spurious warnings about missing macros (#532266), and update and
--- spamass-milter-0.3.1-prototype.patch DELETED ---
- Previous message: rpms/arptables_jf/F-11 arptables_jf-0.0.8-byteorder.patch, NONE, 1.1 arptables_jf.spec, 1.22, 1.23
- Next message: rpms/spamass-milter/F-13 spamass-milter-0.3.1-syntax.patch, NONE, 1.1 spamass-milter-0.3.1-authuser.patch, 1.2, 1.3 spamass-milter-0.3.1-bits.patch, 1.2, 1.3 spamass-milter-0.3.1-group.patch, 1.1, 1.2 spamass-milter-0.3.1-pathnames.patch, 1.1, 1.2 spamass-milter-0.3.1-popen.patch, 1.1, 1.2 spamass-milter-0.3.1-rcvd.patch, 1.1, 1.2 spamass-milter.spec, 1.23, 1.24 spamass-milter-0.3.1-prototype.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list