[exim-dev] [Bug 1078] New: Detect if the 'av_scanner' has ru…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: John Horne
Ημερομηνία:  
Προς: exim-dev
Καινούρια Θέματα: [exim-dev] [Bug 1078] Detect if the 'av_scanner' has run or not., [exim-dev] [Bug 1078] Detect if the 'av_scanner' has run or not.
Αντικείμενο: [exim-dev] [Bug 1078] New: Detect if the 'av_scanner' has run or not.
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1078
           Summary: Detect if the 'av_scanner' has run or not.
           Product: Exim
           Version: 4.74
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: wishlist
          Priority: medium
         Component: Content Scanning
        AssignedTo: tom@???
        ReportedBy: john.horne@???
                CC: exim-dev@???



Created an attachment (id=452)
--> (http://bugs.exim.org/attachment.cgi?id=452)
Patch for new malware variable av_failed

The current 'malware' condition returns a DEFER if there is a problem with the
scanner at all. However, the user cannot detect this unless they use the
condition with an 'accept' or 'deny' ACL verb. I want to use:

warn malware = *

and then process the result of whether malware was found or not, and whether to
deliver it or not depending on other conditions (recipients).

At present this is not possible. I have attached a patch which creates a new
variable - 'av_failed' - which is 0 by default, but gets set to 1 if the
'malware' condition returns a DEFER for any reason. Using this I can now do
things such as:

=========================================================
   warn  malware = *
         # Check if AV has actually run.
         condition = ${if == {$av_failed} {0} }
         log_message = LOGGING: Running malware check on message: $malware_name


   # AV has not run.
   defer condition = ${if == {$av_failed} {1} }
         log_message = LOGGING: ClamAV message deferred.
=========================================================



The patch has been created against Exim 4.74, and been tested on live systems
(under 4.73).


John.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email