Patch from John Horne.
Fixes bug 1078
negative response to an AUTH command, including (for example) an attempt to use
an undefined mechanism.
+.new
+.vitem &$av_failed$&
+.cindex "content scanning" "AV scanner failure"
+This variable is available when Exim is compiled with the content-scanning
+extension. It is set to &"0"& by default, but will be set to &"1"& if any
+problem occurs with the virus scanner (specified by &%av_scanner%&) during
+the ACL malware condition.
+.wen
+
.vitem &$body_linecount$&
.cindex "message body" "line count"
.cindex "body of message" "line count"
PP/04 Use .dylib instead of .so for dynamic library loading on MacOS.
+PP/05 Variable $av_failed, true if the AV scanner deferred.
+ Patch from John Horne.
+ Bugzilla 1078.
+
Exim version 4.76
-----------------
2. The SMTP transport's protocol option may now be set to "smtps", to
use SSL-on-connect outbound.
+ 3. New variable $av_failed, set true if the AV scanner deferred; ie, when
+ there is a problem talking to the AV scanner, or the AV scanner running.
+
Version 4.76
------------
{ "authenticated_id", vtype_stringptr, &authenticated_id },
{ "authenticated_sender",vtype_stringptr, &authenticated_sender },
{ "authentication_failed",vtype_int, &authentication_failed },
+#ifdef WITH_CONTENT_SCAN
+ { "av_failed", vtype_int, &av_failed },
+#endif
#ifdef EXPERIMENTAL_BRIGHTMAIL
{ "bmi_alt_location", vtype_stringptr, &bmi_alt_location },
{ "bmi_base64_tracker_verdict", vtype_stringptr, &bmi_base64_tracker_verdict },
uschar *auth_vars[AUTH_VARS];
int auto_thaw = 0;
#ifdef WITH_CONTENT_SCAN
+BOOL av_failed = FALSE;
uschar *av_scanner = US"sophie:/var/run/sophie"; /* AV scanner */
#endif
extern uschar *auth_vars[]; /* $authn variables */
extern int auto_thaw; /* Auto-thaw interval */
#ifdef WITH_CONTENT_SCAN
+extern BOOL av_failed; /* TRUE if the AV process failed */
extern uschar *av_scanner; /* AntiVirus scanner to use for the malware condition */
#endif
int malware(uschar **listptr) {
uschar scan_filename[1024];
BOOL fits;
+ int ret;
fits = string_format(scan_filename, sizeof(scan_filename),
CS"%s/scan/%s/%s.eml", spool_directory, message_id, message_id);
if (!fits)
{
+ av_failed = TRUE;
log_write(0, LOG_MAIN|LOG_PANIC,
"malware filename does not fit in buffer [malware()]");
return DEFER;
}
- return malware_internal(listptr, scan_filename, FALSE);
+ ret = malware_internal(listptr, scan_filename, FALSE);
+ if (ret == DEFER) av_failed = TRUE;
+
+ return ret;
}