Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With ClamAV disabled, ***UNCHECKED*** is added to all titles #378

Closed
jgillich opened this issue Nov 11, 2016 · 8 comments
Closed

With ClamAV disabled, ***UNCHECKED*** is added to all titles #378

jgillich opened this issue Nov 11, 2016 · 8 comments
Assignees

Comments

@jgillich
Copy link

Apparently 512MB RAM aren't enough, so I disabled ClamAV to save memory by setting DISABLE_CLAMAV=1. Now ***UNCHECKED*** is added to all titles. It would be nice if this behavior could be turned off automatically; from what I've found this is probably done by amavis.

@tomav
Copy link
Contributor

tomav commented Nov 21, 2016

@jgillich would you like to contribute with a patch for this enhancement?

@jgillich
Copy link
Author

Yes, but I'm not sure when I'll get to it.

@marcinkoziej
Copy link

marcinkoziej commented Dec 8, 2016

It seems that clamav-scan is being run nevertheless. I'm not sure about the solution, but what I did is I've added config/amavis.cf file with:

use strict;
@bypass_virus_checks_maps = ();
$undecipherable_subject_tag = undef;
1;

This is copied to /etc/amavis/conf.d/50-user by container start script.

@dbellavista
Copy link
Contributor

dbellavista commented Dec 25, 2016

mail     | Dec 25 00:21:35 mail amavis[955]: (00955-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:36 mail amavis[955]: (00955-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:36 mail amavis[955]: (00955-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
mail     | Dec 25 00:21:37 mail amavis[956]: (00956-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:38 mail amavis[956]: (00956-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:38 mail amavis[956]: (00956-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
mail     | Dec 25 00:21:42 mail amavis[955]: (00955-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:42 mail amavis[955]: (00955-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 136) line 603.\n
mail     | Dec 25 00:21:44 mail amavis[956]: (00956-01) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:44 mail amavis[956]: (00956-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 136) line 603.\n
mail     | Dec 25 00:21:52 mail amavis[955]: (00955-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:53 mail amavis[955]: (00955-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:53 mail amavis[955]: (00955-02) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
mail     | Dec 25 00:21:59 mail amavis[955]: (00955-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:21:59 mail amavis[955]: (00955-02) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 136) line 603.\n
mail     | Dec 25 00:22:09 mail amavis[956]: (00956-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:22:10 mail amavis[956]: (00956-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:22:10 mail amavis[956]: (00956-02) (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2)
mail     | Dec 25 00:22:16 mail amavis[956]: (00956-02) (!)connect to /var/run/clamav/clamd.ctl failed, attempt #1: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory
mail     | Dec 25 00:22:16 mail amavis[956]: (00956-02) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (All attempts (1) failed connecting to /var/run/clamav/clamd.ctl) at (eval 136) line 603.\n

This log is from 2-3 SMTP connections trying to send email with attachments. I used the environment variable DISABLE_CLAMAV=1 however amavis still tries to perform the scan.

As you can see, the are at least 30 seconds between the initial request and the "giving up".

@tomav tomav self-assigned this Dec 25, 2016
@tomav
Copy link
Contributor

tomav commented Dec 25, 2016

I'm gonna push a fix. You'll let me know.

@tomav
Copy link
Contributor

tomav commented Dec 25, 2016

Implemented @lolownia suggestion.

@tomav
Copy link
Contributor

tomav commented Dec 25, 2016

Image is being built.

@tomav
Copy link
Contributor

tomav commented Dec 25, 2016

You can now docker pull tvial/docker-mailserver:v2.
There are 2 things to check:

  • no more presence of (!)connect to /var/run/clamav/clamd.ctl failed in the logs (tested)
  • UNCHECKED should disappear (not fully tested)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants