[Mimedefang] filter_recipient question

Ashley M. Kirchner ashley at pcraft.com
Tue Dec 11 12:26:18 EST 2007


    I'm trying to have a blanket ACCEPT for certain domains and I can't 
get it to work...at least, I still see things getting bounced by 
MimeDefang.  So, is the following snippet of code actually correct?  
Syntactically it appears fine, but that's also it...  (lines wrapped for 
readability)

sub filter_recipient {
    my($recipient, $sender, $rest) = @_;
    my($answer, $explanation);

    return('ACCEPT_AND_NO_MORE_FILTERING', "ok") \
        if ($recipient =~ /.+\@reincorporation\.com>?/i);

    return('ACCEPT_AND_NO_MORE_FILTERING', "ok") \
        if ($recipient =~ /.+\@itfcorp.com\.com>?/i);
  
    if ($recipient =~ /.+\@pcraft\.com>?/i) {
        ($answer, $explanation) =
            md_check_against_smtp_server($sender, $recipient, \
              "serpico.pcraft.com", "i-ivan.int.pcraft.com");
    } else {
        ($answer, $explanation) =  
            md_check_against_smtp_server($sender, $recipient, \
              "serpico.pcraft.com", "i-bug.int.pcraft.com");
    }
    # Convert TEMPFAIL to CONTINUE
    $answer = 'CONTINUE' if ($answer eq 'TEMPFAIL');
    return ($answer, $explanation);
}


-- 
W | It's not a bug - it's an undocumented feature.
  +--------------------------------------------------------------------
  Ashley M. Kirchner <mailto:ashley at pcraft.com>   .   303.442.6410 x130
  IT Director / SysAdmin / Websmith             .     800.441.3873 x130
  Photo Craft Imaging                       .     3550 Arapahoe Ave. #6
  http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A. 




More information about the MIMEDefang mailing list