[Mimedefang] Making user exempt from all scans?

Jim McCullars jim at info.uah.edu
Mon Aug 11 14:37:25 EDT 2003


On Mon, 11 Aug 2003, Joshua Graham wrote:

> Is there something I can put at the beginning of the filter to do the
> following:
>
> if(recipient = whinyuser at domain.com)
> 	accept_message;
> else
> 	go about your business.

   You pretty much had it :-)

sub filter_recipient {
  my ($recipient, $sender, $ip, $hostname, $first, $helo,
    $rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
  if ($recipient =~ /^<?whinyuser\@domain\.com>?$/i) {
    return ('ACCEPT_AND_NO_MORE_FILTERING', "ok")
  }
  return ('CONTINUE', "ok");
}

   Just remember to escape (backslash) your @-signs and periods in the
email address in the expression.  Also, if someone delivers a message to
both whinyuser and 100 other people, the message will go to all 101
recipients unfiltered.  If this is a problem, look in to using
stream_by_recipient.  HTH...

Jim





More information about the MIMEDefang mailing list