[Mimedefang] MaxRecipientsPerMessage

Kevin A. McGrail kmcgrail at pccc.com
Wed Apr 14 13:06:19 EDT 2004


> Are you saying that you simply forward for these 20 mail servers with no
clue as to who is a valid user on those servers?
>
> If that is the case, you may want to implement some way of dumping user
names on each target's LDAP systems and creating a virtusertable to validate
email addresses. Could be simpler than the problem you describe, plus it
would allow you to bounce any email sent to multiple recipients if any
single recipient is invalid.
>
> Another possibility is to implement WebMin on the mail server, and have
each domain admin add users to the mail server's virtusertable -- and only
accept email for users in virtusertable.


If you can use LDAP, do so.  The scripts based on Brian Landers were that I
use are at http://www.pccc.com/downloads/ldap/.  They create a virtusertable
and work quite well.

If they are servers that can return an error for an invalid RCPT, I found
DFS' recent recommendation to use md_check_against_smtp_server to work
perfectly and that is very easily extrapolated for more domains.

Basically, configure your MIMEDefang to use filter_recipient (typically a
sysconfig change and restart of MD).  Then add a function such as:

sub filter_recipient {
  my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host,
$rcpt_addr) = @_;

  my($answer, $explanation);

  if ($recip =~ /domain1.com/i) {
    ($answer, $explanation) =  md_check_against_smtp_server($sender, $recip,
"helo.mydomain.com", "mailserver.domain1.com");
    if ($answer eq 'TEMPFAIL') {
      $answer = 'CONTINUE';
    }
    return ($answer, $explanation);
  }

  return ('CONTINUE', "ok");
}

I have the extra TEMPFAIL changed to CONTINUE because I need to queue the
mail if I can't get a response.

Regards,
KAM



More information about the MIMEDefang mailing list