msys.commtouch.diagnose
Name
msys.commtouch.diagnose — Scan messages using Commtouch
Synopsis
msys.commtouch.diagnose(msg, accept, vctx);
msg: userdata, ec_message type, optional accept: userdata, accept_construct type, optional vctx: userdata, validate_context type, optional
Description
This function provides diagnosis of a message's virus or spam status. You must load and correctly configure the commtouch_ctasd module before using this function. This function can be invoked at the data, spool or each_rcpt phases. It will not work at the connect, ehlo, mailfrom or rcptto phases.
Warning
Do not use pcall
with this function.
msg
is the email to be scored; accept
is the accept_construct and vctx
is the validation context. If any of the inputs is not provided, it will be inferred from the current context. Use this function to scan mail. A table is returned with the following key/value pairs:
-
class
the spam classification of this message. Possible values are:Unknown
,Suspected
,Bulk
andSpam
. -
virus-threat
the virus classification of this message. Possible values are:non-virus
,medium
,high
andvirus
. -
ref-id
a reference ID returned by the commtouch engine.
The above name value pairs are also set within the validation context with each key being prefixed with commtouch-
.
Enable this function with the statement require('msys.commtouch');
.