amavis Failes on Install issue
See original GitHub issueThere is a problem that my friend and I fixed. We got this issue:
System: Ubuntu 18.04 LTS
Version: Mobodoa 1.19
Hit:1 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu bionic InRelease
Hit:3 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
sudo is already the newest version (1.8.21p2-3ubuntu1.1).
wget is already the newest version (1.19.4-1ubuntu2.2).
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up amavisd-new (1:2.11.0-1ubuntu1.1) ...
Creating/updating amavis user account...
Job for amavis.service failed because the control process exited with error code.
See "systemctl status amavis.service" and "journalctl -xe" for details.
invoke-rc.d: initscript amavis, action "start" failed.
● amavis.service - LSB: Starts amavisd-new mailfilter
Loaded: loaded (/etc/init.d/amavis; generated)
Active: failed (Result: exit-code) since Sat 2019-12-07 02:43:40 UTC; 12ms ago
Docs: man:systemd-sysv-generator(8)
Process: 26633 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)
Dec 07 02:43:39 mail-server-yourdomain amavis[26633]: Starting amavisd: head: cannot open '/etc/mailname' for reading: No such file or directory
Dec 07 02:43:40 mail-server-yourdomain amavis[26633]: The value of variable $myhostname is "mail-server-yourdomain", but should have been
Dec 07 02:43:40 mail-server-yourdomain amavis[26633]: a fully qualified domain name; perhaps uname(3) did not provide such.
Dec 07 02:43:40 mail-server-yourdomain amavis[26633]: You must explicitly assign a FQDN of this host to variable $myhostname
Dec 07 02:43:40 mail-server-yourdomain amavis[26633]: in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
Dec 07 02:43:40 mail-server-yourdomain amavis[26633]: network name!
Dec 07 02:43:40 mail-server-yourdomain amavis[26633]: (failed).
Dec 07 02:43:40 mail-server-yourdomain systemd[1]: amavis.service: Control process exited, code=exited status=1
Dec 07 02:43:40 mail-server-yourdomain systemd[1]: amavis.service: Failed with result 'exit-code'.
Dec 07 02:43:40 mail-server-yourdomainsystemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
dpkg: error processing package amavisd-new (--configure):
installed amavisd-new package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
amavisd-new
E: Sub-process /usr/bin/dpkg returned an error code (1)
Generating new certificate using letsencrypt
--2019-12-07 02:43:41-- https://dl.eff.org/certbot-auto
Resolving dl.eff.org (dl.eff.org)... 2a04:4e42:1e::201, 151.101.124.201
Connecting to dl.eff.org (dl.eff.org)|2a04:4e42:1e::201|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 71650 (70K) [application/octet-stream]
Saving to: ‘certbot-auto.1’
certbot-auto.1 100%[================================================================================================================>] 69.97K --.-KB/s in 0.001s
2019-12-07 02:43:41 (134 MB/s) - ‘certbot-auto.1’ saved [71650/71650]
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator standalone, Installer None
Cert not yet due for renewal
Keeping the existing certificate
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Certificate not yet due for renewal; no action taken.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Installing amavis
Reading package lists...
Building dependency tree...
Reading state information...
libdbi-perl is already the newest version (1.640-1).
arc is already the newest version (5.21q-5).
arj is already the newest version (3.10.22-17).
cabextract is already the newest version (1.6-1.1).
libdbd-mysql-perl is already the newest version (4.046-1).
liblz4-tool is already the newest version (0.0~r131-2ubuntu3).
lrzip is already the newest version (0.631-1).
lzop is already the newest version (1.03-4).
p7zip-full is already the newest version (16.02+dfsg-6).
rpm2cpio is already the newest version (4.14.1+dfsg1-2).
unrar-free is already the newest version (1:0.0.1+cvs20140707-4).
amavisd-new is already the newest version (1:2.11.0-1ubuntu1.1).
The following package was automatically installed and is no longer required:
grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up amavisd-new (1:2.11.0-1ubuntu1.1) ...
Creating/updating amavis user account...
Job for amavis.service failed because the control process exited with error code.
See "systemctl status amavis.service" and "journalctl -xe" for details.
invoke-rc.d: initscript amavis, action "start" failed.
● amavis.service - LSB: Starts amavisd-new mailfilter
Loaded: loaded (/etc/init.d/amavis; generated)
Active: failed (Result: exit-code) since Sat 2019-12-07 02:43:46 UTC; 12ms ago
Docs: man:systemd-sysv-generator(8)
Process: 26951 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)
Dec 07 02:43:45 mail-server-yourdomain amavis[26951]: Starting amavisd: head: cannot open '/etc/mailname' for reading: No such file or directory
Dec 07 02:43:46 mail-server-yourdomain amavis[26951]: The value of variable $myhostname is "mail-server-yourdomain", but should have been
Dec 07 02:43:46 mail-server-yourdomain amavis[26951]: a fully qualified domain name; perhaps uname(3) did not provide such.
Dec 07 02:43:46 mail-server-yourdomain amavis[26951]: You must explicitly assign a FQDN of this host to variable $myhostname
Dec 07 02:43:46 mail-server-yourdomain amavis[26951]: in /etc/amavis/conf.d/05-node_id, or fix what uname(3) provides as a host's
Dec 07 02:43:46 mail-server-yourdomain amavis[26951]: network name!
Dec 07 02:43:46 mail-server-yourdomain amavis[26951]: (failed).
Dec 07 02:43:46 mail-server-yourdomain systemd[1]: amavis.service: Control process exited, code=exited status=1
Dec 07 02:43:46 mail-server-yourdomain systemd[1]: amavis.service: Failed with result 'exit-code'.
Dec 07 02:43:46 mail-server-yourdomain systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
dpkg: error processing package amavisd-new (--configure):
installed amavisd-new package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
amavisd-new
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to install dependencies
Just for future references if people have this problem we fixed it by editing the file under:
/etc/amavis/conf.d/05-node_id
We changed the code from:
# This file was automatically installed on 2019-12-07T03:53:33.896891
use strict;
# $myhostname is used by amavisd-new for node identification, and it is
# important to get it right (e.g. for ESMTP EHLO, loop detection, and so on).
# chomp($myhostname = `hostname --fqdn`);
# To manually set $myhostname, edit the following line with the correct Fully
# Qualified Domain Name (FQDN) and remove the # at the beginning of the line.
#
#$myhostname = "sample-domain-was-here";
1; # ensure a defined return
to
# This file was automatically installed on 2019-12-07T03:53:33.896891
use strict;
# $myhostname is used by amavisd-new for node identification, and it is
# important to get it right (e.g. for ESMTP EHLO, loop detection, and so on).
# chomp($myhostname = `hostname --fqdn`);
# To manually set $myhostname, edit the following line with the correct Fully
# Qualified Domain Name (FQDN) and remove the # at the beginning of the line.
#
$myhostname = "mail.yourdomain.com";
1; # ensure a defined return
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:7 (1 by maintainers)
Top Results From Across the Web
amavis Failes on Install issue #299 - GitHub
Creating/updating amavis user account... Job for amavis.service failed because the control process exited with error code.
Read more >Unable to install the Plesk Email Security: ERROR
Unable to install the Plesk Email Security, the error below is shown: ***** problem report ***** Warning: restart service amavisd failed
Read more >Unable to install amavisd-new on Ubuntu 16.10 - postfix
Hint: Some lines were ellipsized, use -l to show in full. dpkg: error processing package amavisd-new (--configure): subprocess installed ...
Read more >Amavis setup problem | Howtoforge
When I try to install amavisd I get an error RSA.xs:194: OpenSSL error: no start line at (eval 95) line 75. I have...
Read more >amavisd-milter E: Sub-process /usr/bin/dpkg returned an error ...
On Ubuntu 18 and Debian 9 the amavisd-milter package requires that the init-system-helpers package >= 1.54 be installed from the backports repository.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much for this feedback!
It’s a treat to find the solution to one’s problem right away.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.