Hi all,
I’ve one of those situations where mailboxes are @localdomain and users should be able to send messages outside via external relay as, let’s say, externaluser@realdomain.com.
So the goal here is:
sender user@localdomain -> *anyuser*@localdomain ----> no rewrite
sender user@localdomain -> rest of the world ----> sender rewrite as externaluser@realdomain.com -> external relay
Postfix has a parameter for this: smtp_generic_maps (zimbraMtaSmtpGenericMaps), this works but problem is that senders are rewritten when recipients are internal too – and that's quite strange (as Postfix guide says "It does not happen when you send mail between addresses on the local machine").
Any suggestions?
Thanks
P.S. I'm already using Personas as external accounts, the issue here is when using internal accounts only.
Sender address rewrite from internal to external domains (Zimbra 8.7)
Re: Sender address rewrite from internal to external domains (Zimbra 8.7)
Same situation. I think need a feature request.
- oetiker
- Outstanding Member
- Posts: 276
- Joined: Fri Mar 07, 2014 1:05 pm
- Location: Switzerland
- ZCS/ZD Version: Release 10.0.6.GA.4518.UBUNTU20_64
- Contact:
Re: Sender address rewrite from internal to external domains (Zimbra 8.7)
hi
does this not work with a sender_canonical map. I could not found a who to about that but since zimbra is using postfix it should
be done by a sender_canonical_map
somthing like this https://wiki.zimbra.com/wiki/How_to_red ... o_one_user example just with an other map
on that page https://wiki.zimbra.com/wiki/Postconf_keys I found the key zimbraMtaSenderCanonicalMaps
cat /opt/zimbra/conf/postfix_sender_canonical
has anybody done this?
cheers Manuel
does this not work with a sender_canonical map. I could not found a who to about that but since zimbra is using postfix it should
be done by a sender_canonical_map
somthing like this https://wiki.zimbra.com/wiki/How_to_red ... o_one_user example just with an other map
on that page https://wiki.zimbra.com/wiki/Postconf_keys I found the key zimbraMtaSenderCanonicalMaps
Code: Select all
zmprov mcf zimbraMtaSenderCanonicalMaps 'pcre:/opt/zimbra/conf/postfix_sender_canonical'
Code: Select all
@localdomain @realdomain.com
cheers Manuel
Re: Sender address rewrite from internal to external domains (Zimbra 8.7)
Hello! Could you explain, before adding persona's external email, did you created domain alias for that external mail?opsystem wrote:Hi all,
I’ve one of those situations where mailboxes are @localdomain and users should be able to send messages outside via external relay as, let’s say, externaluser@realdomain.com.
So the goal here is:
sender user@localdomain -> *anyuser*@localdomain ----> no rewrite
sender user@localdomain -> rest of the world ----> sender rewrite as externaluser@realdomain.com -> external relay
Postfix has a parameter for this: smtp_generic_maps (zimbraMtaSmtpGenericMaps), this works but problem is that senders are rewritten when recipients are internal too – and that's quite strange (as Postfix guide says "It does not happen when you send mail between addresses on the local machine").
Any suggestions?
Thanks
P.S. I'm already using Personas as external accounts, the issue here is when using internal accounts only.
By your example:
you have user@localdomain mailbox -> but you need to send a message from user@realdomain -> do you create @realdomain alias to @localdomain ? Or just create a persona and allow user's persona send mail from user@realdomain in
"admin console-> edit the account (or COS)-> select the 'Preferences' tab -> Allow sending mail only from these addresses: " ?
OH, +1 to the topic question!
upd. i've found that solution. I think it's very similar to.
Re: Sender address rewrite from internal to external domains (Zimbra 8.7)
Just a little information about this solution, the file /opt/zimbra/conf/postfix_sender_canonical need to be in regular expresion, likeoetiker wrote:hi
does this not work with a sender_canonical map. I could not found a who to about that but since zimbra is using postfix it should
be done by a sender_canonical_map
somthing like this https://wiki.zimbra.com/wiki/How_to_red ... o_one_user example just with an other map
on that page https://wiki.zimbra.com/wiki/Postconf_keys I found the key zimbraMtaSenderCanonicalMapscat /opt/zimbra/conf/postfix_sender_canonicalCode: Select all
zmprov mcf zimbraMtaSenderCanonicalMaps 'pcre:/opt/zimbra/conf/postfix_sender_canonical'
has anybody done this?Code: Select all
@localdomain @realdomain.com
cheers Manuel
Code: Select all
/^(.*@)localdomain$/ ${1}realdomain.com
Re: Sender address rewrite from internal to external domains (Zimbra 8.7)
Hi opsystem, did you resolve your issue? Is it a bug ? Thanks a lot !