Wednesday, December 24, 2008

Restricting users to send mails to off-site destinations in Postfix & Zimbra


Configuring Postfix in a way that some users can only send mails to internet and some users not. The users without internet access should get bounce message.

This steps can also use in zimbra

smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/restricted_senders
...other stuff...

smtpd_restriction_classes = local_only
local_only =
check_recipient_access hash:/etc/postfix/local_domains, reject

foo@domain local_only
bar@domain local_only

this.domain OK matches this.domain and subdomains
that.domain OK matches that.domain and subdomains
Once after adding email id restricted_senders, the database should get updated.

Run following commands :
/opt/zimbra/postfix/sbin/postmap:~ /opt/zimbra/postfix/conf/restricted_senders

/opt/zimbra/postfix/sbin/postfix reload

1 comment:

Gopal M said...

Thanks for the TIP,

But it works fine in outlook connection buy not in webmail.

ANY ides on this