servisys / ispconfig_setup

ISPConfig autoinstaller and setup
GNU General Public License v3.0
512 stars 256 forks source link

Amavis job failed #144

Closed landsman closed 8 years ago

landsman commented 8 years ago

On the end of install process on fresh Debian 8:

Restarting services ... Job for amavis.service failed. See 'systemctl status amavis.service' and 'journalctl -xn' for details. Installation completed. Restarting apache2 (via systemctl): apache2.service. Well done ISPConfig installed and configured correctly :D Now you can connect to your ISPConfig installation at https://vps:8080 or https://IP_ADDRESS:8080 You can visit my GitHub profile at https://github.com/servisys/ispconfig_setup/ You had to edit user/pass /var/lib/roundcube/plugins/ispconfig3_account/config/config.inc.php of roudcube user, as the one you inserted in ISPconfig root@vps:/tmp/servisys-ispconfig_setup-117dc90#

root@vps:/tmp/servisys-ispconfig_setup-117dc90# systemctl status amavis.service
● amavis.service - LSB: Starts amavisd-new mailfilter
   Loaded: loaded (/etc/init.d/amavis)
   Active: failed (Result: exit-code) since Fri 2016-10-28 01:05:59 UTC; 2min 25s ago
  Process: 30597 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)
Oct 28 01:05:58 vps amavis[30597]: Starting amavisd: head: cannot open '/etc/mailname' for reading: No such file or directory
Oct 28 01:05:59 vps amavis[30597]: The value of variable $myhostname is "vps", but should have been
Oct 28 01:05:59 vps amavis[30597]: a fully qualified domain name; perhaps uname(3) did not provide such.
Oct 28 01:05:59 vps amavis[30597]: You must explicitly assign a FQDN of this host to variable $myhostname
Oct 28 01:05:59 vps amavis[30597]: in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
Oct 28 01:05:59 vps amavis[30597]: network name!
Oct 28 01:05:59 vps amavis[30597]: (failed).
Oct 28 01:05:59 vps systemd[1]: amavis.service: control process exited, code=exited status=1
Oct 28 01:05:59 vps systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
Oct 28 01:05:59 vps systemd[1]: Unit amavis.service entered failed state.

Here is a full log: https://gist.github.com/landsman/fb74e4fd9c7987e04f37e28cfc967f86

gOOvER commented 8 years ago

wrong fqdn.

have nothing to do with install script itself

landsman commented 8 years ago

@gOOvER how can I fix it? Why install script was not check this?

gOOvER commented 8 years ago

Thats not part of the script to check this. Adding FQDN is Part of the Admin during install of the Distro ;)

landsman commented 8 years ago

Same during instalation on Ubuntu 16.04.

gOOvER commented 8 years ago

Sooooo, your Error Message:

cannot open '/etc/mailname' for reading: No such file or directory The value of variable $myhostname is "vps", but should have been a fully qualified domain name; perhaps uname(3) did not provide such. You must explicitly assign a FQDN of this host to variable $myhostname in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's network name! (failed).

Please give me the result of

hostname

and

hostname -f

Also check, if /etc/mailname exist

landsman commented 8 years ago

hostname = vps hostname -f = hostname: Name or service not known /etc/mailname/ = not exists

servisys commented 8 years ago

It's not related to script, it's related to the worng minimal install you had done.

See point 6 of this tutorial

https://www.howtoforge.com/tutorial/debian-8-jessie-minimal-server/2/

klns commented 6 years ago

In my case was that it used pretty(short) hostname in /etc/amavisd/amavisd.conf $mydomain = 'YOUR_domain_HERE'; # a convenient default for other settings $myhostname = 'YOUR_hostname_HERE'; make changes and restart amavisd service.