Results 1 to 4 of 4

Thread: Good old user restriction to/from outside the domain

Hybrid View

  1. #1
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    2

    Question Good old user restriction to/from outside the domain

    Hello everyone.

    I've been through the wiki, forum search and actually found a partial solution to my issue.
    So, let me go over what I need and did so far.

    I need a couple of my users to not be able to receive e-mail nor send e-mail outside their domain.

    So I've found plenty of articles describing how to prevent them to send e-mail outside the domain, implemented, tested, it works!
    But blocking mail from outside the domain is the problem.


    So, what I've done so far.

    As zimbra user:

    Code:
    $ cd /opt/zimbra/conf
    
    $ echo "user1@mydomain.lan restrict_tpmail" > tpmail_senders
    $ postmap tpmail_senders
    
    $ echo "mydomain.lan OK" > tpmail_recipients
    $ postmap tpmail_recipients
    
    $ vi zmconfigd.cf
    in the SECTION mta DEPENDS amavis, under the line POSTCONF virtual_transport LOCAL postfix_virtual_transport
    
    POSTCONF smtpd_sender_restrictions FILE postfix_sender_restrictions.cf
    POSTCONF smtpd_recipient_restrictions           FILE postfix_recipient_restrictions.cf
    POSTCONF smtpd_restriction_classes restrict_tpmail
    POSTCONF restrict_tpmail FILE postfix_restrict_tpmail.cf
    
    $ echo "check_sender_access hash:/opt/zimbra/conf/tpmail_senders" > postfix_sender_restrictions.cf
    $ echo "check_recipient_access hash:/opt/zimbra/conf/tpmail_recipients, reject" >> postfix_restrict_tpmail.cf
    
    $ cat postfix_sender_restrictions.cf 
    check_sender_access hash:/opt/zimbra/conf/tpmail_senders
    
    $ cat postfix_recipient_restrictions.cf 
    check_sender_access hash:/opt/zimbra/conf/tpmail_senders
    
    $ cat postfix_restrict_tpmail.cf 
    check_recipient_access hash:/opt/zimbra/conf/tpmail_recipients, reject
    
    $ cat tpmail_recipients
    mydomain.lan OK
    
    $ cat tpmail_senders
    user1@mydomain.lan restrict_tpmail
    
    $ zmmtactl restart

    So, I've setup a second domain on my zimbra test box, when sending email from user1@mydomain.lan to testuser@otherdomain.lan I get the message not send popup warning like its expected.
    But when I send mail from testuser@otherdomain.lan to user1@mydomain.lan it just gets there, and it isnt blocked.
    Mail inside mydomain.lan works just fine.


    Any tips? Any other info I can provide?

  2. #2
    Join Date
    Nov 2012
    Location
    Bangalore
    Posts
    173
    Rep Power
    3

    Default

    ZCS Version please

    zmcontrol -v

  3. #3
    Join Date
    Jul 2013
    Posts
    5
    Rep Power
    2

    Default

    Quote Originally Posted by Raunaq View Post
    ZCS Version please

    zmcontrol -v
    Here it is, can't believe I forgot to mention it.


    zimbra@zimbra:~$ zmcontrol -v
    Release 8.0.4.GA.5737.UBUNTU12.64 UBUNTU12_64 FOSS edition.

  4. #4
    Join Date
    Nov 2013
    Posts
    4
    Rep Power
    2

    Default

    Any progress ? I am also interested in a solution.

Similar Threads

  1. Zimbra per domain restriction
    By Asghar in forum Administrators
    Replies: 2
    Last Post: 07-08-2013, 10:58 PM
  2. Per user mail sending restriction implementation
    By stalker in forum Administrators
    Replies: 7
    Last Post: 06-17-2011, 04:12 AM
  3. User creation and address book restriction
    By hispa in forum Installation
    Replies: 0
    Last Post: 02-02-2009, 09:13 AM
  4. User to User mail Restriction in Zimbra
    By Keemat in forum Administrators
    Replies: 4
    Last Post: 06-21-2008, 10:29 AM

Posting Permissions

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