How to use only e-mail in CWP7?

Started by umtu06, January 06, 2024, 07:08:19 PM

Previous topic - Next topic

umtu06

The website is running on another server. Is it possible to host only emails in cwp7? I will direct the mx settings from the domain company to cwp7. (like mx.***.com -> 123.123.123.123) So what should I do in CWP7? Thank you in advance for your guidance.

overseer

This has been answered before. Please check the forum for similar threads; I'll try to dig up some links meanwhile.

Starburst

It has been answered several times, but it's simple.

On CWP you will create the domain as mail.domain.com
It will still create a webspace, etc. But you can ignore those.

In the DNS you will create an MX record for mail.domain.com, then an A record for mail. pointing to the IP of the CWP server.

To access webmail, you will do mail.domain.com/webmail

overseer

#3
And for good measure, make sure ports 80 and 443 are blocked on the CSF firewall.
And disable Apache:
sudo systemctl disable httpd
(This would mean you would have to access your webmail via the :2096 service port.)

Starburst

@overseer, the problem with blocking TCP ports 80 & 443 is that Let Encrypt won't work to create & renew the mail server certificate.  :(

We had that problem on a FTP only server.
Unless you want to drop the firewall and renew the SSL, and bring the firewall back up. All Manually.

overseer

It's all sort of a pedestrian exercise -- I don't do this on any of my servers. But it is easily scriptable if you wanted to make your own LetsEncrypt renewal script.

On one server I do something like this -- typically Nginx 301 redirects http traffic to https, but in order to renew a LE cert, you have to allow http traffic temporarily. So it needs to be renewed, reverted, restarted, redirected. :P