Zimbra per domain restriction with multiple userlist
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Zimbra per domain restriction with multiple userlist

  1. #1
    Member
    Join Date
    Jun 2012
    Posts
    21

    Exclamation Zimbra per domain restriction with multiple userlist

    Dear Team,

    i am having zimbra FOS 7.2.0. i have two userlist . i want configuration like bellow
    userlist1 should send mail to gmail and local domain only
    userlist2 should send mail to hotmail and local domain only

    plz. help me

    Thanks,
    shashikant

  2. #2
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,352
    Hello shashikant,
    welcome to the forums!


    A couple of clarifications before we start:
    - Always make a backup of all the config files you edit
    - Run all the commands as the Zimbra user
    - This changes don't survive a Zimbra update, so prepare to re-apply the limitations after each update.


    In order to restrict a list of users to send only to a list of domains you need to:


    * Create the /opt/zimbra/conf/postfix_check_recipient_gmail.cf and add the following line to the file:
    Code:
    check_recipient_access hash:/opt/zimbra/postfix/conf/local_gmail, reject

    * Create the /opt/zimbra/conf/postfix_check_recipient_hotmail.cf and add the following line to the file:
    Code:
    check_recipient_access hash:/opt/zimbra/postfix/conf/local_hotmail, reject

    * Create the "/opt/zimbra/postfix/conf/restricted_senders" and add the users you want to restrict and the related restriction using the following syntax:
    Code:
    user1@yourdomain.com    gmail_only
    user2@yourdomain.com    gmail_only
    user3@yourdomain.com    hotmail_only
    user4@yourdomain.com    hotmail_only
    user5@yourdomain.com    hotmail_only

    * Create the /opt/zimbra/postfix/conf/local_gmail file and add the following lines:
    Code:
    gmail.com    OK
    yourdomain.com    OK

    * Create the /opt/zimbra/postfix/conf/local_hotmail file and add the following lines:
    Code:
    hotmail.com    OK
    yourdomain.com    OK

    * Run the following commands to prepare the files you created so that postfix can use them:
    Code:
    postmap /opt/zimbra/postfix/conf/local_gmail
    postmap /opt/zimbra/postfix/conf/local_hotmail
    postmap /opt/zimbra/postfix/conf/restricted_senders

    * Edit the /opt/zimbra/conf/zmmta.cf file and add the following lines in the "SECTION mta" section:
    Code:
    POSTCONF    smtpd_restriction_classes      gmail_only,hotmail_only
    POSTCONF    gmail_only                                 FILE  postfix_check_recipient_gmail.cf
    POSTCONF    hotmail_only                                 FILE  postfix_check_recipient_hotmail.cf

    * Edit the /opt/zimbra/conf/postfix_recipient_restrictions.cf file and add the following lines at the top:
    Code:
    check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders

    * The MTA should now restart automatically, shouldn't this happen within 2 minutes run the following command to force the restart:
    Code:
    zmmtactl restart

    Your restrictions are now applied.


    Have a nice day,
    Cine
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  3. #3
    Member
    Join Date
    Jun 2012
    Posts
    21

    It is worked as per my requirment

    Dear Cine,
    Thank you for your support, it worked for me.

  4. #4
    Active Member
    Join Date
    Apr 2013
    Posts
    3
    Hello cine,

    I followed your post to do the same setting for my server... Im seeing some error in my mta log. can you pleasee throw some lights to troubleshoot this?

    error log below /var/log/maillog

    Apr 16 06:38:00 trcralpha postfix/smtpd[1701]: fatal: open database /opt/zimbra/postfix/conf/restricted_senders.db: No such file or directory
    Apr 16 06:38:01 trcralpha postfix/master[28174]: warning: process /opt/zimbra/postfix/libexec/smtpd pid 1701 exit status 1
    Apr 16 06:38:01 trcralpha postfix/master[28174]: warning: /opt/zimbra/postfix/libexec/smtpd: bad command startup -- throttling



    please help me here

    Regards/Shamjith
    Quote Originally Posted by Cine View Post
    Hello shashikant,
    welcome to the forums!


    A couple of clarifications before we start:
    - Always make a backup of all the config files you edit
    - Run all the commands as the Zimbra user
    - This changes don't survive a Zimbra update, so prepare to re-apply the limitations after each update.


    In order to restrict a list of users to send only to a list of domains you need to:


    * Create the /opt/zimbra/conf/postfix_check_recipient_gmail.cf and add the following line to the file:
    Code:
    check_recipient_access hash:/opt/zimbra/postfix/conf/local_gmail, reject

    * Create the /opt/zimbra/conf/postfix_check_recipient_hotmail.cf and add the following line to the file:
    Code:
    check_recipient_access hash:/opt/zimbra/postfix/conf/local_hotmail, reject

    * Create the "/opt/zimbra/postfix/conf/restricted_senders" and add the users you want to restrict and the related restriction using the following syntax:
    Code:
    user1@yourdomain.com    gmail_only
    user2@yourdomain.com    gmail_only
    user3@yourdomain.com    hotmail_only
    user4@yourdomain.com    hotmail_only
    user5@yourdomain.com    hotmail_only

    * Create the /opt/zimbra/postfix/conf/local_gmail file and add the following lines:
    Code:
    gmail.com    OK
    yourdomain.com    OK

    * Create the /opt/zimbra/postfix/conf/local_hotmail file and add the following lines:
    Code:
    hotmail.com    OK
    yourdomain.com    OK

    * Run the following commands to prepare the files you created so that postfix can use them:
    Code:
    postmap /opt/zimbra/postfix/conf/local_gmail
    postmap /opt/zimbra/postfix/conf/local_hotmail
    postmap /opt/zimbra/postfix/conf/restricted_senders

    * Edit the /opt/zimbra/conf/zmmta.cf file and add the following lines in the "SECTION mta" section:
    Code:
    POSTCONF    smtpd_restriction_classes      gmail_only,hotmail_only
    POSTCONF    gmail_only                                 FILE  postfix_check_recipient_gmail.cf
    POSTCONF    hotmail_only                                 FILE  postfix_check_recipient_hotmail.cf

    * Edit the /opt/zimbra/conf/postfix_recipient_restrictions.cf file and add the following lines at the top:
    Code:
    check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders

    * The MTA should now restart automatically, shouldn't this happen within 2 minutes run the following command to force the restart:
    Code:
    zmmtactl restart

    Your restrictions are now applied.


    Have a nice day,
    Cine

  5. #5
    ZeXtras Community Manager ZeXtras Employee Cine's Avatar
    Join Date
    Apr 2011
    Posts
    2,352
    Quote Originally Posted by shamjith View Post
    Hello cine,

    I followed your post to do the same setting for my server... Im seeing some error in my mta log. can you pleasee throw some lights to troubleshoot this?

    error log below /var/log/maillog

    Apr 16 06:38:00 trcralpha postfix/smtpd[1701]: fatal: open database /opt/zimbra/postfix/conf/restricted_senders.db: No such file or directory
    Apr 16 06:38:01 trcralpha postfix/master[28174]: warning: process /opt/zimbra/postfix/libexec/smtpd pid 1701 exit status 1
    Apr 16 06:38:01 trcralpha postfix/master[28174]: warning: /opt/zimbra/postfix/libexec/smtpd: bad command startup -- throttling



    please help me here

    Regards/Shamjith
    Hello Shamjth,
    welcome to the forums!

    The error you report is about a missing restricted_senders.db file... Are you sure that you correctly executed the "postmap /opt/zimbra/postfix/conf/restricted_senders" command?

    Have a nice day,
    Cine
    IT Support Team Contact Form
    Sales Team Contact Form

    ZeXtras Website
    # ZeXtras Wiki # ZeXtras Store

    Have ZeXtras Suite or ZeXtras Migration Tool been helpful to you?
    Share your experience in the Zimbra Gallery!

    ZeXtras Suite on the Zimbra Gallery
    ZeXtras Migration Tool on the Zimbra Gallery

  6. #6
    Active Member
    Join Date
    Apr 2013
    Posts
    3
    Thanks cine..my apology

    I was keep trying creating restricted_senders file in /opt/zimbra/conf/restricted_senders instead of /opt/zimbra/postfix/conf/restricted_senders

    little clarification on the warning message I get, is there a way to suppress the message details when an address is blocked??Entire message in code appearing in bounce alert!!...its just a beautification..i know you will have some tricks

    Thanks again

    Regards/Shamjith


    Quote Originally Posted by Cine View Post
    Hello Shamjth,
    welcome to the forums!

    The error you report is about a missing restricted_senders.db file... Are you sure that you correctly executed the "postmap /opt/zimbra/postfix/conf/restricted_senders" command?

    Have a nice day,
    Cine

  7. #7
    Active Member
    Join Date
    Apr 2013
    Posts
    3
    Hi,

    can you please share the settings to block receiving restriction as well??

    like user1@yourdomain.com should recieve emails only from gmail.com/yourdomain.com?

    Regards/Shamjith



    Quote Originally Posted by Cine View Post
    Hello shashikant,
    welcome to the forums!


    A couple of clarifications before we start:
    - Always make a backup of all the config files you edit
    - Run all the commands as the Zimbra user
    - This changes don't survive a Zimbra update, so prepare to re-apply the limitations after each update.


    In order to restrict a list of users to send only to a list of domains you need to:


    * Create the /opt/zimbra/conf/postfix_check_recipient_gmail.cf and add the following line to the file:
    Code:
    check_recipient_access hash:/opt/zimbra/postfix/conf/local_gmail, reject

    * Create the /opt/zimbra/conf/postfix_check_recipient_hotmail.cf and add the following line to the file:
    Code:
    check_recipient_access hash:/opt/zimbra/postfix/conf/local_hotmail, reject

    * Create the "/opt/zimbra/postfix/conf/restricted_senders" and add the users you want to restrict and the related restriction using the following syntax:
    Code:
    user1@yourdomain.com    gmail_only
    user2@yourdomain.com    gmail_only
    user3@yourdomain.com    hotmail_only
    user4@yourdomain.com    hotmail_only
    user5@yourdomain.com    hotmail_only

    * Create the /opt/zimbra/postfix/conf/local_gmail file and add the following lines:
    Code:
    gmail.com    OK
    yourdomain.com    OK

    * Create the /opt/zimbra/postfix/conf/local_hotmail file and add the following lines:
    Code:
    hotmail.com    OK
    yourdomain.com    OK

    * Run the following commands to prepare the files you created so that postfix can use them:
    Code:
    postmap /opt/zimbra/postfix/conf/local_gmail
    postmap /opt/zimbra/postfix/conf/local_hotmail
    postmap /opt/zimbra/postfix/conf/restricted_senders

    * Edit the /opt/zimbra/conf/zmmta.cf file and add the following lines in the "SECTION mta" section:
    Code:
    POSTCONF    smtpd_restriction_classes      gmail_only,hotmail_only
    POSTCONF    gmail_only                                 FILE  postfix_check_recipient_gmail.cf
    POSTCONF    hotmail_only                                 FILE  postfix_check_recipient_hotmail.cf

    * Edit the /opt/zimbra/conf/postfix_recipient_restrictions.cf file and add the following lines at the top:
    Code:
    check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders

    * The MTA should now restart automatically, shouldn't this happen within 2 minutes run the following command to force the restart:
    Code:
    zmmtactl restart

    Your restrictions are now applied.


    Have a nice day,
    Cine

  8. #8
    Active Member
    Join Date
    Jul 2013
    Posts
    4

    Smile Zimbra per domain restriction

    Hi,

    I am using Zimbra Release 5.0.2_GA_1975.RHEL5_20080130221917 CentOS5 FOSS edition. i have configure multiple domains on same Server. i want configuration like bellow:

    domain1 should send mail to all external domains
    domain2 should send mail to all but drop email to *@gmail.com

    if its not clear to you guys please feel free to ask, your help will be highly appreciated.

    Thanks,
    Asghar Durrani

  9. #9
    Active Member
    Join Date
    Jul 2013
    Posts
    4
    Hi,

    Is this solution appliciable on Zimbra Release 5.0.2_GA_1975.RHEL5_20080130221917 CentOS5 FOSS edition ????

    If yes please reply.

    Thanks,
    Asghar

  10. #10
    Active Member
    Join Date
    Jul 2013
    Posts
    4
    Guys,

    I seriously need help in this.

    Thanks,
    Asghar

Page 1 of 2 12 LastLast

LinkBacks (?)

  1. 01-30-2014, 12:18 AM
  2. 07-08-2013, 10:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •