How to get X-Virus-ID from ecap_clamav to Squid error pages?

Asked by Yuri

How to get X-Virus ID from ecap_clamav to Squid using adaptation_meta directive?

I want to build custom access denied page with deny_info with virus information in squid.

Valuable advice would be helpful.

Question information

Language:
English Edit question
Status:
Expired
For:
eCAP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

Squid adaptation_meta is about supplying information to the adapter. You need to get information from the adapter.

eClamAV supplies libecap::metaVirusId (X-Virus-ID) to the host application via the eCAP "meta header" or "annotation" API.

You should consult Squid support for Squid-specific ways to extract and manipulate annotations, but I can point you to the %note and %adapt::<last_h logformat codes. I do not remember whether the latest Squid can already use logformat codes in error pages; if it has not been implemented yet, consider making it happen.

Revision history for this message
Yuri (yvoinov) said :
#2

An example will be desirable.

Completely no understand, how to pass log codes into custom error pages.

Probably, this is not implemented yet?

Revision history for this message
Alex Rousskov (rousskov) said :
#3

You are asking the right question, but you chance of getting an answer may increase if you ask it on Squid forums instead. This is about Squid features, not eCAP. %note and %adapt get information from many sources, not just eCAP. How Squid handles that info, including whether it can be used in Squid error pages, is a Squid-specific topic.

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.