[Mimedefang] Mimedefang filter "From:" header

Girardeau.GA at forces.gc.ca Girardeau.GA at forces.gc.ca
Mon May 7 09:12:41 EDT 2007


I want to filter information in the "From:" header.

Example:

From: "John Doe" <john.doe at johndoe.com>

I am able to filter out the address but I would rather filter the "John
Doe" portion.

This is an excerpt of my mimedefang-filter script and it's not working
for me.




$bad_from = '.*John Doe.*|.*John Doe2.*';

sub filter_sender {
   my ($sender, $ip, $hostname, $helo) = @_;
   if ($sender =~ /^$bad_from$/i) {
   return ('REJECT', 'No spam please.'); 
   }
}




More information about the MIMEDefang mailing list