xymon-mailack - permit acknowledging alerts via e-mail
xymon-mailack --env=FILENAME [--debug]
xymon-mailack normally runs as an input mail-filter for the xymon user, e.g. by being called from the xymon users' procmailrc(5) file. xymon-mailack recognizes e-mails that are replies to xymond_alert(8) mail alerts, and converts the reply mail into an acknowledge message that is sent to the Xymon system. This permits an administrator to acknowledge an alert via e-mail.
By default, an acknowledgment is valid for 1 hour. If you know in advance that solving the problem is going to take longer, you can change this by adding delay=DURATION to the subject of your mail reply or on a line in the reply message. Duration is in minutes, unless you add a trailing 'h' (for 'hours'), 'd' (for 'days') or 'w' (for 'weeks').
You can also include a message that will show up on the status-page together with the acknowledgment, e.g. to provide an explanation for the issue or some other information to the users. You can either put it at the end of the subject line as msg=Some random text, or you can just enter it in the e-mail as the first non-blank line of text in the mail (a "delay=N" line is ignored when looking for the message text).
The From: and Subject: headers are decoded before use: an RFC 2047 encoded-word (=?charset?B?...?= or =?charset?Q?...?=), how a mail client carries a non-ASCII name or subject, is decoded to its bytes, so an accented acknowledger name or message text shows as written on the status page. A fully encoded subject is decoded before the alert cookie is looked for, so such a reply is acknowledged rather than ignored. The decoded bytes are shown as they are, under the charset the web pages declare (HTMLCONTENTTYPE, UTF-8 by default); a reply in another charset is carried through but not converted. The message body is decoded for the cause: a base64 or quoted-printable transfer-encoding, and the first text/plain part of a multipart message, so the explanation shows even when the reply is encoded.
To setup xymon-mailack, create a .procmailrc file in the xymon-users home-directory with the following contents:
DEFAULT=$HOME/Mailbox LOGFILE=$HOME/procmail.log :0 | $HOME/server/bin/xymon-mailack --env=$HOME/server/etc/xymonserver.cfg
If you are using Qmail to deliver mail locally, you can run xymon-mailack directly from a .qmail file. Setup the xymon-users .qmail file like this:
| $HOME/server/bin/xymon-mailack --env=$HOME/server/etc/xymonserver.cfg
xymond_alert(8), xymond(8), xymon(7)