Jarrod Neven a écrit : > I am trying to setup restriction to prevent selected users from sending > email externally. I have followed the "Restricting what users can send > mail to off-site destinations" guide at > http://www.postfix.net/RESTRICTION_CLASS_README.html but it is not > having any effect. > > It appears that no matter what I do smtpd_recipient_restrictions has no > effect. Have set the hash file to an invalid file and created syntax > errors and there are no error messages in the log, even set > smtpd_recipient_restrictions = reject and it did nothing. > > In maser.cf I have added -v -v to the smtpd process and it shows no > mention of the value smtpd_recipient_restrictions, looks like it is > ignored completely. > > Is anything that can prevent smtpd_recipient_restrictions from working? > Maybe a compiled option missing? > > I have postfix 2.5.1 on centos 64bit > > #postconf -n > config_directory = /etc/postfix > mail_owner = postfix > setgid_group = postdrop > smtpd_client_restrictions = check_sender_access > hash:/etc/postfix/restricted_senders > smtpd_delay_reject = no
this is not recommended. when you use it, you are on your own. > smtpd_recipient_restrictions = check_sender_access > hash:/etc/postfix/restricted_senders this doesn't work. you should see a warning in your logs. if it worked, you'd be an open relay unless your check_sender_access rejects all mail. anyway, look at your master.cf. you may have overriden your smtpd restrictions there... > smtpd_restriction_classes = local_only > smtpd_sender_restrictions = check_sender_access > hash:/etc/postfix/restricted_senders > virtual_alias_maps = mysql:$config_directory/mysql_virtual_alias_maps.cf > <http://mysql_virtual_alias_maps.cf> > virtual_gid_maps = static:12 > virtual_mailbox_base = /var/vmail > virtual_mailbox_domains = > mysql:$config_directory/mysql_virtual_mailbox_domains.cf > <http://mysql_virtual_mailbox_domains.cf> > virtual_mailbox_limit_maps = > mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf > <http://mysql_virtual_mailbox_limit_maps.cf> > virtual_mailbox_maps = > mysql:$config_directory/mysql_virtual_mailbox_maps.cf > <http://mysql_virtual_mailbox_maps.cf> > virtual_minimum_uid = 101 > virtual_transport = dovecot > virtual_uid_maps = static:101 >
