[Mimedefang] MD error

Jim McCullars jim at info.uah.edu
Tue Aug 13 17:05:01 EDT 2002


Hi, I just downloaded and installed MD 2.17 and either there is a problem
with mimedefang.pl or the sample filter_relay for testing the HELO value.
I adapted it for my machine like this:

sub filter_relay {
  my($ip, $name, $helo) = @_;
  if ($helo =~ /info\.uah\.edu/i) {
    if ($ip ne "127.0.0.1" and
        $ip ne "146.229.5.36") {
          return(0, "Go away... $ip is not in uah.edu");
    }
  }
}

and when I tried to send out a message locally, this showed up in syslog:

Aug 13 15:48:30 infotest sendmail[16735]: [ID 801593 mail.info]
g7DKmUmj016735: from=jim, size=79, class=0, nrcpts=1,
msgid=<200208132048.g7DKmUmj016735 at info.uah.edu>, relay=jim at localhost
Aug 13 15:48:30 info.uah.edu mimedefang.pl[16732]: filter_relay rejected
host 127.0.0.1 (localhost)
Aug 13 15:48:30 infotest mimedefang-multiplexor: [ID 980602 mail.info]
Slave 0 stderr: Use of uninitialized value in string ne at
/usr/local/bin/mimedefang.pl line 3709, <STDIN> line 1.
Aug 13 15:48:30 infotest sendmail[16736]: [ID 801593 mail.info]
g7DKmUWI016736:
Milter: from=<jim at info.uah.edu>, reject=550 5.7.1 Command rejected

When I changed the script to explicitly add the return code of 1 like
this:

sub filter_relay {
  my($ip, $name, $helo) = @_;
  if ($helo =~ /info\.uah\.edu/i) {
    if ($ip ne "127.0.0.1" and
        $ip ne "146.229.5.36") {
          return(0, "Go away... $ip is not in uah.edu");
    }
  }
  return (1);
}

The message got sent and no errors were logged to syslog.

Jim
*-------------------------------------------------------------------------*
* James H. McCullars                 I Phone: (256) 824-2610              *
* Director of Systems & Operations   I Fax:   (256) 824-6643              *
* Computer & Network Services        I Internet: mccullj at email.uah.edu    *
* The University of Alabama          I -----------------------------------*
*    in Huntsville                   I                                    *
* Huntsville, AL 35899               I This space for rent - CHEAP!       *
*-------------------------------------------------------------------------*




More information about the MIMEDefang mailing list