[Mimedefang] filter-recipient not reacting as expected...
Keith Patton
kpatton at dallas.photronics.com
Wed May 26 17:05:26 EDT 2004
Hello all,
I have a filter : filter_recipient and is it doing what is should do, however sendmail
is not returning the code I expected...
I am trying to output a 550 error code yet it responds with 554?? I have modified the
return codes and I still get 554..
version of mimedefang: 2-43
Any ideas were I am going wrong?
-Keith
sendmail session:
220 cribbage ESMTP Sendmail 8.12.11/8.12.11; Wed, 26 May 2004 15:59:31 -0500
ehlo shasta
250-cribbage Hello shasta.dallas.photronics.com [172.16.32.64], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH CRAM-MD5
250-DELIVERBY
250 HELP
mail from: xxx at testing.org
250 2.1.0 xxx at testing.org... Sender ok
rcpt to: junk at x.org
554 5.7.1 0
quit
221 2.0.0 cribbage closing connection
filter code:
sub filter_recipient {
my ($recipient, $sender, $ip, $hostname, $first, $helo,
$rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
md_syslog('warning','Filtering Recipient');
if( defined (isInLDAP( $recipient )) ) {
return ('REJECT', 'Unknown user', 550, '5.1.1' );
} else {
return 'ok', '0';
}
}
More information about the MIMEDefang
mailing list