[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spamass-milter-0.2.0+cvs and SA2.61 custom headers?

From: Dan Nelson
Subject: Re: spamass-milter-0.2.0+cvs and SA2.61 custom headers?
Date: Mon, 15 Dec 2003 10:09:00 -0600
User-agent: Mutt/

In the last episode (Dec 15), Dan O'Brien said:
>    I've built a new SA 2.61 relay box and am trying to use the 2.6x
>    add_header commands in my
>            add_header all AWL _AWL_
>            add_header all Bayes _BAYES_
>    I've been scratching my head for close to an hour now, but I think the
>    coffee finally kicked in.  Is spamass-milter preventing these headers
>    from being added?  My first clue that prompted the jump to this
>    conclusion was the "milter: add: header..." output on the syslog...
>    Dan O'Brien

It only knows about the fields that stock SpamAssassin generates.  What
happens internally is the incoming email is processed, then certain
headers are copied over from the processed copy into the copy sendmail
has.  I think you can just get away with something like this near the
top of the assassinate() function, where X-Spam-Flag and X-Spam-Status
are set:

string newstring;
newstring = retrieve_field(assassin->d().substr(0, eoh), string("AWL"));
smfi_addheader(ctx, header, (char *)(newstring.c_str()));
newstring = retrieve_field(assassin->d().substr(0, eoh), string("Bayes"));
smfi_addheader(ctx, header, (char *)(newstring.c_str()));

The reason for the extra code handling the other X-Spam headers is to
make sure that a spammer can't stuff fake values in.

        Dan Nelson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]