Name Change Issues

Report bugs and workarounds
Post Reply
zthephoenixz
Posts: 26
Joined: 28 May 2015 01:55

Name Change Issues

Post 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.
User avatar
darky83
Site Admin
Posts: 540
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Name Change Issues

Post 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.
Version eFa 4.x now available!
zthephoenixz
Posts: 26
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post 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?
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Name Change Issues

Post 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...
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Name Change Issues

Post 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
zthephoenixz
Posts: 26
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post 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.
User avatar
shawniverson
Posts: 3644
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: Name Change Issues

Post 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?
zthephoenixz
Posts: 26
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post 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.
zthephoenixz
Posts: 26
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post 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.
Attachments
report.jpg
report.jpg (231.16 KiB) Viewed 8113 times
Post Reply