[Mimedefang] block based on outgoing recipient

alan premselaar alien at 12inch.com
Mon Jul 5 20:31:42 EDT 2004



Lucas Albers wrote:

> Would this item; in filter_end exclude all further mail filtering, on mail
> going from localhost to this a particular recipient?
> 
> #in filter_end.
>  if ($recipient =~ /blah\@example\.com/) {
>         exit;
> }
> 
> 
> Does not appear to be working...
> 

Lucas,

   if you just want to bypass all filtering for mail originating on your 
localhost and being sent to a specific recipient, wouldn't using 
filter_recipient be more appropriate?

I haven't used it personally, but the pseudo-code could look something like:


sub filter_recipient {
	
	if (localhost) {
		if ($recipient =~ /blah\@example\.com/) {
			return ('ACCEPT_WITH_NO_MORE_PROCESSING', "ok");
		}
	}
}


** this is pseudocode, it's not meant to run as-is. also, I couldn't 
remember the return code off the top of my head, so be sure to 
double-check it for accuracy

hope this helps,

alan



More information about the MIMEDefang mailing list