[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch 411
From: |
Thomas Cameron |
Subject: |
Patch 411 |
Date: |
Mon, 2 Jun 2003 18:13:23 -0500 |
All -
I am running RH 9.0, sendmail-8.12.8-5.90, and spamass-milter-0.1.3a. I
want to check mail with SA on a relay only server, and redirect tagged spam
to address@hidden
I want to apply patch 411, but when I applied this patch but I got this:
address@hidden spamass-milter-0.1.3a]# patch -p0 < ../patch
patching file spamass-milter.cpp
Hunk #3 FAILED at 165.
Hunk #6 succeeded at 317 with fuzz 1.
Hunk #7 FAILED at 447.
Hunk #8 FAILED at 463.
Hunk #9 FAILED at 742.
4 out of 9 hunks FAILED -- saving rejects to file spamass-milter.cpp.rej
patching file spamass-milter.h
The spamass-milter.cpp.rej is at the bottom of this message.
Is this acceptable? If not, what am I doing wrong?
--
Thomas Cameron, RHCE, CNE, MCSE, MCT
Cameron Technical Services, Inc.
(512) 454-3200 Main
http://www.camerontech.com
spamass-milter.cpp.rej:
***************
*** 163,168 ****
flag_sniffuser = true;
defaultuser = strdup(optarg);
break;
case '?':
err = 1;
break;
--- 165,180 ----
flag_sniffuser = true;
defaultuser = strdup(optarg);
break;
+ case 'b':
+ flag_bucket = true;
+ // we will modify the recipient list; if
spamc returns
+ // indicating that this mail is spam, the
message will be
+ // sent to <optarg>@localhost
+ smfilter.xxfi_flags |= SMFIF_ADDRCPT; //
May add recipients
+ smfilter.xxfi_flags |= SMFIF_DELRCPT; //
May delete recipients
+ // XXX we should probably verify that
optarg is vaguely sane
+ spambucket = strdup( optarg );
+ break;
case '?':
err = 1;
break;
***************
*** 407,419 ****
//
// Gets called once for each recipient
//
- // stores the first recipient in the spamassassin object and
- // discards the rest, keeping track of the number of recipients.
//
sfsistat
mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
{
SpamAssassin* assassin =
static_cast<SpamAssassin*>(smfi_getpriv(ctx));
if (assassin->numrcpt() == 0)
{
--- 447,459 ----
//
// Gets called once for each recipient
//
+ // stores all addresses and the number thereof (some redundancy)
//
sfsistat
mlfi_envrcpt(SMFICTX* ctx, char** envrcpt)
{
SpamAssassin* assassin =
static_cast<SpamAssassin*>(smfi_getpriv(ctx));
+ char **rcpt;
if (assassin->numrcpt() == 0)
{
***************
*** 423,428 ****
{
assassin->set_numrcpt();
}
return SMFIS_CONTINUE;
}
--- 463,471 ----
{
assassin->set_numrcpt();
}
+ for( rcpt = envrcpt; *rcpt; rcpt++ ) {
+ assassin->recipients.push_back( *rcpt ); // XXX verify that this
worked
+ }
return SMFIS_CONTINUE;
}
***************
*** 699,704 ****
int status;
waitpid(pid, &status, 0);
}
}
};
--- 742,752 ----
int status;
waitpid(pid, &status, 0);
}
+ }
+
+ // Clean up the recip list. Might be overkill, but it's good
housekeeping.
+ while( !recipients.empty()) {
+ recipients.pop_front();
}
};
- Patch 411,
Thomas Cameron <=