[Mimedefang] Locking down sendmail from behind a filtering gateway

David F. Skoll dfs at roaringpenguin.com
Tue Feb 17 13:20:06 EST 2015


On Tue, 17 Feb 2015 12:19:34 -0500
John Von Essen <john at quonix.net> wrote:

> Any thoughts, the filtering gateways only have 1 NIC. Worst case, I
> can put a firewall on the mail server, but I didn’t want to have to
> do that. Is there a way to make sendmail deny everything by default?

You're using MIMEDefang, right?

sub filter_relay
{
	my ($ip) = @_;
	if ($ip ne '127.0.0.1' &&
	    $ip ne 'X.X.X.X' &&
	    $ip ne 'ipv6:ipv6::ipv6') {
	    return('REJECT', 'Unauthorized');
        }
	return ('CONTINUE', '');
}




More information about the MIMEDefang mailing list