Skip to content

RTFM · Healthchecks

lb.saphira.pop3: will it answer the door?

The oldest mail retrieval protocol gets the simplest check: connect, read the +OK greeting, leave. No login, no mailbox touched; just proof that the POP3 state machine is alive.

Saphira Linux dragon mascot

What it proves

A valid POP3 greeting (+OK) on real:$4. Authentication is never attempted and no session state is created. Combined with its timeout discipline it catches both dead services and the accept-then-silence failure mode.

How it works

The whole check
exec curl --silent --max-time "$LB_TIMEOUT" "pop3://${LB_REAL}:${PORT}/" >/dev/null

Configuration

Knobs
VariableDefaultMeaning
LB_SAPHIRA_TIMEOUT3Session deadline
(target port)$4, else 110995 (implicit TLS) exercises the TLS handshake too

Wiring it up

ldirectord
# ldirectord.cf
virtual = 203.0.113.10:110
    protocol = tcp
    scheduler = wlc
    real = 192.168.20.25:110 gate 1
    checktype = external
    checkcommand = "/var/lib/lb/saphira/lb.saphira.pop3"

Run it by hand

Manual run
/var/lib/lb/saphira/lb.saphira.pop3 mail-pool 110 192.168.20.25 110
echo $?
# 0 = +OK greeting received
# 1 = no greeting or stalled session

Failure modes

  • No +OK: the service answered with something that is not POP3, or not at all
  • Timeout: accepted and silent: wedged backend, exhausted workers

Did we miss something?

If this page left something unanswered, found an error, or there is another subject you would like documented, tell us. Saphira’s documentation grows from real problems people need to solve.

Send feedback or request a new section →

Prefer not to do it yourself?

Everything needed to do the work yourself is documented here and remains free; we charge for human time, not for withholding knowledge. Sometimes the missing resource is simply time. The same people who build Saphira can provide paid professional help with implementation, migration, troubleshooting and administration.

Ask about professional support →