On Mon, Aug 02, 2004 at 05:41:19PM +1000, Bill Maidment wrote:
> I'm trying to use md_check_against_smtp_server to check the email 
> recipient against valid users on another mail server.
> 
> The problem I have is that invalid recipients cause the incoming email 
> to continually bounce between my two mail servers. Valid recipients work 
> fine!
> 
> Any clues as to what I've missed/got wrong?

Wild guess: have you enabled filter_recipient processing by running
mimedefang with the "-t" option? (or by specifying MX_RECIPIENT_CHECK="yes"
in the appropriate startup script).

> I have this in sendmail.mc on the other mail server. Could this be the 
> cause?
> 
> define(`SMART_HOST',`mail.maidment.com.au')

That is only one of the causes, probably. You can use a smarthost,
however.
 
> mimedefang-filter snippet and email sample follow:
> 
> #***********************************************************************
> 
> 
> sub filter_recipient ($$$$$$$$$) {
>         my($recip, $sender, $ip, $host, $first, $helo,
>                 $rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
>         return md_check_against_smtp_server($sender, $recip,
>                 "mail.maidment.com.au",
>                 "video.maidment.com.au");
> }

You are testing here against the recipient given by the external
relay. I noticed in the headers below that you are actually forwarding
to [EMAIL PROTECTED] You might want to make the same translation
before checking, by adding:

   $recip =~ s/\@(mail\.)?maidment\.com\.au/[EMAIL PROTECTED]/i;

... or something similar.
 
> >>   ----- The following addresses had permanent fatal errors -----
> >><[EMAIL PROTECTED]>
> >>    (reason: 554 5.4.6 Too many hops)
> >>    (expanded from: <[EMAIL PROTECTED]>)
> >>
> >>   ----- Transcript of session follows -----
> >>554 5.4.6 Too many hops 26 (25 max): from
> 
> <[EMAIL PROTECTED]> via localhost,
> to <[EMAIL PROTECTED]>
> 
> >>Reporting-MTA: dns; video.maidment.com.au
> >>Arrival-Date: Mon, 2 Aug 2004 15:13:33 +1000
> >>
> >>Final-Recipient: RFC822; [EMAIL PROTECTED]
> >>X-Actual-Recipient: RFC822; [EMAIL PROTECTED]
> >>Action: failed
> >>Status: 5.4.6
> >>Diagnostic-Code: SMTP; 554 5.4.6 Too many hops
> >>Last-Attempt-Date: Mon, 2 Aug 2004 15:15:07 +1000
> >>Return-Path: <[EMAIL PROTECTED]>
> >>Received: from mail.maidment.com.au (mail.maidment.com.au [192.168.2.2])
> >>    by video.maidment.com.au (8.13.0/8.13.0) with ESMTP id i725DXwF032594
> >>    for <[EMAIL PROTECTED]>; Mon, 2 Aug 2004 15:13:33 +1000
> >>Received: from video.maidment.com.au (video.maidment.com.au 
> [192.168.2.5])
> >>    by mail.maidment.com.au (8.13.0/8.13.0) with ESMTP id i725DRBR013005
> >>    for <[EMAIL PROTECTED]>; Mon, 2 Aug 2004 15:13:27 +1000
> >>Received: from mail.maidment.com.au (mail.maidment.com.au [192.168.2.2])
> >>    by video.maidment.com.au (8.13.0/8.13.0) with ESMTP id i725DV5U032585
> >>    for <[EMAIL PROTECTED]>; Mon, 2 Aug 2004 15:13:31 +1000

Apparently you are rewriting to [EMAIL PROTECTED] If this works for
known users, then maybe you added those users to something like
virtusertable? If so, maybe you forgot to add the catch-all entry at the
end of virtusertable, saying:

@[192.168.2.5]  error:"5.1.1" No such user

-- 
#!perl -wpl # mmfppfmpmmpp mmpffm <[EMAIL PROTECTED]>
$p=3-2*/[^\W\dmpf_]/i;s.[a-z]{$p}.vec($f=join('',$p-1?chr(sub{$_[0]*9+$_[1]*3+
$_[2]}->(map{/p|f/i+/f/i}split//,$&)+97):qw(m p f)[map{((ord$&)%32-1)/$_%3}(9,
3,1)]),5,1)='`'lt$&;$f.eig;                                # Jan-Pieter Cornet
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to