[Mimedefang] Ignoring Filtering to Individual Recpients

Richard J. Kieran Rkieran at rhnet.org
Tue Jun 24 09:42:40 EDT 2008


Jim McCullars wrote:
>
>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.

This sounds very cool. Makes me wonder if it would avoid the problem that occurs with 
SpamAssassin wherein whitelisting a recipient causes mail addressed to them to go to 
all recipients on the message. This "feature" makes whitelist_to kind of unusable. 
Would this method suffer from the same problem? Could a routine be written to 
remove all recipients and then add only the one tested for? If so, a snippet of code 
would be helpful. TIA.
Richard




More information about the MIMEDefang mailing list