On Tue, Feb 17, 2015 at 12:48:45AM +0000, Steve Zeng wrote:

> I am running postfix 2.3.3 on Redhat RHEL 5 for a local SMTP MTA. For
> security purpose, we need to restrict its outbound emails to selected
> destination domains only.
> 
> http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions
> 
> The default is:
> smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
> 
> I modified it as:
> smtpd_recipient_restrictions = check_recipient_access 
> hash:/etc/postfix/local_domains, reject

You'll need to post "postconf -n" output to prove this.  Also
relevant master.cf entries in case these contain overrides.

> All outbound emails will be sent to relay host:
> relayhost = mail-vip.local.paygateway.com
> 
> /etc/postfix/local_domains
> mycompany.com             OK
> hotmail. com                     OK
> 
> However, it looks not effective. I can still send outbound email to anywhere.

Via SMTP from outside, or via sendmail(1) locally?

> Do I miss anything?

    http://www.postfix.org/DEBUG_README.html#mail

     * relevant non-verbose logs
     * postconf -n output
     * master entries for relevant services

Please try to not "line-wrap" postconf -n output, while sending
non-HTML email.

-- 
        Viktor.

Reply via email to