Moved to new server - PHP contact forms stopped working

Manny89

Registered
Nov 24, 2013
3
0
1
cPanel Access Level
Website Owner
Hello everybody,

I recently moved my websites from one hosting company to another, where I am running on a VPS. I have root access to SSH and am also able to get into WHM, so any help here would be much appreciated.

Using DNS and MX, all mail accounts for my (and clients) websites go through Gmail or Outlook. Emails sent from those interfaces are going out as they should, while anybody who emails directly is also able to get their messages through.

Now, I have contact forms on several sites which have suddenly stopped sending mail since the server move. I'm not finding any PHP errors, so I was directed to my exim_mainlog file.

Here is an example of what I received after my latest attempt at a form submission.

Code:
2013-12-03 23:23:42 cwd=/user/public_html/domain.com 3 args: /usr/sbin/sendmail -t -i
2013-12-03 23:23:42 1VnzJe-0005LS-GN <= [email protected] user P=local S=527 T="The test for php mail function" for [email protected]
2013-12-03 23:23:42 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1VnzJe-0005LS-GN
2013-12-03 23:23:42 1VnzJe-0005LS-GN ** [email protected] R=virtual_aliases: No Such User Here
2013-12-03 23:23:42 cwd=/var/spool/exim 7 args: /usr/sbin/exim -t -oem -oi -f <> -E1VnzJe-0005LS-GN
2013-12-03 23:23:42 1VnzJe-0005LX-Ie <= <> R=1VnzJe-0005LS-GN U=mailnull P=local S=1435 T="Mail delivery failed: returning message to sender" for [email protected]
2013-12-03 23:23:42 1VnzJe-0005LS-GN Completed
2013-12-03 23:23:42 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1VnzJe-0005LX-Ie
2013-12-03 23:23:42 1VnzJe-0005LX-Ie => user <[email protected]> R=localuser T=local_delivery
2013-12-03 23:23:42 1VnzJe-0005LX-Ie Completed
I have replaced all instances of usernames and the server name.

DNS and MX all appear to be correct, but I just can't get contact forms to work at all. Any help would be greatly appreciated.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Yes, check to see if the domain name exists in the /etc/remotedomains file. If it's not in that file, use the instructions from the previous post to ensure it's added to it.

Thank you.
 

Manny89

Registered
Nov 24, 2013
3
0
1
cPanel Access Level
Website Owner
Thank you for the feedback. All my domains are set to the recommended 'Automatically Detect Configuration', which is being displayed as local in my cPanel. My /etc/remotedomains file is empty so I'll make that change, but I do have one further question.

My hosting company - heartinternet.co.uk - provide a DNS and MX interface as a domain registrar. All my settings have been made with the registrar and I was told that if I use their nameservers, I wouldn't have to enter any DNS or MX settings inside cPanel - as the registrar settings would take priority. To the best of your knowledge, are they correct here or have I been given false information?

I only say this because my MX inside cPanel and WHM has a priority of 0 and points to domain.co.uk, but my registrar is all set up and stored to use either Gmail or Outlook.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Yes, it's correct that no DNS changes are required on the cPanel server if you have DNS handled on a remote server (e.g. your registrar). However, the change mentioned regarding the "Email Routing" value is not necessarily a DNS change, so using the "Edit a DNS Zone" option in this case is necessary.

Thank you.
 

Manny89

Registered
Nov 24, 2013
3
0
1
cPanel Access Level
Website Owner
That's great. It's not a major job if the DNS had to me replicated, but there's obviously no point in doing it twice if once is sufficient enough.

I have changed settings to 'Remote Mail Exchanger' and all my websites appear to be working again. I'm awaiting feedback from a number of clients, but I'm confident this issue should now be resolved.

Thank you both for your help.