Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-2007, 10:55 AM
Elite Member
 
Posts: 281
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
Reply With Quote
  #2 (permalink)  
Old 12-19-2007, 11:02 AM
Moderator
 
Posts: 6,237
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..
Reply With Quote
  #3 (permalink)  
Old 12-19-2007, 11:39 AM
Elite Member
 
Posts: 281
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.
Reply With Quote
  #4 (permalink)  
Old 12-19-2007, 11:47 AM
Moderator
 
Posts: 6,237
Default

The example uses 2 because their case is:
Quote:
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.
Reply With Quote
  #5 (permalink)  
Old 12-19-2007, 12:04 PM
Elite Member
 
Posts: 281
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?
Reply With Quote
  #6 (permalink)  
Old 08-17-2009, 02:01 PM
Member
 
Posts: 10
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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.