Results 1 to 3 of 3

Thread: Restricting incoming and outgoing email for user

  1. #1
    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    7

    Default Restricting incoming and outgoing email for user

    Hi,
    I am new to zimbra, this is the version that I have installed 5.01 RHEL5.FOSS.
    Everything are okay but I failed to customize the following:
    What I would to achieve is in a domain, let says, "mydomain.com", there are 2 users; "test1@mydomain.com" and "test2@mydomain.com". I would like the user "test1" able to send mail within this domain only, "mydomain.com" and "test1" is not allowed to receive any external mail (from Internet).
    As for user "test2", there is no restriction at all.

    I have been successful in restricting user "test1" to send external mail but I can't figure out how to make it deny receiving external mail.

    For the last few hours I have been reading on the zimbra's wiki and found these 2 posting
    Restrict sending to certain domains - Zimbra :: Wiki
    RestrictPostfixRecipients - Zimbra :: Wiki
    There are quite close to what I wanted to do but I dont how to put them together.

    Can some expert help?


    The following are some config file:
    main.cf
    sender_canonical_maps = ldap:/opt/zimbra/conf/ldap-scm.cf
    virtual_alias_domains = ldap:/opt/zimbra/conf/ldap-vad.cf
    recipient_delimiter =
    smtpd_tls_cert_file = /opt/zimbra/conf/smtpd.crt
    smtpd_tls_auth_only = yes
    myhostname = nmsc.mydomain.com
    virtual_mailbox_domains = ldap:/opt/zimbra/conf/ldap-vmd.cf
    mydestination = localhost
    mailbox_size_limit = 0
    smtpd_client_restrictions = reject_unauth_pipelining
    virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf
    transport_maps = ldap:/opt/zimbra/conf/ldap-transport.cf
    sendmail_path = /opt/zimbra/postfix-2.4.3.3z/sbin/sendmail
    message_size_limit = 10240000
    broken_sasl_auth_clients = yes
    alias_maps = hash:/etc/aliases
    manpage_directory = /opt/zimbra/postfix-2.4.3.3z/man
    smtpd_helo_required = yes
    daemon_directory = /opt/zimbra/postfix-2.4.3.3z/libexec
    virtual_transport = error
    mynetworks = 127.0.0.0/8 192.168.162.0/24
    smtpd_recipient_restrictions = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit
    smtpd_tls_loglevel = 1
    relayhost =
    disable_dns_lookups = no
    content_filter = smtp-amavis:[127.0.0.1]:10024
    virtual_mailbox_maps = ldap:/opt/zimbra/conf/ldap-vmm.cf
    version = 2.4.3.3z
    mailq_path = /opt/zimbra/postfix-2.4.3.3z/sbin/mailq
    header_checks = pcre:/opt/zimbra/conf/postfix_header_checks
    smtpd_use_tls = yes
    queue_directory = /opt/zimbra/postfix-2.4.3.3z/spool
    newaliases_path = /opt/zimbra/postfix-2.4.3.3z/sbin/newaliases
    smtpd_reject_unlisted_recipient = no
    smtpd_data_restrictions = reject_unauth_pipelining
    smtpd_tls_key_file = /opt/zimbra/conf/smtpd.key
    command_directory = /opt/zimbra/postfix-2.4.3.3z/sbin
    smtpd_sasl_auth_enable = yes
    smtpd_sender_restrictions = check_sender_access hash:/opt/zimbra/conf/tpmail_senders
    smtpd_restriction_classes = restrict_tpmail
    restrict_tpmail = check_recipient_access hash:/opt/zimbra/conf/tpmail_recipients, reject
    permitted_senders_list = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit
    [root@zimbra conf]# cat tpmail_senders
    test1@mydomain.com restrict_tpmail
    [root@zimbra conf]# cat tpmail_recipients
    mydomain.com OK

  2. #2
    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    7

    Default try on second option

    Hi,

    I tried on
    RestrictPostfixRecipients - Zimbra :: Wiki

    but I am getting this error
    [zimbra@zimbra conf]$ telnet mydomain.com 25
    Trying 192.168.162.128...
    Connected to mydomain.com (192.168.162.128).
    Escape character is '^]'.
    220 mydomain.com ESMTP Postfix
    helo
    501 Syntax: HELO hostname
    helo test.com
    250 mydomain.com
    mail from:abc@test.com
    250 2.1.0 Ok
    rcpt to:test1@mydomain.com
    451 4.3.5 Server configuration error
    postconf -n
    [zimbra@zimbra conf]$ postconf -n
    alias_maps = hash:/etc/aliases
    broken_sasl_auth_clients = yes
    command_directory = /opt/zimbra/postfix-2.4.3.3z/sbin
    config_directory = /opt/zimbra/postfix-2.4.3.3z/conf
    content_filter = smtp-amavis:[127.0.0.1]:10024
    daemon_directory = /opt/zimbra/postfix-2.4.3.3z/libexec
    disable_dns_lookups = no
    header_checks = pcre:/opt/zimbra/conf/postfix_header_checks
    mailbox_size_limit = 0
    mailq_path = /opt/zimbra/postfix-2.4.3.3z/sbin/mailq
    manpage_directory = /opt/zimbra/postfix-2.4.3.3z/man
    message_size_limit = 10240000
    mydestination = localhost
    myhostname = nmsc.dynalias.com
    mynetworks = 127.0.0.0/8 192.168.162.0/24
    newaliases_path = /opt/zimbra/postfix-2.4.3.3z/sbin/newaliases
    queue_directory = /opt/zimbra/postfix-2.4.3.3z/spool
    recipient_delimiter =
    relayhost =
    sender_canonical_maps = ldap:/opt/zimbra/conf/ldap-scm.cf
    sendmail_path = /opt/zimbra/postfix-2.4.3.3z/sbin/sendmail
    smtpd_client_restrictions = reject_unauth_pipelining
    smtpd_data_restrictions = reject_unauth_pipelining
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients, reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit
    smtpd_reject_unlisted_recipient = no
    smtpd_restriction_classes = restrict_tpmail
    smtpd_sasl_auth_enable = yes
    smtpd_sender_restrictions = check_sender_access hash:/opt/zimbra/conf/tpmail_senders
    smtpd_tls_auth_only = yes
    smtpd_tls_cert_file = /opt/zimbra/conf/smtpd.crt
    smtpd_tls_key_file = /opt/zimbra/conf/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_use_tls = yes
    transport_maps = ldap:/opt/zimbra/conf/ldap-transport.cf
    virtual_alias_domains = ldap:/opt/zimbra/conf/ldap-vad.cf
    virtual_alias_maps = ldap:/opt/zimbra/conf/ldap-vam.cf
    virtual_mailbox_domains = ldap:/opt/zimbra/conf/ldap-vmd.cf
    virtual_mailbox_maps = ldap:/opt/zimbra/conf/ldap-vmm.cf
    virtual_transport = error
    [zimbra@zimbra conf]$

  3. #3
    Join Date
    Sep 2008
    Posts
    8
    Rep Power
    7

    Default

    Hi tanhsjunk,

    I've just got the same problem and I decide to remove all the files and then create again (remember remove permitted_senders.db and protected_recipients.db as well), and then it's works perfectly. May be you should delete and create those scripts again.

    Good luck ^^!

Similar Threads

  1. Replies: 3
    Last Post: 05-29-2009, 03:59 PM
  2. Incoming email fail
    By ir_syam in forum Administrators
    Replies: 3
    Last Post: 08-04-2008, 10:59 PM
  3. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  4. Zimbra: Outgoing Email Issues
    By leebrent in forum Installation
    Replies: 7
    Last Post: 05-18-2007, 12:42 PM
  5. choose incoming or outgoing
    By naturalblue in forum Installation
    Replies: 1
    Last Post: 04-16-2006, 01:52 PM

Posting Permissions

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