Use custom SMTP per user

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
User avatar
maxxer
Advanced member
Advanced member
Posts: 156
Joined: Fri Oct 04, 2013 2:12 am
Contact:

Use custom SMTP per user

Postby maxxer » Tue Mar 22, 2016 6:06 pm

Uncommon request, but this is the situation: I've configured a domain in Zimbra but I want each user to use an external SMTP for delivery. Also, the SMTP must use Submission port.

I've set up the configuration with stunnel and with postfix_sender_relay and works fine.
The problem is when I send mails between two users of this domain. I'd like those mails to go outside, but of course zimbra is delivering them internally.

I was thinking about setting the relay using zimbraMailTransport but that's act on the recipient, I must set the smtp by sender!

Is it possible to select an outside relay for ALL mails sent from an account?
thanks


User avatar
ppearl
Zimbra Employee
Zimbra Employee
Posts: 114
Joined: Thu May 15, 2014 7:36 am

Re: Use custom SMTP per user

Postby ppearl » Tue Mar 22, 2016 8:37 pm

It might be best to setup (standalone postfix perhaps) MTA(s) for outbound/smart-relay only and do the custom routing/config there...

If you go this route, then you could setup zimbraSmtpHostname for each MBS to talk to the smart-relay (caveats/details just glossed over for now, like rejecting invalid addresses, etc. but that smart mta could be setup to 'do the right thing' in theory) and continue up stream to your MTA that requires use of submission (since ZCS mailbox servers don't know how to do that yet).

I presume you were looking for something more elegant, but hopefully this is at least a little helpful.
User avatar
maxxer
Advanced member
Advanced member
Posts: 156
Joined: Fri Oct 04, 2013 2:12 am
Contact:

Re: Use custom SMTP per user

Postby maxxer » Wed Mar 23, 2016 11:06 am

ok. thank you very much for your feedback.

I knew it wouldn't be easy, maybe I'll take another approach. Thanks again!
ezajko
Posts: 3
Joined: Wed Mar 23, 2016 1:20 pm

Re: Use custom SMTP per user

Postby ezajko » Wed Mar 23, 2016 1:34 pm

maxxer wrote:Uncommon request, but this is the situation: I've configured a domain in Zimbra but I want each user to use an external SMTP for delivery. Also, the SMTP must use Submission port.

I've set up the configuration with stunnel and with postfix_sender_relay and works fine.
The problem is when I send mails between two users of this domain. I'd like those mails to go outside, but of course zimbra is delivering them internally.

I was thinking about setting the relay using zimbraMailTransport but that's act on the recipient, I must set the smtp by sender!

Is it possible to select an outside relay for ALL mails sent from an account?
thanks


Hi Maxxer,

have you tried this:

https://wiki.zimbra.com/wiki/Relay_per_Domain?

regards,

--eZ
User avatar
maxxer
Advanced member
Advanced member
Posts: 156
Joined: Fri Oct 04, 2013 2:12 am
Contact:

Re: Use custom SMTP per user

Postby maxxer » Wed Mar 23, 2016 2:18 pm

thanks but this won't fix the issue of the same domain delivery
ezajko
Posts: 3
Joined: Wed Mar 23, 2016 1:20 pm

Re: Use custom SMTP per user

Postby ezajko » Wed Mar 23, 2016 2:33 pm

maxxer wrote:thanks but this won't fix the issue of the same domain delivery


Hi maxxer,

I know it is odd question, but what's the use case for that?
Some external archiving solution?

regards,

--eZ
User avatar
maxxer
Advanced member
Advanced member
Posts: 156
Joined: Fri Oct 04, 2013 2:12 am
Contact:

Re: Use custom SMTP per user

Postby maxxer » Wed Mar 23, 2016 3:00 pm

ezajko wrote:I know it is odd question, but what's the use case for that?
Some external archiving solution?


In Italy we have infamous PEC which requires dedicated smtp auth based on sender. This is normally accomplished with sender_dependent_relay, but I (mistakely) configured Zimbra with the PEC domain, so accounts on the same domain which are not in Zimbra are tried internally first.

I need to change the setup, which wasn't initially meant to work this way.

Return to “Administrators”

Who is online

Users browsing this forum: Google [Bot], MSN [Bot] and 3 guests