[Mimedefang] pure whitelisting

David F. Skoll dfs at roaringpenguin.com
Tue Aug 12 10:29:36 EDT 2008


jef moskot wrote:

> I've got some domains I need whitelisted in /etc/mail/access and I don't
> want MIMEDefang to look at them either.  I don't want them virus-scanned
> or spam-assassined or sanity-checked in any way.

You can do that in filter_sender as follows:

sub filter_sender
{
	my($sender, $hostip, $hostname, $helo) = @_;

	if (domain_of_sender_is_whitelisted($sender)) {
		return('ACCEPT_AND_NO_MORE_FILTERING', 'Whitelisted');
	}
	return('CONTINUE', 'Ok');
}

You need to write the domain_of_sender_is_whitelisted subroutine, which can
use whatever mechanism you like (including checking access) to determine that
the domain of the sender is whitelisted.  You may need to canonicalize
$sender by stripping angle-brackets and converting to lower-case.

Regards,

David.



More information about the MIMEDefang mailing list