[Mimedefang] Filter_relay problem

Pat Militzer pmilitz at metromls.com
Wed Jan 21 15:33:52 EST 2004


Hi, 

I have added a filter_relay that will allow our internal networks to bypass
the filters and just go out. 

Here is the code I used: 

#******************************************************************
# %PROCEDURE: filter_relay
# %ARGUMENTS: hostip,hostname,helo
# %RETURNS:
#  CONTINUE, TEMPFAIL, REJECT, DISCARD, ACCEPT_AND_NO_MORE_FILTERING
# %DESCRIPTION:
# Don't filter for internal machines sending out email.
#******************************************************************
sub filter_relay($$$){
  my ($hostip,$hostname,$helo) = @_;
  my $internal_net1 = "10.100.100";
  my $internal_net2 = "10.100.200";
  $hostip=~  /^(\d+\.\d+\.\d+)./ ;
  my $mailip = $1;
  if($mailip eq $internal_net1 || $mailip eq $internal_net2) {
  		return("ACCEPT_AND_NO_MORE_FILTERING","It's from us it gotta
be good");
  		}
  return("Continue","");
  }

I used the filter_relay from the lisa powerpoint as a template.  That was a
great help in understanding mimedefang.  

It works fine, but I started seeing the following messages in my mail log
file. 

Jan 21 10:34:50 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay said ACCEPT_AND_NO_MORE_FILTERING: No further filtering for
this message
Jan 21 10:35:17 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.30.8.67 ([10.30.8.67])
Jan 21 10:35:33 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.47.115 (smtp805.mail.sc5.yahoo.com)
Jan 21 10:35:35 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.48.62 ([10.10.48.62])
Jan 21 10:35:56 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.30.56.110 ([10.30.56.110])
Jan 21 10:35:59 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.30.1.87 ([10.30.1.87])
Jan 21 10:36:00 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.30.58.11 ([10.30.58.11])
Jan 21 10:36:08 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.30.11.28 ([10.30.11.28])
Jan 21 10:36:08 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.35.4 ([10.10.35.4])
Jan 21 10:37:33 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.75.86 ([10.10.75.86])
Jan 21 10:37:35 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.86.115 (sj01-net02-31.wotch.com)
Jan 21 10:37:41 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.45.165 ([10.10.45.165])
Jan 21 10:38:00 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.92.64 (out8.mx.nwbl.wi.voyager.net)
Jan 21 10:38:18 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.68.75 (hc5.lfesevdrt.com)
Jan 21 10:38:47 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.18.15 (mail4b-better-health.eapl4235.com)
Jan 21 10:39:06 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.30.25.6 ([10.30.25.6])
Jan 21 10:39:32 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.20.60.1 ([10.20.60.1])
Jan 21 10:39:46 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.20.24.60 ([10.20.24.60])
Jan 21 10:39:46 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.6.74 (web80606.mail.yahoo.com)
Jan 21 10:40:29 odin mimedefang.pl[28335]: [ID 702911 mail.debug]
filter_relay rejected host 10.10.82.126 ([10.10.82.126])


The first line is my test mail to see if the filter worked as I thought it
would, and it did but then I saw the filter_relay rejected host
xxx.xxx.xxx.xxx.  I did not set the filter_relay to reject anything, any
idea on what is happening.  Prior to adding the filter I have not seen those
messages or since I took it out? 

I'm using Mimedefang 2.39 with SA, on a Solaris 9 Sparc Box with sendmail. 

Thanks in advance. 

Pat 





More information about the MIMEDefang mailing list