Mail server stopped working when I changed the hostname and hosts file

I had deliverability issues with the email sent from the server, so while trying fix them I changed the hostname and hosts file, and rebooted the computer.

Now my email does not work, I cannot connect to it, and on the usermin acces it gives me this error:

https://i.imgur.com/6CGoqvG.png

Can you help?

Status: 
Closed (fixed)

Comments

I tried to activate admin access to our server...

Please make sure you have good notes to give me when you are able to fix this issue.

Thanks.

Ilia's picture
Submitted by Ilia on Mon, 02/24/2020 - 04:29

Hi,

You would also need to fix host name for Postfix in Webmin/Servers/Postfix/General Options/Internet hostname of this mail system.

Besides, check /etc/mailname as well, and for the future, it's better to change your hostname using Webmin / Networking / Network Configuration.

In addition to what Ilia said - the error you received with Usermn above suggests that Dovecot may not be running.

You may want to try restarting Dovecot with "service dovecot restart".

That may generate an error -- if so, look in /var/log/mail.log to see what error is being generated when attempting to start Dovecot.

Great, I am back up with mail. Andrey, the last comment was spot on, an the error was that it could not find the SSL certificate of a deleted server, that is why dovecot count, so you might want to look at that routine.

Yesterday, before my changes, I deleted 2 selected servers from List Virtual Servers page, to immediately recreate one of them. The following entry was present at /etc/dovecot/dovecot.conf for the deleted server, that is what prevented dovecot to start:

local_name sub.server.name{
  ssl_cert = </home/username/domains/sub.server.name/ssl.cert
  ssl_key = </home/username/domains/sub.server.name/ssl.key
}

Also, there are double entries for the one that I recreated in that file...

QUESTION: Probably best to delete the double entries?

Although I marked it as private, feel free to publish if it helps,

Frankly, I am very new to Webmin and it seems quite awesome, but the documentation sucks. I am so glad that the support is apparently quite goood! Thanks guys!

FYI, the bug that could cause those leftover dovecot.conf entries will be fixed in the next Virtualmin release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.