Mailcow-dockerized: ClamAV stays enabled in rspamd config

Created on 11 Aug 2019  Â·  9Comments  Â·  Source: mailcow/mailcow-dockerized

Even if user disables ClamAV when installing mailcow, in the antivirus.conf file of rspamd the ClamAV stays enabled, I think this slows down mail sending time because when I removed ClamAV from the file the mail sending time went from 10s to 2s. The verbose postfix logs indicate that rspamd was taking around 7 seconds and the rspamd logs were indicating it was caused by ClamAV even if I disabled ClamAV when installing mailcow.

Further information (where applicable):

  • CentOS 7
  • 2GB Ram, 2 core CPU
  • No changes to code.

Most helpful comment

Whether an upstream is down or not is only cached for 10 seconds (https://github.com/rspamd/rspamd/blob/24f973e828f0aa313ea8a8fd8f04478db9e0ea9a/src/libutil/upstream.c#L140). Since you don't receive a lot of messages, you won't see that the state is cached. 10 seconds seems a good compromise between server load and not letting too many messages pass unchecked when e.g. clamav is being restarted, so I advise against changing that in general. However, you can certainly disable clamav entirely in your local copy of antivirus.conf.

All 9 comments

Rspamd remembers the upstream as down.

Am 11.08.2019 um 23:04 schrieb SnakePin notifications@github.com:

Even if user disables ClamAV when installing mailcow, in the antivirus.conf file of rspamd the ClamAV stays enabled, I think this slows down mail sending time because when I removed ClamAV from the file the mail sending time went from 10s to 2s. The verbose postfix logs indicate that rspamd was taking around 7 seconds and the rspamd logs were indicating it was caused by ClamAV even if I disabled ClamAV when installing mailcow.

Further information (where applicable):

CentOS 7
2GB Ram, 2 core CPU
No changes to code.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Oh damn, for some reason postfix gets stuck on milter for 10 seconds, I will send logs when I get home

I will also try to reproduce it. :)

@SnakePin did you fix your problem?

Nope it still takes 10 seconds to send mail when ClamAV is in configs but I see this in logs when ClamAV is not removed 2019-09-04 12:40:34 #22(normal) <12bcc2>; lua; clamav.lua:119: clamav: failed to scan, maximum retransmits exceed

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Same here, Rspamd doesn't seem to remember that ClamAV is down since it tries to transmit every received email.
rspamd

Whether an upstream is down or not is only cached for 10 seconds (https://github.com/rspamd/rspamd/blob/24f973e828f0aa313ea8a8fd8f04478db9e0ea9a/src/libutil/upstream.c#L140). Since you don't receive a lot of messages, you won't see that the state is cached. 10 seconds seems a good compromise between server load and not letting too many messages pass unchecked when e.g. clamav is being restarted, so I advise against changing that in general. However, you can certainly disable clamav entirely in your local copy of antivirus.conf.

Funny idea: spawn a simple tcp server to emulate a ClamAV pass when ClamAV is disabled by config.

Note: I don't want to remove the file if skip_clamd is set to y. I often use dedicated scanners and deleting the file is contra productive for my setups.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bonanza123 picture bonanza123  Â·  3Comments

zkryakgul picture zkryakgul  Â·  3Comments

Adorfer picture Adorfer  Â·  3Comments

starcraft0429 picture starcraft0429  Â·  3Comments

RogerSik picture RogerSik  Â·  3Comments