Hello,
I need to only allow access to known addresses, and found that setting up 
smtpd_recipient_restrictions in main.cf would reject unauthorized recipients. I 
have this setting in main.cf:

smtpd_recipient_restrictions = hash:/etc/postfix/allowed_users, 
reject_unauth_destination


I ran "postmap allowed_users", and restarted postfix. However, no recipients 
are being denied. I ran "postmap -q some...@host.com hash:allowed_users", and 
the command replied with an OK. I tried with
an invalid account, and postmap returned a 1 which is what I expected.
Is there something I'm doing wrong?

Here is my main.cf in case that helps.

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
mydomain = host.com
inet_interfaces = all
mydestination = some.host.com 
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.0.0/24, 192.168.90.0/24, 192.168.20.0/24
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
local_header_rewrite_clients = static:all
masquerade_domains = .host.com host.com
always_bcc = usern...@host.com
maximal_queue_lifetime = 100d
bounce_queue_lifetime = 100d
maximal_backoff_time = 900s
smtpd_recipient_restrictions = hash:/etc/postfix/allowed_users, 
reject_unauth_destination


Thank you.


      

Reply via email to