Is there any way to use an additional domain as SMTP?

Hello. Is there any successfully way to use a second domain to use as SMTP server in order to supply it to my customers, instead of the original smtp server?

I explain: I’ve installed a fully working box.domain.com, but I want to use box.mycustomerdomain.com as SMTP server. Could it be possible?

If i use it as port 25 non SSL, obtain this error:

Feb 20 10:33:58 miab postfix/smtpd[27004]: NOQUEUE: reject: RCPT from ns513574.ip-192-99-9.net[192.99.9.142]: 554 5.7.1 <myaddres@gmail.com>: Relay access denied; from=<notifiy@mycustomerdomain.com> to=<myaddress@gmail.com> proto=ESMTP helo=<SkyWeb>

If i use it as port 587 with SSL, obtain this error:
Feb 20 10:33:22 miab postfix/submission/smtpd[20757]: connect from ns513574.ip-192-99-9.net[192.99.9.142]
Feb 20 10:33:23 miab postfix/submission/smtpd[20757]: warning: TLS library problem: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate:s3_pkt.c:1278:SSL alert number 42:
Feb 20 10:33:23 miab postfix/submission/smtpd[20757]: lost connection after STARTTLS from ns513574.ip-192-99-9.net[192.99.9.142]
Feb 20 10:33:23 miab postfix/submission/smtpd[20757]: disconnect from ns513574.ip-192-99-9.net[192.99.9.142]

So, the only one successful way is to set always my original domain, but by brand motif, I want to use my customer domain.

Are you using a python script, if not, go into the SSL Cert page in MIAB admin panel and then issue new certs to all domains you have on the MIAB server (including box.yourdomain.com).

If you are using a python script, make sure the smtp or ssl module is configure to allow bad (or self signed) certificates.

I’m not using any python script, but I was using the SSL Cert page in MIAB admin panel.
I was issued the smtp domain I want to use for my customer. I write my scenario:

My fully working MIAB domain => box.mydomain.com
My customer domain => customerdomain.com
CustomerDomain.com has fully working email service and account generation & web login as user@customerdomain.com

The question is: I want to set a SMTP server like mail.customerdomain.com

So, in SSL Cert Page of MIAB admin panel, I have:

Provision a certificate section:

Certificate status section:

So, I remember to you that I dont want to host any Customer Domain webpage. Is for that I dont have issued neither customerdomain.com nor www.customerdomain.com

So… if I have mail.customerdomain.com Signed & Valid, why I am getting the errors?
What am i doing wrong?

MIAB was not made for that. use box.mydomain.com as the SMTP for customerdomain.com. There is no easy work around and unfortunately since it is not support by miab, I dont want to give you instructions that might break things.

1 Like

Just thinking out loud here, but could you not reset it up using mail.customerdomain.com as the hostname of the box? Of course, glue records, etc. would need changing as well … @murgero – thoughts?

Of course, you’d then have the same issue but in reverse … but that may still be preferable.

Yes, of course, but my doubt was if I could to use a SMTP server customized for each client. I wanted to know If it was possible and I was the only one I cannot achieve it, but at now I realized it is not possible.
Thanks

In theory yes, but that might break things.

Also OP wants a custom dns MX name for each client.

I suppose a CNAME record could do this but I’m unsure.