John Stewart (not the talk show host, nor the singer) wrote:
> > I'm sure SA must parse each of the Received headers to 
> determine the SMTP
> > servers, so at some point this information is available. Would it be
> > possible to get this information logged somehow with the spam level?

[EMAIL PROTECTED] wrote:
> John -- you can add this to the headers of the messages using 
> 'add_header':
> 
>  _RELAYSTRUSTED_   relays used and deemed to be trusted
>  _RELAYSUNTRUSTED_ relays used that can not be trusted
> 
> You want _RELAYSUNTRUSTED_.  getting that into the syslog, though, is
> not yet supported -- but would be handy....

Aye, thanks! This works great for a standalone SpamAssassin test (i.e. using
"spamassassin -t < mail"). Getting this data into a usable format might be
tricky. It may be even tricker using amavisd-new. 

I'm a total hack at perl, and even more cluless about Object Oriented
Programming, but from looking at the amavisd-new and SA code, it looks like:

- amavisd-new at init time creates an object (named $spamassassin_obj) of
the type Mail::SpamAssassin.

- It does a $spamassassin_obj->check($mail_obj) where $mail_obj is a
Mail::SpamAssassin::NoMailAudit object containing the email's data, and
returns the result to the object (variable?) $per_msg_status.

- Within this object it pulls out different data (using ->get_hits, etc) to
actually write the email headers itself. Note that amavisd-new does the
actual re-writing of the headers itself and does *not* let SA do it... so
adding headers by SA will not actually help those of us with amavisd-new.

I'm guessing the ->get_report function (object? Not sure the terminology
with this OO stuff) is simply the text that normally appears at the bottom
of an email when you do "spamassassin -t". Alas, this would not contain the
information about the untrusted relays, which is what I'm interested in.


Is there any way to get this _RELAYSUNTRUSTED_ data into the
Mail::SpamAssassin object somehow? Then I think I could hack amavisd-new to
log this relay information.

thanks!

johnS


-------------------------------------------------------
This SF.net email is sponsored by OSDN developer relations
Here's your chance to show off your extensive product knowledge
We want to know what you know. Tell us and you have a chance to win $100
http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to