postal icon indicating copy to clipboard operation
postal copied to clipboard

ClamAV setup instructions

Open mohan-nishit opened this issue 9 years ago • 6 comments

While I know that this is a milestone for v1.0, a basic instruction set for enabling ClamAV scans would be helpful.

For instance, I have been able to get ClamAV up and running on the server, but cannot fathom how to get postal to connect to it. I added the following to my postal.yml file:

clamav:
  enabled: true
  host: 127.0.0.1
  port: 2000

I've tried searching for existing issues that can help, or ClamAV docs, but to no avail. FYI, I can run clamdscan on the server normally, and clamd.conf has TCPSocket 2000 and TCPAddr 127.0.0.1 added.

mohan-nishit avatar Nov 21 '17 07:11 mohan-nishit

What makes you think its not working?

We don't run clamav on our setup but it looks like Postal only tells you when a message is a threat and doesn't confirm that a message is clean.

willpower232 avatar Nov 21 '17 09:11 willpower232

I tried sending the Eicar test string in an email, and it had no additional threat headers added to the email.

On Tue, 21 Nov 2017 at 3:05 PM Will Power [email protected] wrote:

What makes you think its not working?

We don't run clamav on our setup but it looks like Postal only tells you when a message is a threat and doesn't confirm that a message is clean.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/atech/postal/issues/410#issuecomment-345969103, or mute the thread https://github.com/notifications/unsubscribe-auth/AIjAb5RoNhXdXf9oigJ9S9XFnjh_CewCks5s4plagaJpZM4Qla0g .

mohan-nishit avatar Nov 22 '17 08:11 mohan-nishit

did you send the test string as the contents of the email or as an attachment?

willpower232 avatar Nov 22 '17 09:11 willpower232

As the plain text body. Gmail refused to accept the email as it recognised the eicar string within the email.

On Wed, 22 Nov 2017 at 2:40 PM Will Power [email protected] wrote:

did you send the test string as the contents of the email or as an attachment?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/atech/postal/issues/410#issuecomment-346288165, or mute the thread https://github.com/notifications/unsubscribe-auth/AIjAb7sLLKwjrVgPOtBnRmV8pvlZu4l_ks5s4-T7gaJpZM4Qla0g .

mohan-nishit avatar Nov 23 '17 06:11 mohan-nishit

Interesting, I wouldn't have thought that the contents of an email message body could be executable and therefore a threat but obviously Google knows everything.

This suggests that clamav is capable of warning if the EICAR file is attached to an email so could you test the file as an attachment and see if there is any difference?

willpower232 avatar Nov 23 '17 09:11 willpower232

Check your /var/log/clamav/clamav.log Is there any mention about found treat?

Have you configured your clamd.conf?

  • TCPSocket 2000
  • TCPAddr 127.0.0.1

You can download a test eicar file from the official site to your home directory by wget and check it with clamav: telnet 127.0.0.1 2000 SCAN /home/path/to/test/file

Please tell about the result.

igerzog avatar Dec 12 '17 13:12 igerzog