Could not disable amavisd service after replacing amavisd with rspamd

Discussion in 'ISPConfig 3 Priority Support' started by Etcetera, May 22, 2020.

  1. Etcetera

    Etcetera Member HowtoForge Supporter

    Replacing amavisd with rspamd on two machines running Ubuntu 16.04 LTS ("perfect server" with Apache, Dovecot, Postfix) went well and rspamd seems to work well, too. The only thing that didn't work on either machine was disabling the amavisd-new service after stopping it:
    Code:
    [email protected]:~# systemctl disable amavisd-new
    Failed to execute operation: No such file or directory
    There are suggestions on the web to move the service file from /etc/systemd/... to /lib/systemd/... before disabling it, but I couldn't find something like it in either location. Any ideas?
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Did you check the name of service on Ubuntu 16.04 is amavisd-new?
    I switched to rspamd earlier today on Debian 10 Buster. There that disable did work.
     
    till likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The amavisd-new service might be named just 'amavis' or 'amavisd'.
     
  4. Etcetera

    Etcetera Member HowtoForge Supporter

    systemctl stop amavisd-new and systemctl status amavisd-new worked as expected, so I suppose it's indeed named amavisd-new:
    Code:
    [email protected]:~# systemctl status amavisd-new
    ‚óŹ amavis.service - LSB: Starts amavisd-new mailfilter
       Loaded: loaded (/etc/init.d/amavis; bad; vendor preset: enabled)
       Active: inactive (dead) since Fr 2020-05-22 17:38:19 CEST; 2h 5min ago
         Docs: man:systemd-sysv-generator(8)
      Process: 21048 ExecStop=/etc/init.d/amavis stop (code=exited, status=0/SUCCESS)
      Process: 8466 ExecStart=/etc/init.d/amavis start (code=exited, status=0/SUCCESS)
    
    Mai 22 16:34:30 server2[...] amavis[8666]: No decoder for       .rar
    Mai 22 16:34:30 server2[...] amavis[8666]: No decoder for       .rpm
    Mai 22 16:34:30 server2[...] amavis[8666]: No decoder for       .swf
    Mai 22 16:34:30 server2[...] amavis[8666]: Using primary internal av scanner code for ClamAV-clamd
    Mai 22 16:34:30 server2[...] amavis[8666]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
    Mai 22 16:34:30 server2[...] amavis[8666]: Deleting db files __db.001,__db.003,__db.002,snmp.db,nanny.db in /var/lib/amavis/db
    Mai 22 16:34:30 server2[...] amavis[8666]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
    Mai 22 17:38:19 server2[...] systemd[1]: Stopping LSB: Starts amavisd-new mailfilter...
    Mai 22 17:38:19 server2[...] amavis[21048]: Stopping amavisd: amavisd-new.
    Mai 22 17:38:19 server2[...] systemd[1]: Stopped LSB: Starts amavisd-new mailfilter.
    
    As that mentions an 'amavis.service', I tried systemctl disable amavis, too, with this result (and with 'systemctl status' still showing 'loaded'):
    Code:
    amavis.service is not a native service, redirecting to systemd-sysv-install
    Executing /lib/systemd/systemd-sysv-install disable amavis
    insserv: warning: current start runlevel(s) (empty) of script `amavis' overrides LSB defaults (2 3 4 5).
    insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `amavis' overrides LSB defaults (0 1 6)
     
    Last edited: May 22, 2020
  5. Etcetera

    Etcetera Member HowtoForge Supporter

    This issue came up again when I wanted to make the switch back from rspamd to amavisd today:
    Code:
    [email protected]:~# sudo systemctl enable amavisd-new
    Failed to execute operation: No such file or directory
    I needed to uninstall (remove) and reinstall amavisd-new (and I reinstalled the latest ISPConfig, making it "reconfigure services", to be sure) before it ran again.
     

Share This Page