| Version | 1.0.0 |
|---|---|
| Released | 2026-08-13 |
| Author | GENSoftware |
| Licence | Mixed License |
| Version | 1.0.0 |
|---|---|
| Released | 2026-08-13 |
| Author | GENSoftware |
| Licence | Mixed License |
Overview
SMSd is a daemon that puts an SMS gateway behind a simple interface. It holds the session to a Portech SIM server, sends queued messages, collects what arrives, and tracks each message through to a delivery confirmation from the network — so an application can send a text with one HTTP call and never deal with modem commands.
REST API
Two endpoints, authenticated with an X-Auth-Token header on a listener that binds to localhost by default.
POST /send {"to":"07890123456","message":"..."}
GET /healthA submitted message is queued rather than sent inline, so the call returns immediately and the daemon handles retries, rate limiting and the modem session on its own schedule.
Delivery Reports
With status reports enabled, SMSd requests a delivery receipt for every message and follows it through to its outcome, recording each one as delivered or undelivered rather than simply sent. The validity period is configurable, so the network keeps retrying a handset that is switched off or out of coverage for as long as you specify rather than giving up in minutes.
Receiving
Incoming messages are collected from the gateway and delivered by email through a configurable command — GENMail or sendmail, whichever suits the host. Concatenated messages are held until every part has arrived and reassembled before delivery, with a timeout so a permanently missing part does not lose what did arrive. Numbers are normalised to international form, so the same handset always presents consistently.
Operation
State lives in a spool directory as files, with every state change made by an atomic rename, so an interrupted daemon leaves no half-written or ambiguous messages behind. Rate limiting, retry counts, retry intervals and retention are all configurable, and completed messages are pruned automatically. A hardened systemd unit is supplied, running the daemon as its own user with a restricted filesystem and network profile.
Requirements
A Portech SIM gateway reachable over the network, and one or two SIM modules per unit. Configuration is a single plain key = value file; an unrecognised key is a startup error rather than a silent default, so a typo stops the daemon instead of quietly changing its behaviour.