Unable to access virtualmin backend after making change in main.cf

7 posts / 0 new
Last post
#1 Fri, 11/02/2018 - 02:33
vmuser18

Unable to access virtualmin backend after making change in main.cf

I have a problem where the server is not sending out an email from a WordPress site to an external email id (via a contact us form). I was trying to solve the problem and ended by creating a MUCH bigger problem!

I read the thread: https://www.virtualmin.com/node/22535 and made the change as described: "I was running into this exact same problem recently, and it went away immediately when I set "domains to receive mail for" to the "whole domain" radio button. To anyone having this problem: it might be good to check that variable. The above change translated to, in main.cf: mydestination = $myhostname, localhost.$mydomain, $mydomain"

After I did ONLY the above, the backend server stopped responding - ie, when I try to access the URL for the backend, it says: "Unable to connect Firefox can’t establish a connection to the server at ......"

The websites hosted on the various virtual servers are working fine.

In order to return things back to normal, I went to the ssh prompt and made the following change in /etc/postfix/main.cf

Changed: mydestination = $myhostname, localhost.$mydomain, $mydomain

TO: mydestination = test.example.mydomain.com, localhost.example.mydomain.com, localhost myhostname = test.example.mydomain.com

I tried restarting it via the ssh prompt but no luck either.

Tried the following as well, but that didn't work either.

mydestination = test.example.$mydomain.com, localhost.example.$mydomain.com, localhost myhostname = test.example.$mydomain.com

Fri, 11/02/2018 - 03:33
Jfro

If you try restart in SSH you get a message?

Try to search in and for log files and errors in there.

Post some version information to. ;)

https://www.virtualmin.com/node/53663

Also the topic from your link is "dangerous" old maybe.

Fri, 11/02/2018 - 04:46
vmuser18

Hi,

Sorry for missing the necessary details! Since I'm not able to access the running setup anymore, I had to look up the installation log file. Hope the following data points are useful:

install.sh version: 6.0.12 Operating system name: Ubuntu Operating system version: 18.04

And no errors when restarting postfix from the command line. The recentmost syslog is here: https://a.uguu.se/fsV8ONqucTKz_syslog.zip

Are there other log files I should examine / share?

Fri, 11/02/2018 - 05:18
Jfro

Did you reboot server and the log files for boot and minserv or something like that, sorry i'm not from support only pointing out what is in my head not knowing exact where wich... But for virtualmin support it is always better to have as much as possible info's These are not ok as far as i konw:

Nov  2 09:40:08 li857-31 firewalld[587]: WARNING: '/sbin/iptables-restore --wait=2 -n' failed: /sbin/iptables-restore: unrecognized option '--wait=2'#012iptables-restore v1.6.1: invalid port/service `imap3' specified#012Error occurred at line: 2#012Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Nov  2 09:40:08 li857-31 firewalld[587]: ERROR: COMMAND_FAILED.

Nov  2 09:38:47 li857-31 systemd-resolved[680]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
Nov  2 09:38:47 li857-31 postfix/smtpd[26883]: warning: hostname souhan.starreen.net does not resolve to address 191.96.249.142: Name or service not known
Nov  2 09:38:47 li857-31 postfix/smtpd[26883]: connect from unknown[191.96.249.142]

Is that your box / domainip and name?

Some more i don't know why this happens after changing only what you described.

BUT expect before some other parts where wrong and now after the restarts they are vissible, while maybe no restart before...?

These i don't know also

Nov  2 06:41:14 li857-31 systemd[18175]: Reached target Sockets.
Nov  2 06:41:14 li857-31 systemd[18175]: Reached target Timers.
Nov  2 06:41:14 li857-31 systemd[18175]: Reached target Basic System.
Nov  2 06:41:14 li857-31 systemd[1]: Started User Manager for UID 1004.
Nov  2 06:41:14 li857-31 systemd[18175]: Reached target Default.
Nov  2 06:41:14 li857-31 systemd[18175]: Startup finished in 34ms.
Nov  2 06:41:14 li857-31 systemd[1]: Stopping User Manager for UID 1004...
Nov  2 06:41:14 li857-31 systemd[18175]: Stopped target Default.
Nov  2 06:41:14 li857-31 systemd[18175]: Stopped target Basic System.
Nov  2 06:41:14 li857-31 systemd[18175]: Stopped target Paths.
Nov  2 06:41:14 li857-31 systemd[18175]: Stopped target Sockets.
Nov  2 06:41:14 li857-31 systemd[18175]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Nov  2 06:41:14 li857-31 systemd[18175]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Nov  2 06:41:14 li857-31 systemd[18175]: Closed GnuPG cryptographic agent and passphrase cache.
Nov  2 06:41:14 li857-31 systemd[18175]: Closed GnuPG network certificate management daemon.
Nov  2 06:41:14 li857-31 systemd[18175]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Nov  2 06:41:14 li857-31 systemd[18175]: Reached target Shutdown.
Nov  2 06:41:14 li857-31 systemd[18175]: Starting Exit the Session...
Nov  2 06:41:14 li857-31 systemd[18175]: Stopped target Timers.
Nov  2 06:41:14 li857-31 systemd[18175]: Received SIGRTMIN+24 from PID 18188 (kill).
Nov  2 06:41:14 li857-31 systemd[1]: user@1004.service: Killing process 18188 (kill) with signal SIGKILL.
Fri, 11/02/2018 - 06:09
vmuser18

Wow - thanks for those insights...!

  1. The server restart helped!! I can access the backend once more (and the websites look fine)!

  2. Within "Postfix Mail Server" -> General Options -> "What domains to receive mail for" is set to "test.example.$mydomain.com, localhost.example.$mydomain.com, localhost myhostname = test.example.$mydomain.com".

Is this the right default value? I don't have a record of what its supposed to be / what it was earlier by default.

  1. The first section you quoted shows: hostname souhan.starreen.net address 191.96.249.142

I have no idea what that hostname / address is! It's not the machine the server is on and its not correct the IP address either! I checked for the hostname within the entire code and the database - but it's not present there either.

Fri, 11/02/2018 - 07:23
Jfro

3: Is ok then blocked! 2: for another support to answer, don't know these

But the kill messages.

And IPTABLES message think you have to look for if these are after restart.

Are still there!

Sat, 11/03/2018 - 18:31
marcelorp

For question 2, my settings are:
mail.domain.tld, ns1.domain.tld
You do not need to add too much address here, because each virtualmin server will get there domain added here too. So in my case I just setup the mail subdomain and the hostname server.

About the block access to backend...these appear to be a firewall issue, did you use some firewall software or the native Firewalld? I recommend to use the CSF and LFD to secure you server and manage easier from webmin interface.

Topic locked