quarc.sh — mail quarantine control tool
quarc.sh [command] [options]tag
Utility quarc.sh provides a user interface to the Kernun smtp-proxy(8) quarantine management operations.
listDisplay short info about each selected e-mail in quarantine.
The first line of each e-mail's block contains: MSGID, the e-mail's size, date and time of receipt and the sender.
The second line contains the number of recipients and the first recipient.
The third line contains reason-tags
describing the reasons why the e-mail has been put into the quarantine.
These tags have form of
,
e.g. couple type:reasonACL3M:virus-xy means
that the e-mail was sent to the quarantine by the mail-acl named
virus-xy.
The fourth line contains the e-mail's Subject (if any).
infoDisplay full info about each selected e-mail in quarantine.
In fact, this info is the full content of the e-mail's quarantine
control file. The lines that begin with letter 'C'
contain verbatim command lines used by the client. The lines
that begin with letter 'I' contain internal info;
the next keyword at the line specifies the type of information:
RCVDReceipt date and time.
PRXYProxy name.
QTAGReason tag (see above).
ACL1SESSION-ACL decision criteria and result.
HELOHELO/EHLO command argument and RFC check flags.
MAILMAIL FROM command argument and RFC check flags, mail size and domain (7bit vs. 8bit).
HDRSMail headers info, currently only Subject header (if present).
NODEMIME node info (number, type, size, viruses).
VIRNVirus name found in current MIME node.
ACL2DELIVERY-ACL decision criteria and result: original recipient address and RFC check flags, new recipient address (copy-to or deliver-to), ACL name.
ACL3MAIL-ACL name and set of DOC-ACL names.
RESPFinal recipient result (response returned by proxy to RCPT command or response received by proxy from the forwarder).
sendSend selected e-mails from quarantine to the smtp-proxy
given
by the proxy-p option.
In this case, the proxy must be specified as
a string (not regexp)
and the -q option must not be used.
If the proxy does not listen on "quarantine" port (see
proxy-level quarantine directive in
smtp-proxy(5)
manual page), the operation fails. If the proxy listens on the proper
port, e-mails from quarantine can be distinguished using the
from-quarantine item in level 3 ACLs.
The
argument can specify the content of the e-mail's header line
tagX-Kernun-Quarantine-Tag that is
added to the beginning of the e-mail. The value of this tag can
be matched against the value of the
from-quarantine item in level 3 ACLs.
removeRemove selected e-mails from quarantine.
-q dirDefine quarantine directory.
If used, the -p option can be omitted and
the tool will operate on all e-mails regardless the proxy name.
In this mode, the send operation is not
allowed.
If not used, the -p option must define
the proxy name (not regexp).
-p proxyRestrict operation only to e-mails with proxy name
matching the
regexp pattern, or name (if the proxy-q option
is not used).
-i msgidRestrict operation only to e-mails with MSGID
matching the
regexp pattern. msgid
-d +daysRestrict operation only to e-mails received earlier
than ago.
days
-d -daysRestrict operation only to e-mails received later
than ago.
days
-R recipientRestrict operation only to e-mails with at least one
recipient matching the
regexp
pattern. recipient
-s +bytesRestrict operation only to e-mails with size (in
bytes) greater than or equal to the
value.
bytes
-s -bytesRestrict operation only to e-mails with size (in
bytes) less than or equal to the
value.
bytes
-S senderRestrict operation only to e-mails with sender
matching the
regexp pattern. sender
-t tagRestrict operation only to e-mails with reason-tag
matching the
regexp pattern. tag
-vGenerate more verbose output.