[Mimedefang] Relay_check not working
Ole Craig
olc at cs.umass.edu
Thu Sep 12 12:11:01 EDT 2002
On 09/12/02 at 12:00, 'twas brillig and Stefano McGhee scrobe:
> Hello all,
> I'm trying to get relay check working on a new box with more HP
> than our existing system. I'm running MD 2.20, and Sendmail 8.12.6. I
> have placed the following lines in the sendmail init script that also
> starts MD:
>
> daemon $MIMEDEFANG -U defang -r \
> -m $DEFPATH/mdefang-mx.sock \
> -p $DEFPATH/mimedefang.sock $SENDER_CHECK \
> -P $DEFPATH/mimedefang.pid
>
> In mimedefang-filter I have the following:
>
> # Check for various relay denials
> sub filter_relay {
> my($hostip, $hostname, $helo) = @_;
>
> # Can't be "arcweb.com" unless it's one of our IP's.
> if ($helo =~ /mydomain\.com/i) {
> if ($hostip ne "127.0.0.1" and $hostip ne "local.ip.address" and
> $hostip ne "another.local.address") {
> syslog('info', "Host $hostip said HELO $helo");
> return(0, "Go away. You're not me. I'm me.");
> }
> }
> return (1, "OK");
> }
>
>
> When I telnet into port 25 and issue the command HELO mydomain.com or HELO
> server12345.mydomain.com, it is very pleased to meet me. What might be
> wrong?
>
2 comments:
1) I'm not positive, but I think that milter doesn't get called until
the completion of the SMTP "DATA" command -- which means MD doesn't
get a chance to complain until after you've given sendmail the message
body. (If I'm wrong I'm sure someone will correct me. :-)
2) I've found it quite useful to separate the mimedefang init from the
sendmail init -- I can stop/start mimedefang without having to wait
for sendmail to restart also, which is kind of nice (particularly when
fiddling with mimedefang configs.)
Ole
--
Ole Craig * UNIX; postmaster, news, web; SGI martyr * CS Computing
Facility, UMass * <www.cs.umass.edu/~olc/pgppubkey.txt> for public key
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
More information about the MIMEDefang
mailing list