[Mimedefang] filter_relay not working

Myles Uyema mlists at uyema.net
Thu May 8 13:42:02 EDT 2003


I'm trying to implement sub filter_relay and reject hosts that greet using
an IP address: http://www.mimedefang.com/node.php?id=23

/usr/local/bin/mimedefang -P /var/spool/MIMEDefang/mimedefang.pid -U defang -m /var/spool/MIMEDefang/mimedefang-multiplexor.sock -r -s

sub filter_relay ($$$) {
my($ip, $name, $helo) = @_;
if ($helo =~ /^(d{1,3})(.)(d{1,3})(.)(d{1,3})(.)(d{1,3})$/) {    return
('REJECT', "Please use your host name when saying HELO")  }
return ('ACCEPT', "OK")
}


When I try to test:
HELO 199.199.199.199

My sendmail still accepts the e-mail:
May  8 10:27:11 mail sendmail[2803]: h48HQjg02803: from=testing at roaringpenguin.com, size=62, class=0, nrcpts=1, msgid=<200305081726.h48HQjg02803 at mail.myles.tst>, proto=SMTP, daemon=MTA, relay=[255.255.255.255]
May  8 10:27:12 marx sendmail[2805]: h48HQjg02803: to=/var/spool/mail/mlists, ctladdr=mlists at myles.tst (8/0), delay=00:00:20, xdelay=00:00:00, mailer=*file*, pri=30040, dsn=2.0.0, stat=Sent

The headers indicate the MIMEDefang is processing the mail before
delivery.  I just want it to get processed and rejected before accepting
the mail.

Return-Path: <testing at roaringpenguin.com>
Received: from 199.199.199.199 ([255.255.255.255])
        by mail.myles.tst (8.88.8/8.88.8) with SMTP id h48HQjg02803
        for mlists at myles.tst; Thu, 8 May 2003 10:26:52 -0700
Date: Thu, 8 May 2003 10:26:52 -0700
From: testing at roaringpenguin.com
Message-Id: <200305081726.h48HQjg02803 at mail.myles.tst>
Subject: testing defang ruleset
X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)

This is not working damnit.





More information about the MIMEDefang mailing list