Name Change Issues

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

Name Change Issues

Post by zthephoenixz » 28 May 2015 02:21

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: 523
Joined: 30 Sep 2012 11:03
Location: eFa
Contact:

Re: Name Change Issues

Post by darky83 » 28 May 2015 14:00

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.
E.F.A 3.0.2.6 update released

zthephoenixz
Posts: 22
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post by zthephoenixz » 28 May 2015 22:25

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: 2532
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Name Change Issues

Post by shawniverson » 28 May 2015 22:56

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...
Version 3.0.2.6 released! Update now to keep your eFa secure!

User avatar
shawniverson
Posts: 2532
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Name Change Issues

Post by shawniverson » 29 May 2015 00:14

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
Version 3.0.2.6 released! Update now to keep your eFa secure!

zthephoenixz
Posts: 22
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post by zthephoenixz » 29 May 2015 22:06

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: 2532
Joined: 13 Jan 2014 23:30
Location: Rushville, Indiana, USA
Contact:

Re: Name Change Issues

Post by shawniverson » 30 May 2015 15:06

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?
Version 3.0.2.6 released! Update now to keep your eFa secure!

zthephoenixz
Posts: 22
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post by zthephoenixz » 30 May 2015 22:25

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: 22
Joined: 28 May 2015 01:55

Re: Name Change Issues

Post by zthephoenixz » 30 May 2015 22:38

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 2148 times

Post Reply