[Mimedefang] RelayAddr
Tilman Kastner
kastner at devicen.de
Fri Sep 20 15:25:01 EDT 2002
you could try to check directly before calling SpamAssassin:
if ($RelayAddr =~ /^(127.0.0.1|$LocalNetworks)/o) {
if (spam_assassin_is_spam()) {
...
I have not tried this with resent messages, but this prevents SpamAssassin to
tag outgoing mail from our internal mail gateway in our setup:
...
if (-s "./INPUTMSG" < 128*1024 && $RelayAddr ne "[IP blanked out]") {
if (spam_assassin_is_spam()) {
...
works perfectly for us
> I have this piece in my 'sub filter_begin()' part:
>
> $LocalNetworks = [IPs blanked out];
>
> sub filter_begin () {
> # If the message came from localhost, let it through without checking
> if ($RelayAddr =~ /^(127.0.0.1|$LocalNetworks)/o) {
> action_add_header("X-Relay-Status", "Skipped, internal relay:
> $RelayAddr");
> return action_accept();
> }
> ...
> ...
> }
>
> Yet, SpamAssassin still re-tags the message when I try to re-send the
> message out (by running 'sendmail -f`cat SENDER` `cat RECIPIENTS` <
> ENTIRE_MESSAGE' within the quarantined folder). Where should that snippet
> be in the filter file so that once it verifies the RelayAddr, it completely
> exits the filter and just delivers the message?
>
Hth
Tilman
--
Tilman Kastner DEVICE/N GmbH
kastner at devicen.de Ilse-ter-Meer-Weg 7
PGP key available 30449 Hannover, Germany
More information about the MIMEDefang
mailing list