Hi all, thanks for reply
It seams, (after server restart) all is ok. It looks like amavis service try to contact with clamd but it not fully started, therefore this message about "Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.socket:". But, regardless, postfix runs, mails not stuck in queue, viruses are scanned (yes, I recieved email that clam found suspiciuos one).
Logs after full reboot:
Jan 8 16:03:09 mail clamd[1002]: Loaded 6659512 signatures.
then starts amavis, clamd still not fully started, becouse:
Jan 8 16:03:11 mail amavis[2743]: (02743-01) (!)connect to /var/run/clamd.amavisd/clamd.socket failed, attempt #1: Can't connect to a UNIX socket /var/run/clamd.amavisd/clamd.socket: No such file or directory
then in log, clamd keep starting:
Jan 8 16:03:12 mail clamd[1002]: LOCAL: Unix socket file /var/run/clamd.amavisd/clamd.socket
Jan 8 16:03:12 mail clamd[1002]: LOCAL: Setting connection queue length to 200
Jan 8 16:03:12 mail clamd[1002]: Limits: Global size limit set to 104857600 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: File size limit set to 26214400 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: Recursion level limit set to 16.
Jan 8 16:03:12 mail clamd[1002]: Limits: Files limit set to 10000.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxEmbeddedPE limit set to 10485760 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxHTMLNormalize limit set to 10485760 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxHTMLNoTags limit set to 2097152 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxScriptNormalize limit set to 5242880 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxZipTypeRcg limit set to 1048576 bytes.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxPartitions limit set to 50.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxIconsPE limit set to 100.
Jan 8 16:03:12 mail clamd[1002]: Limits: MaxRecHWP3 limit set to 16.
Jan 8 16:03:12 mail clamd[1002]: Limits: PCREMatchLimit limit set to 10000.
Jan 8 16:03:12 mail clamd[1002]: Limits: PCRERecMatchLimit limit set to 5000.
Jan 8 16:03:12 mail clamd[1002]: Limits: PCREMaxFileSize limit set to 26214400.
Jan 8 16:03:12 mail clamd[1002]: Archive support enabled.
Jan 8 16:03:12 mail clamd[1002]: Algorithmic detection enabled.
Jan 8 16:03:12 mail clamd[1002]: Portable Executable support enabled.
Jan 8 16:03:12 mail clamd[1002]: ELF support enabled.
Jan 8 16:03:12 mail clamd[1002]: Mail files support enabled.
Jan 8 16:03:12 mail clamd[1002]: OLE2 support enabled.
Jan 8 16:03:12 mail clamd[1002]: PDF support enabled.
Jan 8 16:03:12 mail clamd[1002]: SWF support enabled.
Jan 8 16:03:12 mail clamd[1002]: HTML support enabled.
Jan 8 16:03:12 mail clamd[1002]: XMLDOCS support enabled.
Jan 8 16:03:12 mail clamd[1002]: HWP3 support enabled.
Jan 8 16:03:12 mail clamd[1002]: Self checking every 600 seconds.
Before full reboot I was trying this prodecure:
systemctl stop amavisd.service
systemctl stop clamd@amavisd.service
systemctl start amavisd.service
systemctl start clamd@amavisd.service
systemctl restart postfix
but all new mails stucked in queue.
the Only help was to disable scannig in /etc/amavisd/amavisd.conf :
@bypass_virus_checks_maps = (1); # controls running of anti-virus code
# @bypass_spam_checks_maps = (1); # controls running of anti-spam code
(hush removing)
and restart services again.
I have 4GB ram.
I found the article that we can increase time out when amavis starts in file:
/usr/lib/systemd/system/clamd@.service
add enrty:
timeout 180
(180 sek), but it was not helpul (when I was restaritng services).
Now it seams, that amavis first can't connect to clamav, but eventually it can connect. All is as before.