I can no longer receive email on the newly configured VPS after moving a domain using the “backup and restore” functionality in Virtualmin.
I have tested sending mail from email accounts from the old server vserver1.mt-ict.nl.
All the options in the troubleshooting document at https://www.virtualmin.com/docs/server-components/troubleshooting-emails/#taking-further-action (except for DNS tests, because this always worked on the old server) and found nothing.
It’s mind-boggling.
The IP addresses of both the old and new servers are not on any abuse lists, and I have whitelisted the IP address of the old server in the FirewalD of the new server.
Finally, I also sent an email from a Gmail address and guess what: it arrived just fine.
Abuse lists don’t have anything to do with receiving mail, generally speaking, only sending.
You need to look at logs. Watch the journal for the postfix unit while trying to send email to your new server. That’ll tell you what’s happening. If you don’t see any log entries, it means you have misconfigured DNS (so check your MX record, and the name it resolves to to make sure the world is able to find out that your server is the mail server for your domain).
Unfortunately, logging from Postfix is not coming through.
A test (host -t mx mt-ict) of the MX record returns the following response: mt-ict.nl mail is handled by 10 mail.mt-ict.nl.
As far as I know, that’s OK, right?
There is no entry in the Postfix log when I send an email. Not even when I send from a Gmail account that DOES arrive correctly
In the Dovecot log, apart from external junk, I only see successful login attempts from the mail accounts from the mail client on the new server.
And if I can’t track the mail traffic in these logs, where can I?
I think I need some more information.
I guess check the mail.log instead? I’m pretty sure Debian switched to the journal for everything, but maybe your hosting provider image changed it, or something else caused it to log to text files, instead.
To be clear: You must read the logs to solve problems. So, the priority here is to figure out where it’s logging. Until you do that, it’s a waste of time to fiddle with anything.
It is indeed true that Debian 12 uses journalctl. I do not have a mail log, and the old logging in Webmin is also disabled.
In Webmin - System - Systemlogs, I see @postfix logging in addition to postfix, which provides more information.
There, I do see Gmail coming in, but not the mail from my own old VPS, which makes it very strange.
I understand that it is very difficult to resolve remotely.
Installing a new version should work fine, and you should be able to import a backup from another server without any problems.
I’m now thinking about starting over; I really don’t know what to do anymore.
For now I go to sleep, its 00:03 now here. Thanks so far.
I only have it because I had to use a 10 image and upgrade to 11. 12 wasn’t an ‘A’ supported system yet. First server I’ve set up in over a decode though…
This moved domain is FULLY disabled on the old server, correct? If not the old server will assume it still gets the mail. Don’t ask me how I know… It would explain why you never see it hit the logs in the new machine.
The test emails end up on the old server after all.
That’s where the other domains I manage are located.
That server hasn’t realised that the world is changed yet.
Fortunately, it seems that the email is working fine and the issue is caused by incorrect DNS settings on the old server. I switched off the domain on the old server now.
Do you know how I can update the DNS on the old server?
If you’re retiring the old server, you shouldn’t update DNS on the old server, you should update your glue records to point to the new one (or update records wherever your DNS is actually hosted if not on the old server).
I keep the DNS externally, where it shows up correctly.
The issue can only be caused by the old server, because only emails from domains on the old server are not arriving. Those from Gmail are arriving just as they should.
Thats why I asked how to update the DNS records on the old server.
Do You know how?
But, I’m trying to tell you that you’re trying to solve the wrong problem.
If DNS is not hosted on the old server (i.e. your glue records aren’t pointing there) you should not have DNS running on the old server at all and BIND on that server should not be where the server is looking to resolve addresses.
But, DNS is not your only problem. If the old server still has virtual map entries for the domains that have been moved, it would still deliver that mail locally, because it is configured to accept mail locally for those domains.
Okay, I understand that so far, but where can I find those virtual entries that cause the old server to accept email for those domains locally?
After all, I have more domains to migrate and thats why I like to know how it works.
This issue was only resolved after removing the domain from the old server.
In any case, it has given me a new understanding.
Thank you, Joe, for guiding me through this process.