• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Start spamassassin.service Failed with result 'timeout'.

jacco

New Pleskian
Server operating system version
AlmaLinux 8
Plesk version and microupdate number
18.0.52 Update #3
After a technical issue in the datacenter, my VPS refuse to receive email. I've hunted the issue down to a failing start of Spamassasin. I can't get it started. It tries and then a timeout occurs.

IN /var/log/maillog:
Code:
Jun 26 19:34:34 vps postfix/smtpd[50634]: warning: connect to Milter service inet:127.0.0.1:12768: Connection timed out
Jun 26 19:34:34 vps postfix/smtpd[50634]: NOQUEUE: milter-reject: CONNECT from relay0.transip.nl[149.210.149.12]: 451 4.7.1 Service unavailable - try again later; proto=SMTP
Jun 26 19:34:34 vps postfix/smtpd[50634]: NOQUEUE: milter-reject: EHLO from relay0.transip.nl[149.210.149.12]: 451 4.7.1 Service unavailable - try again later; proto=SMTP helo=<relay0.transip.nl>
Jun 26 19:34:34 vps postfix/smtpd[50634]: NOQUEUE: milter-reject: MAIL from relay0.transip.nl[149.210.149.12]: 451 4.7.1 Service unavailable - try again later; from=<1axbrilbhbmzcfyap56x5wdotokugw44hatpvf-xxx=xxx.nl@support.freelance.nl> proto=ESMTP helo=<relay0.transip.nl>

I can tell Milter is actually running:
Code:
[root@vps ~]# systemctl status pc-remote.service
● pc-remote.service - Plesk mail filter service for Postfix
   Loaded: loaded (/usr/lib/systemd/system/pc-remote.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/pc-remote.service.d
           └─respawn.conf
   Active: active (running) since Mon 2023-06-26 19:18:13 CEST; 19min ago
 Main PID: 46460 (psa-pc-remote)
    Tasks: 2 (limit: 23632)
   Memory: 964.0K
   CGroup: /system.slice/pc-remote.service
           └─46460 /usr/lib64/plesk-9.0/psa-pc-remote -p inet:[email protected] -t 7210 -P /run/psa-pc-remote.pid -u post>

Jun 26 19:18:13 vps.qurl.nl systemd[1]: pc-remote.service: Succeeded.
Jun 26 19:18:13 vps.qurl.nl systemd[1]: Stopped Plesk mail filter service for Postfix.
Jun 26 19:18:13 vps.qurl.nl systemd[1]: Started Plesk mail filter service for Postfix.

[root@vps ~]# netstat -talpn | grep 12768
tcp        0      0 127.0.0.1:12768         0.0.0.0:*               LISTEN      46460/psa-pc-remote

Also the milter in /etc/postfix/main.cf looks fine
Code:
[root@vps ~]# cat /etc/postfix/main.cf | grep smtpd_milter
smtpd_milters = , inet:127.0.0.1:12768

Status of Spamassasin:
Code:
[root@vps ~]# systemctl status spamassassin.service
● spamassassin.service - Spamassassin daemon
   Loaded: loaded (/usr/lib/systemd/system/spamassassin.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/spamassassin.service.d
           └─pidfile.conf, type.conf
   Active: inactive (dead)
AlmaLinux 8
Jun 26 19:15:35 vps.xx.xx systemd[1]: Failed to start Spamassassin daemon.
Jun 26 19:15:35 vps.xx.xx systemd[1]: spamassassin.service: Service RestartSec=100ms expired, scheduling restart.
Jun 26 19:15:35 vps.xx.xx systemd[1]: spamassassin.service: Scheduled restart job, restart counter is at 2.
Jun 26 19:15:35 vps.xx.xx systemd[1]: Stopped Spamassassin daemon.
Jun 26 19:15:35 vps.xx.xx systemd[1]: Starting Spamassassin daemon...
Jun 26 19:15:35 vps.xx.xx spamd[44483]: logger: removing stderr method
Jun 26 19:17:46 vps.xx.xx spamd[44487]: spamd: server killed by SIGTERM, shutting down
Jun 26 19:17:46 vps.xx.xx spamd[44487]: spamd: cannot unlink /var/run/spamd.pid: No such file or directory
Jun 26 19:17:46 vps.xx.xx systemd[1]: spamassassin.service: Succeeded.
Jun 26 19:17:46 vps.xx.xx systemd[1]: Stopped Spamassassin daemon.

I tried a plesk repair mail -y and a plek repair installation -y
The latter did fix a few things it looks like and did complain about spamassasin, but still no go.
Code:
Job for spamassassin.service failed because a timeout was exceeded.
See "systemctl status spamassassin.service" and "journalctl -xe" for details.
INFO: [Mon Jun 26 19:11:12 CEST 2023]: Service: spamassassin, Action: start
 Trying to start service spamassassin... failed
Jun 26 19:13:23 vps.xx.xx systemd[1]: spamassassin.service: Failed with result 'timeout'.
Jun 26 19:13:23 vps.xx.xx systemd[1]: Failed to start Spamassassin daemon.

*****  problem report *****
Warning: start service spamassassin failed
 
Hi @jacco, could you please check that your container is only using 127.0.0.1? Or does it run on another local address like 127.0.0.2?

# ip a

like
Code:
......
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
 inet 127.0.0.2/32 scope host venet0
inet 62.4.16.231/32 brd 62.4.16.231 scope global venet0:0
 
Hi @Peter Debik ,

It's not. Only the link local (obviously) is on 127.0.0.1. Also, it's not a container. It's a VPS running on a QEMU layer.

Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 52:54:00:f2:ad:07 brd ff:ff:ff:ff:ff:ff
    inet 136.144.xxx.xxx/24 brd 136.144.xxx.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 xxxx:xxx:fff8:1b2:5054:ff:fef2:ad07/64 scope global dynamic noprefixroute
       valid_lft 2591991sec preferred_lft 604791sec
    inet6 xxxx:xxx:fff8:1b2::1/64 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fef2:ad07/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

Next to this, I also tried removing and installing the spamassasin package using /usr/local/psa/admin/bin/autoinstaller, but that also didn't fix the issue.
 
Some extra info I found: https://support.plesk.com/hc/en-us/...e-Plesk-Email-Security-extension-is-installed
I do use this extension, so, that would mean the not started SpamAssassin is correct. Then I have to go back to the original issue: Milter connection timed out. So, I tried to telnet into port 12768 from the terminal and there is no reply. Hence the timeout in the maillog.

I added (for the time being) to /etc/postfix/main.cf:
Code:
milter_default_action = accept
But that doesn't help either it seems. The warning about the milter timeout is gone. But mail is not being processed by SMTP. It just sits and wait until the SMTP server closes the connection.
 
Please open a ticket with Plesk support. The issue in the constellation that you are presenting is not yet known and needs to be checked on your server by a support engineer.

To sign-in to support please go to https://support.plesk.com

If you experience login issues, please see this KB article:
https://support.plesk.com/hc/en-us/...rt-plesk-com-and-password-reset-does-not-work

If you bought your license from a reseller, your reseller should provide support for you. If the reseller does not provide support, here is an alternative:
https://support.plesk.com/hc/en-us/articles/12388090147095-How-to-get-support-directly-from-Plesk-
 
For the ones who might be interested: The problem was related to the firewall. It did actually crossed my mind yesterday, but I ruled that out. I assumed (i know WRONG!! Never assume) there couldn't be a problem as the connection is made to localhost. Apparently something got awry there. After I had to change something for Plesk support, all suddenly started to work again.
 
For the ones who might be interested: The problem was related to the firewall. It did actually crossed my mind yesterday, but I ruled that out. I assumed (i know WRONG!! Never assume) there couldn't be a problem as the connection is made to localhost. Apparently something got awry there. After I had to change something for Plesk support, all suddenly started to work again.
I was running into similar errors with the milter service (after you fix SA) and all seemed to be 'solved' when I temorarily disabled the firewall.
Same OS and almost same Plesk version:
AlmaLinux 8.8
Plesk 18.0.53#2

Do you have any specific info on what change caused the issue to be fixed?

My VPS is also at TransIP by the way ;-)
 
Back
Top