[Mimedefang] Ignoring Filtering to Individual Recpients

Jim McCullars jim at info.uah.edu
Mon Jun 23 16:06:01 EDT 2008



On Mon, 23 Jun 2008, Colin Milam wrote:

> I'm getting my head around creating the sub filter_recipients but I am a
> little unsure where about it needs to go in the mimedefang-filter?

   It can go anywhere in the file, in mine it's just below filter_sender.
All you really need is something like this:

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

  if($recipient =~ /^<?postmaster\@/i) { # don't filter mail to postmaster
    return('ACCEPT_AND_NO_MORE_FILTERING', "ok")
  }
}

   Just replace postmaster in the regexp above with the name of the user
you don't want to filter.  Make sure you enable the mimedefang command
line option to enable recipient checking.

   HTH...

Jim McCullars
University of Alabama in Huntsville




More information about the MIMEDefang mailing list