Mail does not work: milter-reject: END-OF-MESSAGE from localhost.localdomain[::1]: 4.7.1 Service unavailable - try again later

Symptoms

  • Impossible to send or receive the email on the server.
  • Local delivery does not work.
  • Records like the following can be found in /var/log/maillog
Apr 18 22:21:37 youruserver postfix/cleanup[13406]: E96C852200CB: milter-reject: END-OF-MESSAGE from localhost.localdomain[::1]: 4.7.1 Service unavailable - try again later; from=<from@example.com> to=<to@example.com> proto=ESMTP helo=<webmail.example.com>

Cause

This means that the ClamAV milter is running but cannot connect to the ClamAV daemon to scan the message for viruses so the message is rejected.

Resolution

  1. Under Warden -> Settings -> AV Milter Settings -> Change On fail to Accept.
  2.  Press the restart button to restart the ClamAV milter.

Now email will still be accepted even when ClamAV is having problems (Although it will not be scanned for viruses).

Common Problems

Not enough memory to start the ClamAV daemon:

If you see `Cannot allocate memory` in your ClamAV daemon logs this means that you do not have enough free memory in order to start the ClamAV daemon. Free up some memory on your server or upgrade your system memory then restart the Anti-virus service and Anti-virus milter service.

# grep 'Cannot allocate memory' /var/log/clamd.scan 
Sun Feb 10 03:15:52 2019 -> ERROR: daemonize() failed: Cannot allocate memory
Sun Feb 10 03:25:51 2019 -> ERROR: daemonize() failed: Cannot allocate memory
Sun Feb 10 03:32:12 2019 -> ERROR: daemonize() failed: Cannot allocate memory

Incorrect permissions your /var/tmp or /tmp directories used by the ClamAV and ClamAV Milter:

If you see `Failed to create temporary file` in your ClamAV daemon or ClamAV milter logs this means that your /var/tmp or /tmp permissions are not writable by the ClamAV daemon or ClamAV milter.

# grep 'Failed to create temporary file' /var/log/clamav-milter.log
Thu Apr 18 22:31:55 2019 -> ERROR: Failed to create temporary file
Thu Apr 18 22:31:55 2019 -> ERROR: Failed to create temporary file

To fix the tmp permissions change the permissions then restart the ClamAV daemon service and ClamAV milter service:

chmod 777 /var/tmp /tmp

Installation problems:

1. You can re-run the installer on the command line as many times as you like to check for errors.

Centos / RHEL / CloudLinux

/usr/local/psa/admin/bin/modules/warden/install.sh

Debian / Ubuntu

/opt/psa/admin/bin/modules/warden/install.sh

2. Try restarting the ClamAV daemon and ClamAV milter services and check for any errors:

Centos / RHEL / CloudLinux 7 (systemd)

// clamav restart 
systemctl restart clamd@scan.service

// clamav log file
tail -f /var/log/clamd.scan 

// clamav-milter restart 
systemctl restart clamav-milter.service 

// clamav-milter log file
tail -f /var/log/clamav-milter.log 

Centos / RHEL / CloudLinux 6 (sysvinit)

// clamav restart 
/etc/init.d/clamd restart

// clamav log file
tail -f /var/log/clamav/clamd.log

// clamav-milter restart 
/etc/init.d/clamav-milter restart

// clamav log file
tail -f /var/log/clamav/clamav-milter.log

Debian / Ubuntu

// clamav restart 
/etc/init.d/clamav-daemon restart

// clamav log file
tail -f /var/log/clamav/clamav.log 

// clamav-milter restart 
/etc/init.d/clamav-milter restart

// clamav log file
tail -f /var/log/clamav/clamav-milter.log

If you still have problems just open a support ticket in our client area to have an experienced technician diagnose and fix the problem for you.

 

 

  • milter-reject, END-OF-MESSAGE
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Why isn't autolearning working for me (autolearn=no) ?

Lots of people seem to be confused by the "autolearn=no" statement in the default X-Spam-Status...

I get the a 502 gateway error when clicking on the application. How can I fix this?

This can usually be fixed by just restarting the Plesk interface:/etc/init.d/psa restart

How can I fix the error WARNING: Ignoring deprecated option AllowSupplementaryGroups after upgrading to ClamAV 1.00?

The AllowSupplementaryGroups option was deprecated in ClamAV 1.00. If this option is present in...

How can I fix the error: spamass-milter[27944]: Could not extract score from <> ?

When you look at your email log you see: spamass-milter[27944]: Could not extract score from...

How can I stop encrypted archives from being allowed though ClamAV?

For ClamAV 0.100 and belowUnder Warden -> Settings -> Scanning Settings -> Block...