{fixed} Had an odd problem with UCS + Kopano (postfix/amavis.service/spamassassin.service

Hey everyone, hopefully this can help someone who has run into this… I recently installed Kopano Core on my server and ran into an issue where I could not send any local test messages to local users. Hope keyword search helps someone else with this.

So a little troubleshooting

root@ucs2:/var/log# tail -f mail.log
Mar 22 12:43:37 ucs2 postfix/smtp[29788]: D1537106E9B: to=<user1@domain.com>, relay=none, delay=2156, delays=2156/0.03/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Mar 22 12:43:37 ucs2 postfix/smtp[29787]: C21591067E8: to=<user1@domain.com>, relay=none, delay=1143, delays=1143/0.02/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

Error log

root@ucs2:/var/log# tail /var/log/mail.err
Mar 20 23:15:50 ucs2 amavis[8459]: (08459-04) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 20 23:16:48 ucs2 amavis[8460]: (08460-04) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 21 03:30:14 ucs2 amavis[8459]: (08459-05) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 21 20:30:45 ucs2 amavis[8460]: (08460-05) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 22 03:31:19 ucs2 amavis[8459]: (08459-06) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 22 06:49:27 ucs2 amavis[8460]: (08460-06) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 22 08:22:40 ucs2 amavis[8459]: (08459-07) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 22 08:24:39 ucs2 amavis[8460]: (08460-07) (!!)AV: ALL VIRUS SCANNERS FAILED
Mar 22 09:17:58 ucs2 amavis[1848]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
Mar 22 10:08:03 ucs2 amavis[1909]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

A little searching on the fourms pointed to the spamassasin service and amavis

root@ucs2:~# systemctl status spamassassin.service
lines 1--1...skipping...
● spamassassin.service - Perl-based spam filter using text analysis
   Loaded: loaded (/lib/systemd/system/spamassassin.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
~
~



root@ucs2:~# systemctl restart spamassassin.service
root@ucs2:~# 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 Fri 2019-03-22 13:01:35 PDT; 5s ago
  Process: 30697 ExecStart=/usr/sbin/spamd -d --pidfile=/var/run/spamd.pid $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 30699 (spamd)
    Tasks: 3 (limit: 4915)
   Memory: 91.6M
      CPU: 2.726s
   CGroup: /system.slice/spamassassin.service
           ├─30699 /usr/bin/perl -T -w /usr/sbin/spamd -d --pidfile=/var/run/spamd.pid --create-prefs --max-children 10 --helper-home-dir
           ├─30700 spamd child
           └─30701 spamd child

Mar 22 13:01:31 ucs2 systemd[1]: Starting Perl-based spam filter using text analysis...
Mar 22 13:01:32 ucs2 spamd[30697]: logger: removing stderr method
Mar 22 13:01:34 ucs2 spamd[30699]: zoom: able to use 344/346 'body_0' compiled rules (99.421%)
Mar 22 13:01:35 ucs2 spamd[30699]: spamd: server started on IO::Socket::IP [::1]:783, IO::Socket::IP [127.0.0.1]:783 (running version 3.4.2)
Mar 22 13:01:35 ucs2 spamd[30699]: spamd: server pid: 30699
Mar 22 13:01:35 ucs2 systemd[1]: Started Perl-based spam filter using text analysis.
Mar 22 13:01:35 ucs2 spamd[30699]: spamd: server successfully spawned child process, pid 30700
Mar 22 13:01:35 ucs2 spamd[30699]: spamd: server successfully spawned child process, pid 30701
Mar 22 13:01:35 ucs2 spamd[30699]: prefork: child states: IS
Mar 22 13:01:35 ucs2 spamd[30699]: prefork: child states: II

now logs are different… progress.

root@ucs2:/var/log# tail -f mail.log
Mar 22 13:02:24 ucs2 postfix/error[30726]: F2A98106B01: to=<user1@domain.com>, relay=none, delay=0.19, delays=0.08/0.05/0/0.06, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Mar 22 13:03:37 ucs2 postfix/qmgr[6034]: C21591067E8: from=<user2@domain.com>, size=1578, nrcpt=2 (queue active)
Mar 22 13:03:37 ucs2 postfix/qmgr[6034]: D4F5D1066A4: from=<user1@domain.com>, size=2906, nrcpt=1 (queue active)
Mar 22 13:03:37 ucs2 postfix/error[30742]: D4F5D1066A4: to=<user2@domain.com>, relay=none, delay=2248, delays=2248/0.04/0/0.02, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Mar 22 13:03:37 ucs2 postfix/error[30726]: C21591067E8: to=<user2@domain.com>, relay=none, delay=2342, delays=2342/0.01/0/0.05, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Mar 22 13:03:37 ucs2 postfix/error[30726]: C21591067E8: to=<user1@domain.com>, relay=none, delay=2342, delays=2342/0.01/0/0.06, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

root@ucs2:~# systemctl status amavis.service
● amavis.service - LSB: Starts amavisd-new mailfilter
   Loaded: loaded (/etc/init.d/amavis; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2019-03-22 10:08:00 PDT; 2h 58min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 849 ExecStart=/etc/init.d/amavis start (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/amavis.service

Mar 22 10:08:00 ucs2 amavis[1909]: No decoder for       .lzo
Mar 22 10:08:00 ucs2 amavis[1909]: No decoder for       .rar
Mar 22 10:08:00 ucs2 amavis[1909]: No decoder for       .rpm
Mar 22 10:08:00 ucs2 amavis[1909]: No decoder for       .swf
Mar 22 10:08:00 ucs2 amavis[1909]: No decoder for       .zoo
Mar 22 10:08:00 ucs2 amavis[1909]: Using primary internal av scanner code for Clam Antivirus-clamd
Mar 22 10:08:00 ucs2 amavis[1909]: Deleting db files __db.002,__db.001,__db.003,snmp.db,nanny.db in /var/lib/amavis/db
Mar 22 10:08:00 ucs2 amavis[1909]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
Mar 22 10:08:03 ucs2 amavis[1909]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
Mar 22 10:08:03 ucs2 amavis[1909]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

another quick form search

root@ucs2:~# /etc/cron.daily/spamassassin
root@ucs2:~# service amavis restart
root@ucs2:~# systemctl status amavis.service
● amavis.service - LSB: Starts amavisd-new mailfilter
   Loaded: loaded (/etc/init.d/amavis; generated; vendor preset: enabled)
   Active: active (running) since Fri 2019-03-22 13:08:14 PDT; 5s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 31007 ExecStop=/etc/init.d/amavis stop (code=exited, status=0/SUCCESS)
  Process: 31015 ExecStart=/etc/init.d/amavis start (code=exited, status=0/SUCCESS)
    Tasks: 3 (limit: 4915)
   Memory: 143.6M
      CPU: 4.941s
   CGroup: /system.slice/amavis.service
           ├─31032 /usr/sbin/amavisd-new (master)
           ├─31038 /usr/sbin/amavisd-new (virgin child)
           └─31039 /usr/sbin/amavisd-new (virgin child)

Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .lrz
Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .lz4
Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .lzo
Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .rar
Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .rpm
Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .swf
Mar 22 13:08:14 ucs2 amavis[31032]: No decoder for       .zoo
Mar 22 13:08:14 ucs2 amavis[31032]: Using primary internal av scanner code for Clam Antivirus-clamd
Mar 22 13:08:14 ucs2 amavis[31032]: Deleting db files __db.002,__db.001,__db.003,snmp.db,nanny.db in /var/lib/amavis/db
Mar 22 13:08:14 ucs2 amavis[31032]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.55, libdb 5.3
root@ucs2:~# postqueue -f

Mail is now flowing correctly.

I’ll try to see why it did this in the first place.

This happens, if SpamAssassin has no filter rules. The most likely reason is no internet access during installation.

Mastodon