[Mimedefang] To stop spam checking of Internal mail

Cormack, Ken kcormack at acs.roadway.com
Wed Jul 16 08:17:01 EDT 2003


We've done that, like this.  We have MIMEDefang and SpamAssassin installed
on our external SMTP Gateway machine.  This gateway relays mail to and from
an internal gateway machine.  Anything outbound (received from the internal
gateway) is not scanned, nor is anything received from any one of our DMZ
hosts (which only generate programatic output via email).  The net result is
that ONLY inbound mail from the Internet, is scanned with SpamAssassin.

First, we defined these two checks in mimedefang-filter, immediately below
sub entity_contains_virus

# dont process outbound from internal gateway
sub Exclude_FromInternal() {
  if ($RelayAddr eq "172.29.250.33") {
    return 1;
  }
  return 0;
}

# dont process outbound from a DMZ host
sub Exclude_FromDmz() {
  if ($RelayAddr =~ /172.29.251/) {
    return 1;
  }
  return 0;
}

Then, in the same file, we modified the following statement:
if ($Features{"SpamAssassin"}) {

...to look like this:

if ($Features{"SpamAssassin"} && !Exclude_FromInternal() &&
!Exclude_FromDmz()) {

Now, SpamAssasin only scans mail that is INBOUND from the Internet.

Hope this helps.

Ken

-----Original Message-----
From: Mathew Thomas [mailto:mathew.thomas at rmit.edu.au]
Sent: Tuesday, July 15, 2003 9:17 PM
To: mimedefang at lists.roaringpenguin.com
Subject: [Mimedefang] To stop spam checking of Internal mail


Hi All,

I am currently running MimeDefang+SpamAssassin on a test mail gateway.  I
don't want any mail coming from our subnets to go through  SpamAssassin
check, but only other check like viruses etc,  so that it will reduce the
load on the gateways. (We have got strict rules against spam originating
from our subnets)

Currently I have got a rule in the "/etc/mail/spamassassin/sa_mimedefang.cf"
as:

whitelist_from_rcvd    *@rmit.edu.au      rmit.edu.au

The above line is doing the job , but I  think the mail still go through the
SpamAssassin check. Do someone knows the script that  can be used in
"/etc/mail/mimedefang-filter" file to stop spam checking of the trusted
subnets?

Thanks
Mathew Thomas
RMIT University
Australia



_______________________________________________
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang



More information about the MIMEDefang mailing list