Skip to content

Whitelist SMTP Authorized users

  • by

Common setup used at many mailservers is postfix with amavis. It is possible to be less restrictive to emails sent by our clients using our server without turning off antispam itself for sent emails.

Tell postfix to add header for authenticated users, add to /etc/postfix/main.cf


smtpd_sasl_authenticated_header = yes

Change score for spamassasin rule by creating /etc/spamassassin/99_smtp_auth.cf

score ALL_TRUSTED -99

Reload to apply changes:


/etc/init.d/amavis restart
postfix reload

If all works, header will look like this


X-Spam-Status: No, score=-100.9 tagged_above=-999 required=6.2
	tests=[ALL_TRUSTED=-99, BAYES_00=-1.9] autolearn=ham
Received: from mail.vnet.sk ([127.0.0.1])
	by mail.vnet.sk (mail.vnet.sk [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id CLbfm6Yfb7pi for ;
	Thu, 27 May 2010 18:55:31 +0200 (CEST)
Received: from [10.0.0.14] (chello089173089079.chello.sk [89.173.89.79])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	(Authenticated sender: ivan.erben@vnet.sk)
	by mail.vnet.sk (VNETMail) with ESMTPSA id 9C3C8131C19
	for ; Thu, 27 May 2010 18:55:31 +0200 (CEST)
Message-ID: <4BFEA402.1050107@vnet.eu>
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *