reject mails unknown users at smtp stage (postfix & relay_recipient_maps)

Mikael Kermorgant mikael.kermorgant at gmail.com
Wed Feb 7 16:06:11 CET 2007


Hello

We're using mailscanner and postfix on our smtp frontend.
In order to improve it, we'd like to reject mails to unknown users by
setting up a relay_recipient_maps parameter in postfix.

However, my changes don't seem to be taken into account because mails
are still presented to our backend server.

I would welcome any suggestion about that.
Thanks in advance,

-- 
Mikael Kermorgant
PS : here's the /etc/postfix/main.cf

	smtpd_banner = $myhostname ESMTP $mail_name
	biff = no
	append_dot_mydomain = no
	myhostname = amxpub.paris.iufm.fr
	inet_interfaces = $myhostname localhost
	
	myorigin = $mydomain
	transport_maps = hash:/etc/postfix/transport
	
	mydestination = $myhostname localhost.$mydomain $mydomain
	
	local_recipient_maps =
	local_transport = error:local mail delivery is disabled
	virtual_alias_maps = hash:/etc/postfix/virtual
	relay_domains = paris.iufm.fr
	relay_recipient_maps =  hash:/etc/mail/ldap.relay
					hash:/etc/mail/sympa.relay
					hash:/etc/mail/anciens.relay
					hash:/etc/mail/anciens2.relay
	
	mynetworks = 127.0.0.0/8 ip-of-backend-server
	recipient_delimiter = +
	header_checks = regexp:/etc/postfix/header_checks
	unknown_local_recipient_reject_code = 450
	fast_flush_domains =
	smtpd_helo_required = yes
	disable_vrfy_command = yes
	
	smtpd_client_restrictions =
	smtpd_helo_restrictions =
		permit_mynetworks,
		reject_invalid_hostname
		permit
	smtpd_sender_restrictions =
	smtpd_recipient_restrictions =
		permit_mynetworks
		reject_unauth_destination
		reject_non_fqdn_sender
		reject_unknown_recipient_domain
		reject_non_fqdn_recipient
		reject_unauth_pipelining
		check_recipient_access hash:/etc/postfix/recipient_access
	
	smtpd_restriction_classes = greylist
	greylist =
		check_policy_service inet:ip-of-backend-server:60000
	
	smtpd_etrn_restrictions = reject
	
	message_size_limit = 4194304
	qmgr_message_recipient_limit = 20000
	default_process_limit = 100
	qmgr_message_active_limit = 20000
	smtpd_recipient_limit = 128
	smtpd_timeout = 180
	smtpd_error_sleep_time = 50s
	smtpd_hard_error_limit = 10


More information about the MailScanner mailing list