Centos 7, up-to-date Webmin/Virtualmin
Since long incoming mail have a delay of 30 to 60 secs to be delivered because of Spamassassin scan I coludn’t solve. This mail server has very low traffic.
It is not a big issue so I left that so.
Today I created a procmail recipe to make an auto reply to a sender. It worked okay until something happened: auto reply was sent but the original mail was lost, it wasn’t delivered to Inbox.
Looking at the logs I found at procmail.log “Virus scanner failed to response within 30 seconds”.
It seems the delay in the first tests was less than 30 secs.
I couldn’t find if it is possible to change that response limit but googleing I found an old Virtualmin question: System grinding to a halt | Virtualmin
ps aux | grep clam
username 31127 0.0 0.0 26132 2144 ? S 20:30 0:00 /usr/bin/perl /etc/webmin/virtual-server/clam-wrapper.pl /bin/clamscan
username 31128 0.0 0.0 9564 1156 ? S 20:30 0:00 sh -c /bin/clamscan - >/tmp/clamwrapper.31127
username 31129 101 15.7 1385464 1258520 ? R 20:30 0:30 /bin/clamscan -
Should I use clamd instead of clamscan? How so?
This is the default installation of Webmin/Virtualmin in 2019
It should be impossible for you to use clamscan. There was a bug in Virtualmin that allowed you to pick an option that is literally unusable, because the clamav database has grown so large and clamscan is so slow to start.
If you can’t use clamd (due to low memory, or whatever), you can’t use clam, and should disable AV scanning (SpamAssassin has nothing to do with this, not sure why it’s in your title?).
Note that ClamAV is very, very, large, and very, very resource-intensive. So, unless you have sufficient RAM (probably 4GB or more, since clamd will consume over 1GB by itself) and CPU resources to throw at the problem, you shouldn’t do AV scanning on the server.
Thanks Joe for the tip.
It is a Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, 4 cores
2.59 GiB used / 2.45 GiB cached / 7.63 GiB total
Yes, before asking here I was looking at Spamassassin configuration and accidentally mixed the things. sorry.
I went to System Settings → Features & plugins, unchecked Virus Filtering and I got
Failed to save enabled features : Apache configuration errors were found :
AH00526: Syntax error on line 505 of /etc/httpd/conf/httpd.conf: Invalid command ‘php_admin_value’, perhaps misspelled or defined by a module not included in the server configuration
Anyway clamscan is not running now.
That’s a new problem, and has been discussed. Searching for the error will bring up solutions. It comes from having mod_php installed (bad!) in the past and then disabling it or removing it (good! but Virtualmin’s not handling it well, so the Apache config needs a nudge).
If I recall correctly recently Webmin displayed a warning about removing that mod because no VS was using it so I removed it. That would be the reason of the syntax error.
As for the original question, procmail.log doesn’t display anymore “Virus scanner failed to response within 30 seconds” but the incoming mail is not sent to Inbox after performing the procmail recipe. It is executed for a fixed user, creates an auto reply (that always is sent) but now, after some good first tests the mail isn’t delivered to Inbox
I thought it was because clamAV 's delay but there’s something else I don’t realize what it would be
Mail log might show something!!
It shows something like … passed to procmail
... relay=local, delay=30, delays=0.29/0.01/0/30, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
Here is the default procmail filter if that helps.
That’s why I didn’t changed anything there.
First I disabled Virus scan in all of my few Virtual Servers and then I went to Virtualmin/System settings/Features to uncheck Virus filtering. This is not needed, it just removes the Virus checkbox of all VS.
Anyway it is supposed Procmail sends the incoming mail to the Inbox directory after applying the recipe. It doesn’t happen. Strangely it happened the first tests I’ve performed with the virus filtering enabled.
I had posted a question in ServerFault about Procmail delivery issue before I found Procmail gives up if virus scanning takes longer than 30 seconds.
A guy asks me “.…asking you to show the actual code which runs ClamAV”
I really don’t know. I told him I had disabled virus scan but he insisted.
I’m going to start a new question here with the very short procmail recipe.
Try running Re-Check Configuration in Virtualmin System Settings.
The status of your system is being checked to ensure that all enabled features are available and properly configured …
Your system has 7.63 GiB of memory, which is at or above the Virtualmin recommended minimum of 256 MiB
BIND DNS server is installed
Mail server Postfix is installed and configured
Postfix is configured to support per-domain outgoing IP addresses
Apache is installed
CGI scripts can be executed using suEXEC
Apache does not support HTTP/2 : Missing Apache mod_http2 module
The following PHP execution modes are available : cgi fcgid fpm
The following PHP versions are available : 5.6.40 (/bin/php-cgi), 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 7.4.29 (/bin/php74-cgi), 8.0.19 (/bin/php80-cgi)
The following PHP-FPM versions are available : 5.6.40 (php-fpm) 7.2.24 (rh-php72-php-fpm) 7.4.29 (php74-php-fpm) 8.0.19 (php80-php-fpm)
Webalizer is installed
Apache is configured to host SSL websites
MariaDB 5.5.68 is installed and running
ProFTPD is installed
Logrotate is installed
SpamAssassin and Procmail are installed and configured for use
Plugin Mail Relay is installed
Plugin AWStats reporting is installed
Plugin DAV Login is installed
Plugin Protected web directories is installed
Using network interface eth0 for virtual IPs
Default IPv4 address for virtual servers is 126.96.36.199
Both user and group quotas are enabled for home and email directories
All commands needed to create and restore backups are installed
The selected package management and update systems are installed
Chroot jails are available
… your system is ready for use by Virtualmin
Re-starting DNS server …
The new question:
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.