[Mimedefang] Per Domain Configuration

David F. Skoll dfs at roaringpenguin.com
Wed Aug 14 10:13:00 EDT 2002


On Tue, 13 Aug 2002, Robert Covell wrote:

> In filter_begin () I placed:

>     if (stream_by_domain()) {
>         return;
>     }

> And then in filter I placed:

>     if ($Domain eq "domain1.com") {
>         $AdminAddress = 'spamcop at domain1.com';
>         $AdminName = "Domain1 Administration";
...

Try putting it all in filter_begin, like this:
sub filter_begin {
	if (stream_by_domain()) {
		return;
	}

	if ($Domain eq "domain1.com") {
		#...
	} elsif ...
}

Then you wrote:

> 	action_change_header("To", "$AdminAddress");

Changing the "To" header does *NOT* change where the mail goes.  That's
controlled by the envelope recipient(s) in the SMTP dialog.  You have to use
delete_recipient/add_recipient to redirect mail, and you also need some
mechanism to remember the original recipients (because they may not appear
in the headers.)

Regards,

David.




More information about the MIMEDefang mailing list