I just tested a custom vhost entry that redirects smtp.domain.com to wherever I point it too.
So, accessing either port 80 or 443 will redirect to wherever you choose yet should still allow access to your mail ports.
Non-SSL:
SSL:
So, accessing either port 80 or 443 will redirect to wherever you choose yet should still allow access to your mail ports.
Non-SSL:
Code:
</VirtualHost>
<virtualhost *:80>
ServerName smtp.domain.com
ServerAdmin webmaster@domain.com
Redirect permanent / https://www.google.com/
Code:
</VirtualHost>
<virtualhost *:443>
ServerName smtp.domain.com
ServerAdmin webmaster@domain.com
Redirect permanent / https://www.google.com/
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
SSLCertificateFile /etc/letsencrypt/live/mail.domain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mail.domain.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/mail.domain.com/chain.pem
# Keeping below for future upgrades.
# Requires Apache >= 2.4
SSLCompression off