Koozali.org: home of the SME Server

single domain outgoing to a email relay host

Offline renagade12

  • 2
  • +0/-0
single domain outgoing to a email relay host
« on: December 04, 2017, 11:54:39 AM »
Hi

I was wondering if anyone could assist me with this,
Here is the scenario

all domains on exchange sends mail out, received by sme9 box send mail out via dns delivery

i need it to do the following

Single domain on exchange DomainA.com exchange sends mail out, received by sme9 box send mail out via smtp relay host by isp

Only for this domain

Please could someone assist me, I have tried googling, putting in the qmail smtp routes but no luck. It just send mail like before and doesn't route that outgoind mail to smtp host it needs to go

Thanks
Claude

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: single domain outgoing to a email relay host
« Reply #1 on: December 04, 2017, 12:06:32 PM »
hi, welcome here

would you mind to give us more details about your environment and what you're trying to achieve?

thank you

Offline renagade12

  • 2
  • +0/-0
Re: single domain outgoing to a email relay host
« Reply #2 on: December 04, 2017, 12:27:33 PM »
Hi

sure of course

Current System we have as follows

Exchange 2016 with a bunch of domains
2 x SME 9 linux boxes

This is how current mail works

All incoming mail get received by the SME 9 boxes (they are public facing). They mail is then forwarded to a spam server, then to the exchange server (Internal 192.168.20.21).

All outgoing email comes from the exchange server (smarthost) to either of the SME 9 linux boxes. The SME box delivers the email via DNS delivery and the recipient receives the mail.

What we are trying to achieve is that a when email for a specific domain comes from the exchange server and goes to the SME boxes, the SME box will then send out all email of the specific domain to specific host that is at a different ISP.

The reason why we need this is that there domain gets a signature attached when it goes through the external smtp relay server

I hope this makes more sense now
« Last Edit: December 04, 2017, 12:32:45 PM by renagade12 »

Offline mmccarn

  • *
  • 2,627
  • +10/-0
Re: single domain outgoing to a email relay host
« Reply #3 on: December 04, 2017, 02:40:16 PM »
If you want to relay email *to* a single domain, you can configure the off-site mail server as the 'internal' server for that domain: https://wiki.contribs.org/Email#Internal_or_External_Mail_Servers

If you want to use a custom outbound server for email *from* a single domain, the challenge is non-trivial:
https://www.emailquestions.com/threads/selective-smtp-relay-to-smarthost-based-on-from-orgin-domain.8646/

Assuming that the signature added by the external server is DKIM, you could enable DKIM  on your SME servers:
https://wiki.contribs.org/Qpsmtpd:dkim
(Added in SME 9.2 but I don't see any step-by-step howtos on the wiki yet)