I'm using Postfix on RHEL5. I want my local users to only be able to send and receive emails from users on another mail server, I do not want local users to be able to email eachother. I have not been able to prevent local users from emailing eahcother. It seems my check_recipient_access is not working.
My logic is as follows: check_sender_access will allow all emails from "@other-domain" check_recipient_access will allow all emails to "@other-domain" check_recipient_access will reject all other emails Does this look correct? ----------------------------------------------------- main.cf ----------------------------------------------------- ... relayhost = 192.168.1.5 ... smtpd_recipient_restrictions = check_sender_access regexp:/etc/postfix/check_sender_access.regexp, check_recipient_access regexp:/etc/postfix/check_recipient_access.regexp, check_relay_domains, reject_unauth_destination ----------------------------------------------------- /etc/postfix/check_sender_access.regexp contents: ----------------------------------------------------- /^...@other-domain\.com$/ OK ----------------------------------------------------- /etc/postfix/check_recipient_access.regexp contents: ----------------------------------------------------- /^...@other-domain\.com$/ OK /.*/ REJECT At one point, I changed check_sender_access.regexp to REJCT emails from "@other-domain", and it worked. Emails got rejected. So I believe that the check_sender_access.regexp files is working. ----------------------------------------------------- postconf -n ----------------------------------------------------- alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix content_filter = smtp-amavis:[127.0.0.1]:10024 daemon_directory = /usr/libexec/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mime_header_checks = regexp:/etc/postfix/mime_header_checks.regexp mydestination = $mydomain, $myhostname, localhost myhostname = acmemail.acmecorp.local mynetworks = 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES relayhost = 192.168.1.5 sample_directory = /usr/share/doc/postfix-2.3.3/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = check_sender_access regexp:/etc/postfix/check_sender_access.regexp, reject_unauth_destination, check_recipient_access regexp:/etc/postfix/check_recipient_access.regexp, check_relay_domains, reject unknown_local_recipient_reject_code = 550 [r...@acmemail postfix]# _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
