Page 1 of 1

Name Change Issues

Posted: 28 May 2015 02:21
by zthephoenixz
Problem happened with 3.0.0.7 & after update to 3.0.0.8, I was replacing my original ESVA box with the new shiny EFA 3 box (3.0.0.7)

ESVA Box called mx1 192.168.1.222
EFA Box called efa3gw 192.168.1.221

Migrated configuration and ran boxes side by side and when ready swapped the port forward for 25 in the firewall to 1.221, and everything worked perfectly. Had a few issues with external email servers with the server name being efa3gw instead of the DNS registered mx1 in the reverse ip lookup so followed viewtopic.php?t=497 and changed the server name to mx1. (Should have changed the DNS it seems)
Local, external, all the DNS, hosts has been changed with both efa3gw and mx1 pointing at 1.221
Issue I have is any message from before the name change get this error when you log into to release them.

<Standard HTML MailWatch top section>
"Error: Client 192.168.1.221 is not authorized to connect."

Everything received after the name change works fine.

Re: Name Change Issues

Posted: 28 May 2015 14:00
by darky83
EFA-Configure has a hostname change option (under ip settings), would have been a bit easier :D

I never tried renaming and then opening up previous mails (done all my tests with a new test system without data), I will do a few tests later on.

Re: Name Change Issues

Posted: 28 May 2015 22:25
by zthephoenixz
Ok I went through that process, now older spam from before the original name change have this error.

<Mailwatch HTML Head as per normal>
Error: Connect error: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

I had the original FQDN and details in the /etc/hosts file to make sure it would resolve any old links.

Maybe there needs to be a recursive sqlscript to go through and change all reference points in the database from the old hostname to the new one. My SQL is a little rusty, anyone else give it a shot?

Re: Name Change Issues

Posted: 28 May 2015 22:56
by shawniverson
I am seeing a problem after changing the name of my test server:

In detail.php:
XML-RPC Error: Didn't receive 200 OK from remote server. (HTTP/1.0 301 Moved Permanently)
I am troubleshooting further...

Re: Name Change Issues

Posted: 29 May 2015 00:14
by shawniverson
Definitely an issue in mysql hostname field...

To fix...change "mynewfqdn" to the fully qualified domain name of your host as root:

Code: Select all

echo "UPDATE maillog SET hostname='mynewfqdn';" | mysql -u mailwatch --password=`grep "^MAILWATCHSQLPWD:" /etc/EFA-Config | sed 's/.*://'` mailscanner
Opening issue..

https://github.com/E-F-A/v3/issues/195

Re: Name Change Issues

Posted: 29 May 2015 22:06
by zthephoenixz
Hhmm, copy and pasted that code and it executed but I am still getting

Error: Connect error: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

on older spam messages, the crazy thing is it modified the date on ever spam message in my log to the date and time I executed the script.

Re: Name Change Issues

Posted: 30 May 2015 15:06
by shawniverson
That's odd. Also, I noticed you can't sudo these. You need to be root.

As root:

Code: Select all

echo "select hostname from maillog limit 10;" | mysql -u mailwatch --password=`grep "^MAILWATCHSQLPWD:" /etc/EFA-Config | sed 's/.*://'` mailscanner
Is the output what you expect?

Re: Name Change Issues

Posted: 30 May 2015 22:25
by zthephoenixz
Yeah I noticed it didn't require sudo and have been logging in as root. This is the output.

[root@mx1 ~]# echo "select hostname from maillog limit 10;" | mysql -u mailwatch --password=`grep "^MAILWATCHSQLPWD:" /etc/EFA-Config | sed 's/.*://'` mailscanner
hostname
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>
mx1.<domain>

<domain> is the correct domain.
Going to execute again and reboot and test.

Re: Name Change Issues

Posted: 30 May 2015 22:38
by zthephoenixz
Executed the MySQL command a second time, rebooted and it is working now.... very strange.

An error in the message quarantine report though. When you execute the MySQL script to change host names the "Received time" changes to the date the script was executed.

It looks like the "Received Time" in the spam report is using the MySQL modified date field not an actual received date for the email.