[Mimedefang] That didn't work right...

Jim McCullars jim at info.uah.edu
Thu Jul 8 16:15:52 EDT 2004



On Thu, 8 Jul 2004, Ashley M. Kirchner wrote:

> different domains.)  How can I have it do the recipient check on the
> correct mail spool?  Right now, in filter_recipient() it's checking
> against only one of the mail spools (that happens to host the most
> domains.)  However, incoming e-mail for any of the domains not hosted on
> that spool gets rejected because it's checking the wrong one.  Am I even

   There is, to my knowledge, no magic silver bullet to do this - you will
have to code your filter rules file to parse out the recipient domain and
query the appropriate downstream smtp server.  If there are only a few
static ones, just code a few "if" statements in filter_recipient() like
these:

    if ($recipient =~ /.+\@sales\.foo\.com>?/i) {
    return md_check_against_smtp_server($sender, $recipient,
                                "smtp-in.foo.com", "sales.foo.com")
  }
    if ($recipient =~ /.+\@engineering\.foo\.com>?/i) {
    return md_check_against_smtp_server($sender, $recipient,
                                "smtp-in.foo.com", "engineering.foo.com")
  }


  Note that if Engineering or Sales changes their mail host name, you will
have to change your filter appropriately.  If you have a lot of MX's, you
will need a more flexible (translation: elaborate) checking scheme in
filter_recipient().

  HTH...

Jim McCullars
University of Alabama in Huntsville




More information about the MIMEDefang mailing list