ClamAV reporting? #4695
-
|
Hey, just by incident I saw this entry in my logs: have anybody seen this? I clamAV docs I could not find any. How to test if Clamav is working at all? I do send test EICAR virus mail, but it passed trough. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
This is for
Postfix will store these in
You should be able to use System accountsI know that Postmaster aliasBy default during container init DMS will also setup a local alias for
That postmaster address if you're not familiar, is generally for other services or MTAs to contact the DMS admin about any issues with mail. It would likewise deliver mail to In our docs "Usage" guide, we have explicit advice to setup a postmaster virtual alias ( We also have a FAQ entry that similarly suggests adding a Advised solutionYou generally don't need to mess with
This will alias Then ensure you also have the virtual alias for |
Beta Was this translation helpful? Give feedback.
-
|
This reply addresses the specific error you encountered and reproduces the problem identified. DMS could introduce a breaking change (unlikely to be part of DMS v16) to better resolve that, but configuring an alias such that mail is sent to your
Regarding this part of the error specifically, it sounds like Typically all mail is handled by Dovecot usually as the only writer to Cron task + mail sending behaviourAFAIK this mail would be from the cron task configured to run # The DMS `Dockerfile` creates the scheduled task like so:
echo '0 */6 * * * clamav /usr/bin/freshclam --quiet' >/etc/cron.d/clamav-freshclam
Additional Resources:
So we're still using Vixie cron, and as the manpages linked note:
Vixie cron also is compiled to use Reproduction$ docker run --rm -itd --name dms-test --hostname mail.example.test -v ./mail:/var/mail mailserver/docker-mailserver:15.1
# Shell into the container and add an account to complete setup:
$ docker exec -it dms-test bash
$ setup email add hello@example.test secret
# Wait a bit for setup to complete (5-10s), then test sendmail (from `root` to `clamav`)
$ echo "Testing delivery" | sendmail clamav
$ ls -la /var/mail
total 20
drwxrwsr-x 1 docker docker 4096 Apr 23 02:01 .
drwxr-xr-x 1 root root 4096 Aug 12 2025 ..
-rw------- 1 clamav docker 420 Apr 23 02:01 clamav
drwxr-sr-x 3 docker docker 4096 Apr 23 01:56 example.testNOTE: If the $ ls -la /var/mail
total 20
drwxr-xr-x 3 docker docker 4096 Apr 23 02:03 .
drwxr-xr-x 1 root root 4096 Aug 12 2025 ..
-rw------- 1 clamav clamav 420 Apr 23 02:03 clamav
drwxr-xr-x 3 docker docker 4096 Apr 23 02:03 example.testError caused by ownership changeWhen the container is recreated (to run the container setup scripts again, which in this example will require adding the account again due to no persistence), ownership of both UID and GID for that $ ls -l /var/mail
total 8
-rw------- 1 docker docker 420 Apr 23 02:11 clamav
drwxr-xr-x 3 docker docker 4096 Apr 23 02:03 example.testThat is due to this logic (which is being revised for DMS v16): docker-mailserver/target/scripts/helpers/utils.sh Lines 75 to 81 in e532b37 It is this specific change in ownership that causes the error log you've shared. You can attempt the This isn't something we've accounted for as Technically we could use Another potential option is better integration with Dovecot, which has it's own UserDB that I think can be associated with I'm tempted to enforce configuration of |
Beta Was this translation helpful? Give feedback.
This is for
postfix/local, it is trying to send to internal accountmail.sitnikov.eu(hostname/ DMS FQDN), which is used for internal mail sent from services running in DMS.myoriginwhich defaults tomyhostname), so in your case the mail probably was sent toclamav(no@<domain-part>).mydestinationconfigured in DMS (unless you've opt-ed out of ourmydestination, then delivery would likely fail instead), which looks at the local-part (clamav) and…