I used to use CPanel. When a client uses a 3rd party email (i.e. google, outlook), I just click on "remote email server" during the setup, and that's it.
The current story:
Now that i m using Virtualmin, I wanted to do the same thing but i realised there are more steps to take.
So here is what i did:
1] Enabled Features > uncheck 'mail for domain', uncheck 'virus filtering', uncheck 'mailma mailing list', uncheck 'spam filtering'
2] removed all mail.domain.tld from DNS records
3] MX record changed to: domain.tld.mail.protection.outlook.com <- provided by outlook people and also verified through MXToolbox.com
4] restarted server.
Client receives emails fine but when a user (myself) within my server sends her an email, user gets a bounce back as follows:
The mail system :
Host or domain name not found. Name service error for
name=domain.tld.mail.protection.outlook.com.domain.tld
type=AAAA: Host not found
Troubleshooting:
I realise I could ad an A record with the IP for domain.tld.mail.protection.outlook.com.domain.tld but I'd rather not do that because I dont want to run the risk of them changing their IP.
Special note:
In the error message above , “domain.tld” is appended to the reported MX record I have in the system.
Questions
a. How can I solve this issue so that local users can email local virtual servers with remote email option?
b. Why do i need to specify the remote MX record whereas in CPanel I didnt need to?
Well, I dont know what to say… it’s now working and I have no clue to why so.
But I’d like to ask one last question in this regard: in Cpanel there was no need to enter an MX record which I find convenient because no action is required on my part when clients change their remote email server. Is it possible to have something like that in Virtualmin?
If it suddenly began working, it may have been related to DNS cache. It may have been incorrect at one point, later corrected – but the DNS cache may have held onto the old value for a bit, making it appear that it wasn’t correct.
Regarding the MX record – it’s only necessary to set that if you’re using an email host at a third party provider.
By default, Virtualmin assumes that it’s the email provider, and handles all that for you.
However, if you wish to use a third party for the email provider, it would be necessary to tell it what the email provider is by setting the MX record.
Without setting the MX record, there would be no way for email to be delivered to that user, as the client wouldn’t know where to send the emails.