Offline publishing
Offline payloads let people send email through RelaySMS Mail without linking an account; linked accounts need none of this (settings). The app encrypts an offline payload to the server’s identity key, and the Publisher publishes it through the rmail adapter, which must be installed. Anyone who can reach an allowed protocol can send one.
Each payload is tagged with the protocol it arrived on:
-
https: RESTPOST /v1/publications -
smtp: the SMTP transport -
An offline payload from a protocol not in
OFFLINE_PUBLISH_ALLOWED_PROTOCOLSis discarded. -
An offline payload over
httpsmust carryOFFLINE_PUBLISH_SHARED_SECRETin the request’stagfield, or it’s discarded. -
Leaving
OFFLINE_PUBLISH_ALLOWED_PROTOCOLSempty, or listinghttps, without the secret failsmanage.sh check, and the services refuse to start. -
A discarded payload is logged and recorded as
failedin the publication stats, with reasonprotocol_not_allowed,offline_tag_missingoroffline_tag_invalid.POST /v1/publicationsstill returns success, since the check runs in the queue.
Allowing https
-
Generate a secret:
openssl rand -hex 32 -
Set
OFFLINE_PUBLISH_SHARED_SECRETto it, and addhttpstoOFFLINE_PUBLISH_ALLOWED_PROTOCOLS, such assmtp,https. -
Check and restart:
sudo ./manage.sh check sudo ./manage.sh restart
Next steps
Connect each relay that posts over https with the secret as its tag (FORWARD_TAG for Twilio).