Bug 46555 - Amavis/Spamassassin not running after installation - no mail delivery
Amavis/Spamassassin not running after installation - no mail delivery
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Sönke Schwardt-Krummrich
Stefan Gohmann
: interim-4
Depends on:
Blocks: 47030
  Show dependency treegraph
 
Reported: 2018-03-08 17:01 CET by Sönke Schwardt-Krummrich
Modified: 2018-05-17 17:56 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.137
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2018-03-08 17:01:01 CET
Amavis/Spamassassin were not running after installation of 
univention-mail-server:

univention-install univention-mail-server --ignoressh --noninteractive


univention-antivir-mail (9.0.0-4A~4.3.0.201801081055) wird eingerichtet ...
Create mail/antivir/scanner
Create mail/antivir
Not updating mail/antispam/requiredhits
Multifile: /etc/postfix/main.cf
Multifile: /etc/postfix/master.cf
Füge Benutzer »clamav« der Gruppe »amavis« hinzu ...
Benutzer clamav wird zur Gruppe amavis hinzugefügt.
Fertig.          
chown: Zugriff auf '/var/run/clamav/' nicht möglich: Datei oder Verzeichnis nicht gefunden
Create clamav/archive/maxfiles
Create clamav/archive/maxfilesize
Create clamav/archive/maxrecursion
Create clamav/database/mirror
Create clamav/checks
Create mail/antivir/banned/double_ext
Create mail/antivir/banned/basic_ext
Create mail/antivir/banned/long_ext
Create mail/antivir/banned/file_type
Create mail/antivir/banned/mime_type
Create mail/antivir/banned/rfc2046
Multifile: /etc/postfix/main.cf
Multifile: /etc/postfix/master.cf
Create mail/antivir/amavis/autostart
Create clamav/daemon/autostart
Create clamav/freshclam/autostart
Create mail/antispam/bodysizelimit
Multifile: /etc/postfix/main.cf
Module: autostart
Multifile: /etc/postfix/master.cf
File: /etc/clamav/freshclam.conf
File: /etc/amavis/conf.d/60-univention
File: /etc/clamav/clamd.conf
File: /etc/amavis/conf.d/15-content_filter_mode
Restarting clamav-daemon (via systemctl): clamav-daemon.service.
File: /etc/clamav/clamd.conf
File: /etc/amavis/conf.d/15-content_filter_mode
Restarting clamav-daemon (via systemctl): clamav-daemon.service.
Restarting spamassassin (via systemctl): spamassassin.serviceJob for spamassassin.service failed because the control process exited with error code.
See "systemctl status spamassassin.service" and "journalctl -xe" for details.
 failed!         
Restarting amavis (via systemctl): amavis.service.
Reloading postfix configuration (via systemctl): postfix.service.
Trigger für dovecot-core (1:2.2.27-3+deb9u2) werden verarbeitet ...
univention-mail-dovecot (4.0.0-8A~4.3.0.201803011723) wird eingerichtet ...
Lege Systembenutzer »dovemail« (UID 126) an ...


root@master44:~# systemctl status spamassassin.service
● spamassassin.service - Perl-based spam filter using text analysis
   Loaded: loaded (/lib/systemd/system/spamassassin.service; disabled; vendor preset: enabled)
   Active: activating (start) since Thu 2018-03-08 16:52:52 CET; 1s ago
Cntrl PID: 26627 (/usr/sbin/spamd)
    Tasks: 2 (limit: 4915)
   Memory: 26.7M
      CPU: 283ms
   CGroup: /system.slice/spamassassin.service
           └─26627 /usr/sbin/spamd -d --pidfile=/var/run/spamd.pid --create-prefs --max-children 10 --helper-home-dir

Mär 08 16:52:52 master44 systemd[1]: Starting Perl-based spam filter using text analysis...
Mär 08 16:52:52 master44 spamd[26627]: logger: removing stderr method
Mär 08 16:52:52 master44 spamd[26629]: config: no rules were found! Do you need to run 'sa-update'?
root@master44:~#
root@master44:~# systemctl restart spamassassin.service
Job for spamassassin.service failed because the control process exited with error code.
See "systemctl status spamassassin.service" and "journalctl -xe" for details.
root@master44:~# systemctl status spamassassin.service 
● spamassassin.service - Perl-based spam filter using text analysis
   Loaded: loaded (/lib/systemd/system/spamassassin.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-03-08 16:52:55 CET; 1min 12s ago
  Process: 26633 ExecStart=/usr/sbin/spamd -d --pidfile=/var/run/spamd.pid $OPTIONS (code=exited, status=255)
      CPU: 311ms

Mär 08 16:52:55 master44 systemd[1]: spamassassin.service: Unit entered failed state.
Mär 08 16:52:55 master44 systemd[1]: spamassassin.service: Failed with result 'exit-code'.
Mär 08 16:52:55 master44 systemd[1]: spamassassin.service: Service hold-off time over, scheduling restart.
Mär 08 16:52:55 master44 systemd[1]: Stopped Perl-based spam filter using text analysis.
Mär 08 16:52:55 master44 systemd[1]: spamassassin.service: Start request repeated too quickly.
Mär 08 16:52:55 master44 systemd[1]: Failed to start Perl-based spam filter using text analysis.
Mär 08 16:52:55 master44 systemd[1]: spamassassin.service: Unit entered failed state.
Mär 08 16:52:55 master44 systemd[1]: spamassassin.service: Failed with result 'exit-code'.
root@master44:~# sa-update
root@master44:~# systemctl status spamassassin.service
● spamassassin.service - Perl-based spam filter using text analysis
   Loaded: loaded (/lib/systemd/system/spamassassin.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-03-08 16:54:13 CET; 1s ago
  Process: 26682 ExecStart=/usr/sbin/spamd -d --pidfile=/var/run/spamd.pid $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 26684 (/usr/sbin/spamd)
    Tasks: 3 (limit: 4915)
   Memory: 79.7M
      CPU: 1.433s
   CGroup: /system.slice/spamassassin.service
           ├─26684 /usr/sbin/spamd -d --pidfile=/var/run/spamd.pid --create-prefs --max-children 10 --helper-home-dir
           ├─26685 spamd child
           └─26686 spamd child
Comment 1 Erik Damrose univentionstaff 2018-03-09 12:47:14 CET
I installed the mailserver component during my UCS installation. I wondered why it took so long and saw that u-spamassasin calls the daily cronjob /etc/cron.daily/spamassassin in its postinst. There, a random sleep of up to 1 hour is executed!

root     22487  0.0  0.0   4288   760 pts/1    S+   12:33   0:00                              \_ /bin/sh /etc/cron.daily/spamassassin
root     22490  0.0  0.0   7376   676 pts/1    S+   12:33   0:00                                  \_ sleep 2185
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2018-03-09 14:11:14 CET
Package: univention-spamassassin
Version: 9.0.0-6A~4.3.0.201803091404
Branch: ucs_4.3-0

univention-spamassassin (9.0.0-6)
f06a47a2ec16 | Bug #46555: assign pseudo pty to call of sa-update
81e2907ccaa1 | Bug #46555: improve handling of sa-update call
0f761fcefb5e | Bug #46555: install UCR templates first and then call sa-update via cron job
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2018-03-09 14:36:33 CET
Just as confirmation from the jenkins run last night (without the fix):

Mar  8 20:08:27 unassigned-hostname spamd[2465]: logger: removing stderr method
Mar  8 20:08:27 unassigned-hostname spamd[2485]: config: no rules were found! Do you need to run 'sa-update'?
Mar  8 20:08:28 unassigned-hostname spamd[2465]: child process [2485] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 2979.
Mar  8 20:08:29 unassigned-hostname spamd[2521]: logger: removing stderr method
Mar  8 20:08:29 unassigned-hostname spamd[2537]: config: no rules were found! Do you need to run 'sa-update'?
Mar  8 20:08:30 unassigned-hostname spamd[2521]: child process [2537] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 2979.
Mar  8 20:08:31 unassigned-hostname spamd[2578]: logger: removing stderr method
Mar  8 20:08:31 unassigned-hostname spamd[2596]: config: no rules were found! Do you need to run 'sa-update'?
Mar  8 20:08:32 unassigned-hostname spamd[2578]: child process [2596] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 2979.
Mar  8 20:08:32 unassigned-hostname spamd[2632]: logger: removing stderr method
Mar  8 20:08:32 unassigned-hostname spamd[2647]: config: no rules were found! Do you need to run 'sa-update'?
Mar  8 20:08:33 unassigned-hostname spamd[2632]: child process [2647] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 2979.
Mar  8 20:08:34 unassigned-hostname spamd[2681]: logger: removing stderr method
Mar  8 20:08:34 unassigned-hostname spamd[2692]: config: no rules were found! Do you need to run 'sa-update'?
Mar  8 20:08:35 unassigned-hostname spamd[2681]: child process [2692] exited or timed out without signaling production of a PID file: exit 255 at /usr/sbin/spamd line 2979.


Mar  8 23:02:07 slave098 amavis[15076]: Using primary internal av scanner code for Clam Antivirus-clamd
Mar  8 23:02:07 slave098 amavis[15076]: Deleting db files __db.002,snmp.db,__db.001,nanny.db,__db.003 in /var/lib/amavis/db
Mar  8 23:02:07 slave098 amavis[15076]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
Mar  8 23:02:07 slave098 amavis[15076]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
Mar  8 23:02:07 slave098 amavis[15076]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

So if a lot of 40_mail tests fail (test sent a mail but it was never delivered) it is likely this problem.
Comment 4 Stefan Gohmann univentionstaff 2018-03-10 20:45:37 CET
Code review: OK

Tests: OK

Changelog: Fail, please add a changelog entry.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2018-03-12 14:05:33 CET
(In reply to Stefan Gohmann from comment #4)
> Changelog: Fail, please add a changelog entry.

Fixed.
Comment 6 Stefan Gohmann univentionstaff 2018-03-12 14:56:04 CET
(In reply to Sönke Schwardt-Krummrich from comment #5)
> (In reply to Stefan Gohmann from comment #4)
> > Changelog: Fail, please add a changelog entry.
> 
> Fixed.

doc-common:
[master 8cceb39] Added ruleset to dict (Bug #46555)

changelog-4.3-0.xml
[4.3-0 fbe2cf506d] Make our spell checker happy (Bug #46555)
Comment 7 Stefan Gohmann univentionstaff 2018-03-14 14:37:50 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".