I've saw this problem in 5.0.4 too and ignored it assuming that it was user error, but I've seen it again and reproduced it several times...
Problem: When I send mail using an identity that matches an alias setup for an account, Zimbra sets the from and replyto headers to the main address of that account.
I use a catch-all sub-domain so I can give companies and groups I deal with different addresses to contact me on - so I can easily kill an address if a company/group/individual passes my address on intentionally or through lack of due diligence. I have the catch-all sub-domain pointing to my main account except addresses that now attract spam which are aliases of another account. For example:
If I setup an identity in the account for
me@doman.tld with the from and reply-to settings set to
addr1@sub.domain.com the from and reply-to headers of the outgoing mail are given as
spamtrap@domain.tld and if I do the same for addr3@ (i.e. any of those not aliased elsewhere so go to
me@domain.tld) the headers of the outgoing mail are set as
me@domain.tld.
As the point of using a sub-domain and identities like this is hiding the main account a bit, this defeats the purpose. Is this a bug or behaviour-as-designed for some reason? If the latter, is there any way of changing the behaviour? The accounts in question are all set to "allow sending email from any address".
Edit: additional info:
* If I specifically set
someaddress@sub.domain.tld as an alias of
me@domain.tld, outgoing mail from and identity with the address
someaddress@sub.domain.tld is still always
me@domain.tld despite what is set in the identity's settings.
* If I set an identity to have an address that is not known to my local Zimbra install at all (such as
doesnotexist@example.com), the behaviour is as desired: the outgoing mail carries headers stating
doesnotexist@example.com and not
me@domain.tld.
Edit: additional additional info:
* I've confirmed that if I remove the catchall and/or aliases the behaviour is as expected (i.e. the address specified for the identity is given out), and re-adding the catch-all setting recreates the problem behaviour (the address given out is the address the catchall points to, not the address in the identity)