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.
list
Display 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
:reason
ACL3M: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).
info
Display 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:
RCVD
Receipt date and time.
PRXY
Proxy name.
QTAG
Reason tag (see above).
ACL1
SESSION-ACL decision criteria and result.
HELO
HELO/EHLO command argument and RFC check flags.
MAIL
MAIL FROM command argument and RFC check flags, mail size and domain (7bit vs. 8bit).
HDRS
Mail headers info, currently only Subject header (if present).
NODE
MIME node info (number, type, size, viruses).
VIRN
Virus name found in current MIME node.
ACL2
DELIVERY-ACL decision criteria and result: original recipient address and RFC check flags, new recipient address (copy-to or deliver-to), ACL name.
ACL3
MAIL-ACL name and set of DOC-ACL names.
RESP
Final recipient result (response returned by proxy to RCPT command or response received by proxy from the forwarder).
send
Send 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
tag
X-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.
remove
Remove selected e-mails from quarantine.
-q dir
Define 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 proxy
Restrict operation only to e-mails with proxy name
matching the
regexp pattern, or name (if the proxy
-q
option
is not used).
-i msgid
Restrict operation only to e-mails with MSGID
matching the
regexp pattern. msgid
-d +days
Restrict operation only to e-mails received earlier
than
ago.
days
-d -days
Restrict operation only to e-mails received later
than
ago.
days
-R recipient
Restrict operation only to e-mails with at least one
recipient matching the
regexp
pattern. recipient
-s +bytes
Restrict operation only to e-mails with size (in
bytes) greater than or equal to the
value.
bytes
-s -bytes
Restrict operation only to e-mails with size (in
bytes) less than or equal to the
value.
bytes
-S sender
Restrict operation only to e-mails with sender
matching the
regexp pattern. sender
-t tag
Restrict operation only to e-mails with reason-tag
matching the
regexp pattern. tag
-v
Generate more verbose output.