What it watches · 13 of 14
A monitor account signs in over SMTP, IMAP and JMAP, sends itself a test message and times the round trip, and watches the outgoing queue: mail checked the way people use it.
A port check says the mail server answers. It doesn't say mail gets through. The mail monitor uses a mailbox of its own, the way a person does, every five minutes:
- signs in over SMTP submission, IMAP and JMAP,
- reads the size of the server's outgoing queue,
- sends the account a test message and times how long it takes to arrive.
Messages that arrive are deleted, and so is anything in the mailbox over an hour old. The Mail page shows each round, and the Reports page the history.
It needs a mail server with JMAP, signed in through OAuth as webmail does, and JMAP's queue extension for the queue size: inbuxa has both. Without JMAP, only the sign-ins are checked.
Set it up
Make an account for the monitor. It needs the default user role, plus permission to query and read the outgoing queue. Register an OAuth client for it, and put its password in a file only obs-beacond can read:
mail:
account: monitor@example.org
password_file: /etc/obs-beacon/mail-monitor.password
server: mail.example.org
smtp: mail.example.org:587 # STARTTLS
imap: mail.example.org:993 # TLS
url: https://mail.example.org # JMAP
client_id: cairn-obs-monitor
redirect_url: https://obs.example.org/mail/callback # as registered with the client; never visited
host: mail1 # the host serving mail, so its maintenance window holds these
# every: 5m
# wait: 4m
What's judged
| What | Alert |
|---|---|
| A sign-in (SMTP, IMAP or JMAP) refused two rounds in a row | Critical |
The test message not arrived within wait (4 minutes) |
Warning; critical two rounds in a row |
The test message slower than round_trip_warn (1 minute) |
Warning |
queue_warn / queue_critical messages queued (50 / 500) |
Warning / critical |
| The queue can't be read two rounds in a row | Warning |
No round for three times every |
Warning |
Mail alerts group under the service map's mail service.
To check that your sending address isn't on a block list, add an rbl
check.