Updated to ISPConfig Version: 3.2.5 - Amavis failed

Discussion in 'General' started by onastvar, Jun 8, 2021.

  1. onastvar

    onastvar Member

    I ran update from ISPConfig Version: 3.2.4 to ISPConfig Version: 3.2.5, for each prompt I hit enter. I got the following:
    Is this an issue, or it could be ignored, how to fix? Thanks!

    Updating Crontab
    Restarting services ...
    Job for amavis.service failed because the control process exited with error code.
    See "systemctl status amavis.service" and "journalctl -xe" for details.
    Update finished.

    systemctl status amavis.service
    * amavis.service - LSB: Starts amavisd-new mailfilter
    Loaded: loaded (/etc/init.d/amavis; generated; vendor preset: enabled)
    Active: failed (Result: exit-code) since Tue 2021-06-08 10:31:56 CDT; 23s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 13555 ExecStart=/etc/init.d/amavis start (code=exited, status=1/FAILURE)

    Jun 08 10:31:55 lara systemd[1]: Starting LSB: Starts amavisd-new mailfilter...
    Jun 08 10:31:56 lara amavis[13555]: Starting amavisd: Error in config file "/etc/amavis/conf.d/60-dkim":
    Jun 08 10:31:56 lara amavis[13555]: (failed).
    Jun 08 10:31:56 lara systemd[1]: amavis.service: Control process exited, code=exited status=1
    Jun 08 10:31:56 lara systemd[1]: Failed to start LSB: Starts amavisd-new mailfilter.
    Jun 08 10:31:56 lara systemd[1]: amavis.service: Unit entered failed state.
    Jun 08 10:31:56 lara systemd[1]: amavis.service: Failed with result 'exit-code'.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Log says
    Error in config file "/etc/amavis/conf.d/60-dkim":
    What is in that config file?
  3. onastvar

    onastvar Member

    /etc/amavis/conf.d/60-dkim has 15 lines of DKIM_KEY,

    they look like this (I replaced website1.com instead of real domain name)

    dkim_key('website1.com', 'default', '/var/lib/amavis/dkim/website1.com.private');
  4. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    That's exactly what should be in that file, though judging by the error you see, that may not be all that's in yours.

    FWIW I just updated an install to 3.2.5, and amavis seems to be working fine.
  5. onastvar

    onastvar Member

  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I guess you did not uninstall the amavis package after upgrading to rspamd? If amavis package is present it is updated and the update replaces configuration files and probably also activates amavis.
    Stop and disable amavis now, and remove the amavis package(s).
    Find them first:
    dpkg --list | grep amavis
    and then remove with purge:
    apt purge <name of package>
    Last edited: Jun 10, 2021
    madmucho and onastvar like this.
  7. onastvar

    onastvar Member

    Thanks @Taleman!
    Removed amavis from my system.
  8. florix.net

    florix.net Member

    i had to mention full domain name in order to amavisd work ...
    by default it was taking only hostname
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    The full domain name is not required to be set in the amavisd config, you need just correct settings in /etc/hosts on the server so that the command:

    hostname -f

    works as expected and returns the fully qualified domain name (full hostname). I recommend changing back the amavisd config and then fix your /etc/hosts file, as other software might fail as well when the Linux hostname command is not able to return the full hostname.
  10. florix.net

    florix.net Member

    it says
    [root@trinity log]# hostname -f
    It should return FQDN?

    /etc/hosts is like this

    1XX.105.XX.148 trinity trinity.mydomain.net
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, see manpage. The command "hostname" must return "trinity" and "hostname -f" must return "trinity.mydomain.net" and as that does not work, amavis failed. The reason for the problem is that you mixed up long and short name in /etc/hosts. Change it to:

    1XX.105.XX.148 trinity.mydomain.net trinity
  12. florix.net

    florix.net Member

    Thank you sir, but it happened automatically when i updated to recent ISPConfig.
    all other services were working, except amavisd, so I put that patch
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    As mentioned, amavis must fail due to your wrong /etc/hosts settings, and these are not set by ISPConfig in /etc/hosts. But ISPConfig restarts amavis, which made your mistake in the hosts file visible. Undo the amavis changes and fix your hosts file to avoid further problems.

Share This Page