Page 1 of 1

howto change imap and smtp domains to use imap. and smtp. subdomains?

Posted: Wed Jul 31, 2019 2:47 am
by menriquez
Hello...first of all thanks to everyone involved in this project. Its amazing to be able to run my own mail server and really everything in VESTA totally rocks, so thank everyone!

Now my question...so I want to change my mail server address to imap.example.com and smtp.example.com for incoming and outgoing, respectfully, and I've noodled around a bit but cannot seem to find a place in the system to do this. I am pretty sure this should be a rather simple little hack, so does anyone out there have a way to do it?

Thanks!
- mark

Re: howto change imap and smtp domains to use imap. and smtp. subdomains?

Posted: Wed Aug 21, 2019 3:36 pm
by twoup
On the surface, this seems like a nice and easy thing to do. For IMAP, it's simple. For SMTP it will only work reliably if you have a public IP address per domain without causing deliverability issues.

IMAP
If you want clients to retrieve messages from imap.domain.com, that's easily done (though requires some command line work for each domain). IMAP doesn't require PTR, just a valid certificate.

SMTP
You can only reliably set one PTR (reverse) address in DNS - when you add multiple PTRs for a single address, many DNS implementations return the CNAME in a round-robin manner; others will dump the entire PTR record which will allow what you want, however too many names being returned can exceed the packet size of the UDP response. As such, when the server goes to deliver messages, the chances of the remote MX getting the correct reverse DNS is limited and the chances of your messages being rejected (and your IP ending up on a spam blacklist) are high.

Possible solutons for Single IP SMTP
One possible solution would be to provide the client with smtp.domain.com, and internally reroute the domain using an exim rule to send from server.host.com, essentially adding a "hop" to delivery. It's not elegant and will add an extra header - and probably break DKIM. I am currently working on using a smart-host for final MTA routing, though that's even more messy for DKIM.

Where to find instructions
There are details on how to achieve both IMAP and SMTP per domain on Feature Request 1211 https://github.com/serghey-rodin/vesta/issues/1211l. I urge you to proceed with caution for the SMTP side for the reasons outlined above.

twoup