SYNTH MAIL

Security

TLS

Passwords

Password guessing protection

One counter for every place a password is checked: SMTP AUTH, IMAP LOGIN, the web login and password change.

Limits are set with the LOGIN_GUARD_* variables (Configuration).

Incoming mail

Outgoing mail

Metrics

/actuator/prometheus and /actuator/metrics answer only with Authorization: Bearer <METRICS_TOKEN>; without METRICS_TOKEN they are closed. /actuator/health is open.

MetricWhat
mail.queue.pendingmessages waiting to go out
mail.queue.oldest.secondsage of the oldest one
mail.delivery{outcome}delivery attempts: delivered, retry, failed
mail.login.failureswrong passwords (SMTP, IMAP, web)
mail.login.blocks{kind}blocks: ip, mailbox
mail.tls.certificate.expiryseconds until the certificate ends
mail.tls.certificate.selfsigned1 while a self-signed certificate is used

An alert worth having — the certificate is renewed 30 days before its end, so less than 20 days means renewal is broken:

- alert: MailCertificateExpiresSoon
  expr: mail_tls_certificate_expiry_seconds < 20 * 86400 or mail_tls_certificate_selfsigned == 1
  for: 1h