Results 1 to 6 of 6

Thread: Hiding sub-domains in message headers

  1. #1
    Join Date
    Jun 2007
    Location
    BC, Canada
    Posts
    281
    Rep Power
    8

    Default Hiding sub-domains in message headers

    I'm just curious if it is possible to modify the postfix settings such that incoming messages will have the sub-domain stripped out of all message headers, without affecting mail delivery.

    For example, to test our Zimbra install without affecting our current mail setup, we've given it the domain zimbra.ourdomain.com. All messages are sent to @zimbra.ourdomain.com addresses. Our edge MTA routes messages accordingly (@ourdomain.com to our production mail server, @zimbra.ourdomain.org to our Zimbra server, etc).

    Outgoing mail has all headers modified to remove zimbra so that fcash@zimbra.ourdomain.com becomes fcash@ourdomain.com. This is done via canonical_senders in main.cf.

    Incoming mail has all headers modified to add zimbra based on the canonical mappings so that fcash@ourdomain.com becomes fcash@zimbra.ourdomain.com and gets delivered to the correct server.

    Is it possible to edit the postfix config on the zimbra server to strip out the "zimbra", and still have it delivered to the correct account/mailbox? Will it cause any issues if we do this? Is the domain part of the username? Is it as simple as editing the postfix config on the zimbra server?

    Thought I'd check before I go mucking around with our server. Better to get it right from the get go, even if it is a test server.

    Thanks,
    Freddie

  2. #2
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    For sending you should be fine with using canonical addresses (accounts tab of each user or zmprov commands of course) or use aliases for incoming.
    Even faster, see some of these methods like a domain alias, or canonical on the entire domain is called domain masquerading: ManagingDomains - Zimbra :: Wiki

    Eventually when you get rid of your old solution you can just make a new domain in your admin console (createDomain) & move everyone to that domain, or in 5.0 there's a faster zmprov renameDomain command. (If you do that be sure to recreate a hostname.domain.com and make aliases to admin@ root@ postmaster@ etc to get stuff unless you go through zmprov gacf and change all references.)

    Side note:
    The thread title of "Hiding sub-domains in message headers" is a little deceptive to what it sound's like you want to do based on your description.
    You can also change the smtp headers/greetings if you wish to hide your hostname etc from the list of servers that the mail passes through (search for some other threads on this).
    Last edited by mmorse; 12-19-2007 at 06:11 PM.

  3. #3
    Join Date
    Jun 2007
    Location
    BC, Canada
    Posts
    281
    Rep Power
    8

    Default

    From that wiki page, under domain masquerading:
    Code:
    zmprov md domain.com zimbraMailCatchAllAddress @domain.com zimbraMailCatchAllCanonicalAddress @example.com
    zmprov md zimbra.domain.com zimbraMailCatchAllAddress @zimbra.domain.com zimbraMailCatchAllCanonicalAddress @example.com
    Is that first line actually needed? Not sure I understand why one has to create a catchall address to rewrite headers. I'm not up on LDAP terminology, so I may just not be seeing things right, but figured I'd ask first before I blow up our server by omitting it.

  4. #4
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

    Default

    The example uses 2 because their case is:
    If you want mail from user@domain.com or user@zimbra.domain.com to appear to come from user@example.com, you can set the canonical address for the entire domain.

  5. #5
    Join Date
    Jun 2007
    Location
    BC, Canada
    Posts
    281
    Rep Power
    8

    Default

    Ok. So, in our case, we'd just need the second line, along the lines of:
    Code:
    zmprov md zimbra.domain.com zimbraMailCatchAllAddress @zimbra.domain.com zimbraMailCatchAllCanonicalAddress @domain.com
    Just to clarify a bit, that will rewrite addresses in the headers for both incoming and outgoing messages? Or just for incoming messages? Or just for outgoing messages?

  6. #6
    Join Date
    Jun 2009
    Location
    Madison, WI
    Posts
    10
    Rep Power
    6

    Default

    Looks like we were able to add some masquerade_ address lines to /etc/zimbra/postfix/conf/main.cf, and that fixed the email to be sent out to root@domain.com.

Similar Threads

  1. [SOLVED] Searching message headers?
    By gkra in forum Users
    Replies: 2
    Last Post: 08-11-2007, 08:26 AM
  2. Replies: 3
    Last Post: 07-19-2007, 02:00 AM
  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. Replies: 42
    Last Post: 08-11-2006, 09:50 AM
  5. Replies: 4
    Last Post: 08-10-2006, 10:55 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
  •