Results 1 to 8 of 8

Thread: Configure postfix in ZCS v8 as theres no postmap command

  1. #1
    SFX Group's Avatar
    SFX Group is offline Intermediate Member
    Join Date
    Dec 2012
    Location
    Cambridge, ON. Canada
    Posts
    16
    Rep Power
    2

    Question Configure postfix in ZCS v8 as theres no postmap command

    Hi

    I am testing Zimbra ZCS v8 (Ubuntu v10), i need to edit the postfix main.cf (which i assume its the one located /opt/zimbra/postfix/conf/main.cf), however as Zimbra loads its own version of postfix, there doesn't seem to be the command postmap which i would need to hash the maps file and password file.

    Am i safe loading the default postfix in Ubuntu then disabling the service or will it break everything (so i can get access to postmap command)?

    I am needing to set up a relay map file for each sender (using the FROM address) so will attempt to use "sender_dependent_relayhost_maps" in the main config. There are some email addresses i need to relay, the rest i need Zimbra to send end to end direct from the MTA.

    I have never played with postfix before so if there's a better way of doing this please let me know (not liking the idea of playing with the config directly but zimbra doesn't seem to allow me o setup each FROM address with SMTP authentication).

    Last how do i find the version of postfix Zimbra is using?

    Many Thanks
    Many Thanks
    Ashley

    © Copyright 2013 - www.ashleygriffin.ca

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,569
    Rep Power
    57

    Default

    Quote Originally Posted by SFX Group View Post
    I am testing Zimbra ZCS v8 (Ubuntu v10), i need to edit the postfix main.cf (which i assume its the one located /opt/zimbra/postfix/conf/main.cf), however as Zimbra loads its own version of postfix, there doesn't seem to be the command postmap which i would need to hash the maps file and password file.
    It's provided in all versions of ZCS (and certainly on my servers), are you running postmap as the zimbra user?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    SFX Group's Avatar
    SFX Group is offline Intermediate Member
    Join Date
    Dec 2012
    Location
    Cambridge, ON. Canada
    Posts
    16
    Rep Power
    2

    Default

    Hi Bill

    Running the command as zimbra user confirms i have postmap which is good.

    However i also run the command "postconf | grep version" to give me the postfix version and it says v2.10-20120422, which creates and issue as "sender_dependent_relayhost_maps" only works in version 2.3 or later. But the date code is 20120422 so i am confused

    Many Thanks
    Many Thanks
    Ashley

    © Copyright 2013 - www.ashleygriffin.ca

  4. #4
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,569
    Rep Power
    57

    Default

    The version you have installed is 2.10 which is more recent than the 2.3 version, are you having a specific problem or is something not working?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    SFX Group's Avatar
    SFX Group is offline Intermediate Member
    Join Date
    Dec 2012
    Location
    Cambridge, ON. Canada
    Posts
    16
    Rep Power
    2

    Default

    how do the versions work with postfix (2.1 being newer than 2.3????)

    I need to enable sender specific relaying.... as an example...

    Zimbra handles all emails for:
    domaina.com
    domainb.com
    domainc.com

    Needs:
    domaina.com
    - all mail sent from this domain leaves MTA direct to the receiving SMTP server (end to end)

    domainb.com
    - all mail sent from this domain has to be relayed through mail.filter.domain.com (no username / password needed).

    john@domainc.com
    - all mail from this sender has to be relayed through smtp.server.com (with specific username and password via TLS specific to this user)
    sue@domainc.com
    - all mail from this sender has to be relayed through smtp.server.domain.com (with specific username and password via TLS specific to this user)


    I hope this explains in more detail, i was going to attempt to use "sender_dependent_relayhost_maps" and only listing the needed domain / from addresses needed in the relay file then zimbra falling back to the default smtp method (end to end) when it doesn’t find domainb.com or the senders from domainc.com in those map files
    Many Thanks
    Ashley

    © Copyright 2013 - www.ashleygriffin.ca

  6. #6
    virtualmarc is offline Active Member
    Join Date
    Jun 2011
    Location
    Essen, Germany
    Posts
    28
    Rep Power
    4

    Default

    Hi,

    the Version 2.10 is not 2.1 !

    To send E-Mails through external servers you have to setup a relay. Configuring through postconf is not recommended (at the next Zimbra restart and on upgrades the settings are overridden).
    You can set your postconf settings through:
    zmlocalconfig -e postfix_<postconf_variable_name>=<value>

    Heres an example how to send E-Mails through external relays. They are not send over TLS but it might be a beginning:

    In the Zimba Settings at the user account allow him only to send e-mails from the given accounts and add the external e-mail addresses.

    Then goto the serversettings in the MTA Tab and disable DNS lookups.

    For the next steps you have to login to your server as user zimbra.

    Now run the following command:
    Code:
    zmprov mc default zimbraSmtpRestrictEnvelopeFrom FALSE
    In the next step you need a relayhost mapping.
    Create a config file for the maps, e.g. /opt/zimbra/conf/relayhost_map
    In this file list the e-mail addresses and the external servers. One E-Mail address per line:
    Code:
    my@external.tld mail.external.tld:port
    The next config file is for authentication. e.g. /opt/zimbra/conf/relay_password
    In this file list the e-mail addresses with their usernames and passwords. One E-Mail address per line:
    Code:
    my@external.tld username:password
    The next step is to configure postfix to send through external relays. Since Zimbra8 postconf settings were overridden on the next restart so you have to set these settings through Zimbra.
    These are the needed commands:
    Code:
    zmlocalconfig -e postfix_smtp_sender_dependent_authentication=yes
    zmlocalconfig -e postfix_sender_dependent_relayhost_maps=hash:/opt/zimbra/conf/relayhost_map
    zmlocalconfig -e postfix_smtp_sasl_auth_enable=yes
    zmlocalconfig -e postfix_smtp_sasl_password_maps=hash:/opt/zimbra/conf/relay_password
    zmlocalconfig -e postfix_smtp_cname_overrides_servername=no
    zmlocalconfig -e postfix_smtp_use_tls=no # maybe setting this to yes for TLS?
    zmlocalconfig -e postfix_smtp_sasl_security_options=noanonymous
    Now you have to create the database files for the relay map files. You have to run this commands everytime you change relayhost_map or relay_password:
    Code:
    postmap /opt/zimbra/conf/relayhost_map
    postmap /opt/zimbra/conf/relay_password
    Now you can reload/restart Zimbra to enable this configuration

    The last step is to configure personalities at the Zimbra Frontend where you can add external POP3/IMAP Accounts.
    Now you can send E-Mails through remote SMTP Servers.

    Would be a nice idea for Zimbra 9 to directly integrate the ability to send e-mails from external servers.

  7. #7
    SFX Group's Avatar
    SFX Group is offline Intermediate Member
    Join Date
    Dec 2012
    Location
    Cambridge, ON. Canada
    Posts
    16
    Rep Power
    2

    Default

    Hi virtualmarc

    Thanks for the information, i will read this in depth (with questions) later today.

    I have spoken with VMWare about the external server / relay issue, as it has problems for MSP as well (senidng different domains to different filters.

    Many Thanks
    Many Thanks
    Ashley

    © Copyright 2013 - www.ashleygriffin.ca

  8. #8
    SFX Group's Avatar
    SFX Group is offline Intermediate Member
    Join Date
    Dec 2012
    Location
    Cambridge, ON. Canada
    Posts
    16
    Rep Power
    2

    Default

    Quote Originally Posted by virtualmarc View Post
    Then goto the serversettings in the MTA Tab and disable DNS lookups.
    Hi

    Was reading about the above setting, if i turn this off then i cant send email "end to end", this is ok for sending the email to a relay, however with any email that will not be sent to an SMTP relay, shouldnt this be left "on" so it can look up an SMTP host to send a mail to.

    This will be any emails that are not FROM someone in the relay loop up map file.
    Many Thanks
    Ashley

    © Copyright 2013 - www.ashleygriffin.ca

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 12-05-2010, 08:19 AM
  2. postmap??
    By maceee in forum Administrators
    Replies: 3
    Last Post: 07-01-2010, 05:37 AM
  3. Replies: 3
    Last Post: 04-09-2010, 11:26 AM
  4. Upgrade to 5.0.8 Broke Postmap Database
    By weathertation in forum Administrators
    Replies: 0
    Last Post: 08-20-2008, 11:49 AM
  5. Helo command - Need Change postfix settings
    By DEALER in forum Installation
    Replies: 11
    Last Post: 03-13-2008, 03:29 AM

Tags for this Thread

Posting Permissions

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