Wednesday, December 24, 2008

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

Hi...

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

/etc/postfix/main.cf:
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

/etc/postfix/restricted_senders:
foo@domain local_only
bar@domain local_only

/etc/postfix/local_domains:
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

Thanks
Gopal