[Mimedefang] avoiding multiple SA checks in MD filter

Michal Szymanski msz at astrouw.edu.pl
Thu Apr 22 06:46:10 EDT 2004


Hi,

The mail system in my office is a bit complicated and, for some users,
messages are send through more than one mail server. I'd like to avoid
multiple SA checks but I don't know how to do it.

In MD mailing list archive I found following hint:

  On Thu, 2 Oct 2003, Romain Kang wrote:

  > So the thought occurs to me that I could poke through the HEADERS
  > file to see if SA has already left a positive spam match in the
  > headers.

  Be careful; this can be faked.  If the mail path is constant or
  reasonably simple, it's better to decide whether or not to run SA
  based on the sending relay's IP address.

Well, I tried to follow this idea by adding the my relay's IP check
in "filter_end" as an additional condition for invoking 
spam_assassin_check(). Unfortunately, $hostip variable, mentioned in the
manual is unknown in "filter_end".

Another way would be to check for positive (at least, as negative could
be easily forged) spam record in the message being processed
(X-Spam-Status: Yes) - but I have no idea (being both MD and Perl
newbie) how to do it inside "filter_end".

Any help would be appreciated,

regards, Michal.

-- 
  Michal Szymanski (msz at astrouw.edu.pl)
  Warsaw University Observatory, Warszawa, POLAND



More information about the MIMEDefang mailing list