emails disappearing after move to new server

I set up a new server (cent os 6), and installed virtualmin as I always do.

I moved a domain over to a new server by backing up the domain on the old server (through virtualmin), saving it to the new server via ssh, and then restoring it on the new.

Then changed the ip address on the dns to the new server.

The site works fine.

But the email doesn’t. Anything sent to it just seems to disappear. No warning, no bounce. It just never arrives.

Nothing in the mail log…

Here is the domain - koryodo.com new ip address is: 198.105.223.243

I can switch the ip back to the old server and everything works (mail goes to the old server ok). Switch back and emails disappear into nowwhere again. checked, and the users are there and survived the move ok.

Any ideas on what is happening?

Thanks,

Chris

Howdy,

Well, while it’s possible you’re dealing with a DNS cache issue – the first place I’d start is in looking at the mail logs on your new server.

Take a look at /var/log/maillog and /var/log/procmail.log – then send an email to an account on that server.

Do you see the email show up in there? Are there any errors associated with it?

-Eric

Hi Eric,

Did finally get a bounce on my test emails saying delivery had been underway for 6 some hours and will keep trying.

But on the new server there’s nothing about these emails coming in on maillog.

I don’t have a procmail.log file in var/log/ should I?

I don’t think it’s dns cache related, I’ve been testing and it seems like I can switch from one server to another by changing the dns and giving it about 10 minutes. I can switch the dns to the old server and emails to to it ok after a short bit. Then if I switch dns to the new server, even after 24 hours emails don’t reach it.

I checked with mxtoolbox and they have it resolving to the correct (new) ip.

Chris

//update -----

As I was working on this, I noticed my system hostname was set to servername.localhost

So I reset that to servername.primarydomain.com in Webmin -> Networking -> Network Configuration -> Hostname and DNS Client.

When I did that, I got this maillog:


Feb 22 15:08:30 jessica postfix/postfix-script[31711]: refreshing the Postfix mail system
Feb 22 15:08:30 jessica postfix/master[878]: reload – version 2.6.6, configuration /etc/postfix
Feb 22 15:08:31 jessica postfix/master[878]: warning: service smtp: ignoring inet_interfaces change
Feb 22 15:08:31 jessica postfix/master[878]: warning: to change inet_interfaces, stop and start Postfix
Feb 22 15:08:31 jessica postfix/master[878]: warning: service submission: ignoring inet_interfaces change
Feb 22 15:08:31 jessica postfix/master[878]: warning: to change inet_interfaces, stop and start Postfix


So I rebooted postfix (webmin/servers/Postfix Mail Server) and that seems to have done the trick, email is working now.

Did the change in the system hostname fix things do you think - or did the postfix server just need a reboot for some reason?

I still don’t have a postfix.log…

Thanks for helping with this Eric, always appreciate your assistance when I get stuck on things - :slight_smile:

Chris

Howdy,

I’m unfortunately not sure what the issue was… I’ve never seen that message in the logs before. But I’m glad it’s working now :slight_smile:

Regarding the missing log – that’s a procmail log, rather than a postfix log… what does this command output:

ls -lh /var/log/procmail.log

And also, what are the contents of your /etc/procmailrc file?

-Eric

opps, I meant to say procmail.

For:

ls -lh /var/log/procmail.log

I get:

ls: cannot access /var/log/procmail.log: No such file or directory

In etc/procmailrc I have:

:0wi VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME EXITCODE=$? :0 * ?/usr/bin/test "$EXITCODE" = "73" /dev/null EXITCODE=0 :0 * ?/usr/bin/test "$VIRTUALMIN" != "" { INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN } DEFAULT=$HOME/Maildir/ ORGMAIL=$HOME/Maildir/ DROPPRIVS=yes :0 $DEFAULT

Howdy,

Ah, it looks like two lines may be missing from the top of your file.

They don’t affect the functionality, but they would cause it not to log anything.

I’d suggest adding these two lines to the top of your /etc/procmailrc file:

LOGFILE=/var/log/procmail.log TRAP=/etc/webmin/virtual-server/procmail-logger.pl

After that, do you see new log entries in your procmail.log anytime you receive an email?

-Eric