stdevPavelmc / mailad

Software to provision a mail server with users from a Windows or Samba 4 Active Directory
GNU General Public License v3.0
33 stars 11 forks source link

[BUG] ClamAV checks fails behind a proxy #151

Closed Joe1962 closed 2 years ago

Joe1962 commented 2 years ago

Describe the bug When behind a corporate proxy, the command at line 150 in scripts/test_localhost.sh:

dig +short TXT current.cvd.clamav.net

will fail with an error and request to set ENABLE_AV=no. Also, it is fixed to current.cvd.clamav.net, when it should probably take into acount the value of USE_AV_ALTERNATE_MIRROR and AV_ALT_MIRRORS.

To Reproduce Steps to reproduce the behavior:

  1. Set PROXY variables.
  2. Run make conf-check.
  3. You will see an error message regarding DNS failure and be asked to set ENABLE_AV=no.
  4. The script exits.

Expected behavior Use another method to check this, or, on failure, ask if it should simply continue or not.

stdevPavelmc commented 2 years ago

Taking a peek on this issue, I have some concerns about it.

If this is true just ignoring the DNS query when a AV_PROXY var is set will do the trick.

stdevPavelmc commented 2 years ago

Then, this is related with #150, related not dependent.

stdevPavelmc commented 2 years ago

150 must be fixed first to take this to the workbench.

Joe1962 commented 2 years ago
  • Using freshclam you can "bruteforce" the updates and the DNS query may not be "needed" (not tested). I think even freshclam uses DNS to check if the mirror is up to date.

When I manually configure freshclam to use our local mirror, it updates correctly, even though the only DNS record for the mirror is an A record.

stdevPavelmc commented 2 years ago

Issue re-opened, fix passed on my env, but has wrong presuptions... fixing that.