Skip to content

Migrate from a self-hosted Postal

The FrontEngine send API follows the contract of the Postal API: the same paths, the same authentication header, the same fields and the same answer format. Webhooks use the same format and the same signature scheme. In most cases, migrating means changing the base URL, the key and DNS.

What changes in your application

Item On your Postal On FrontEngine
API base URL https://postal.yourdomain.com https://api.frontengine.net
Key API credential of your Postal server server key on FrontEngine
SMTP host your Postal's smtp-out.frontengine.net
Webhook public key your installation's the one published at https://api.frontengine.net/.well-known/jwks.json
DNS records your installation's FrontEngine's

Postal client libraries that let you configure the base URL work with FrontEngine for sending.

What is compatible

API

Postal contract Status
Authentication with the X-Server-API-Key header Same
POST /api/v1/send/message with to, cc, bcc, from, sender, reply_to, subject, plain_body, html_body, tag, headers, attachments[{name, content_type, data}] Same
POST /api/v1/send/raw with mail_from, rcpt_to[] and data in Base64 Same
Limit of 50 addresses in each of to, cc and bcc Same
Parameters in a JSON body or in the params form field Same
Answer always HTTP 200, with {status, time, flags, data} Same, with one exception described below
Send result {message_id, messages: {recipient: {id, token}}} Same
Error codes AccessDenied, InvalidServerAPIKey, ServerSuspended, NoRecipients, NoContent, TooManyToAddresses, TooManyCCAddresses, TooManyBCCAddresses, FromAddressMissing, UnauthenticatedFromAddress, AttachmentMissingName, AttachmentMissingData, MessageNotFound Same

SMTP

Postal contract Status
AUTH PLAIN and AUTH LOGIN, with the key as the password and the username ignored Same
X-Postal-Tag header for the tag Same
X-AMP: skip header to turn tracking off for the message Same

Webhooks

Postal contract Status
Body {event, timestamp, payload, uuid} Same
Events MessageSent, MessageDelayed, MessageDeliveryFailed, MessageHeld, MessageBounced, MessageLoaded, MessageLinkClicked, DomainDNSError, SendLimitApproaching, SendLimitExceeded Same
RSA PKCS#1 v1.5 signature over the body, in X-Postal-Signature (SHA-1) and X-Postal-Signature-256 (SHA-256), with X-Postal-Signature-KID Same
Public key at /.well-known/jwks.json Same. The URL is https://api.frontengine.net/.well-known/jwks.json
6 attempts, with retries after 2, 3, 6, 10 and 15 minutes Same
Any 2xx is success. Timeout of 5 seconds Same

Other behavior

Postal contract Status
Tracking: URL shapes, 307 redirect, open image, excluded domains, +notrack Same
Custom return path through a CNAME on your domain Same in how it works. On FrontEngine the name is frp.<domain>
Suppression: holding the suppressed recipient, adding after a repeated permanent failure or exhausted retries, expiry Same
Inbound routes to an HTTP endpoint, in the Hash and RawMessage formats, as JSON or form Same

What differs

In the API

Difference Detail
A temporary failure answers HTTP 503 Postal has no such case. When FrontEngine cannot accept the message because of a passing problem, it answers 503 with the code TemporaryFailure. Treat any code other than 200 as "try again"
MessageRejected code Permanent refusals Postal has no name for, such as a message above the maximum size, arrive with this code and the reason in message
Repeated recipient An address repeated across to, cc and bcc produces a single copy. On Postal it would be two
bounce parameter It is ignored
messages/message The status, details, headers and raw_message expansions work. plain_body, html_body, attachments, inspection and activity_entries come back null
messages/deliveries Returns only the last delivery attempt, not the full history
Numbering The message id follows the server's sequence on FrontEngine. It does not continue your Postal's numbering

In SMTP

Difference Detail
CRAM-MD5 Not accepted. Before migrating, check your Postal logs for any client authenticating with CRAM-MD5 and change it to PLAIN or LOGIN
IP credentials (SMTP-IP) They do not exist. Every client must authenticate with the key
SMTP reply texts The numeric codes correspond, but the texts are FrontEngine's. Do not depend on the reply text
TLS Required to authenticate

In webhooks

Difference Detail
Signing key The key is FrontEngine's, not your installation's. If your receiver has the old public key fixed in code, replace it with the one published at https://api.frontengine.net/.well-known/jwks.json
ip_address in MessageLoaded and MessageLinkClicked Not reliable as the reader's address
Hold by send limit A copy held by the server's send limit produces no MessageHeld. The SendLimitApproaching and SendLimitExceeded events are sent
Private network destinations The webhook URL must resolve to a public address. Redirects are not followed

In inbound

Difference Detail
Route modes endpoint, accept and reject exist. Postal's Hold and Bounce modes do not
SMTP and address endpoints They do not exist. HTTP endpoints only
4xx answer from the endpoint The original sender does not receive a failure notice
spam_status and received_with_ssl Always NotSpam and false

In operation

On your Postal On FrontEngine
Web interface for servers, domains, credentials, webhooks and messages There is no customer panel. Configuration is done by our team, on request, at [email protected]
Server development mode Not applied
IP pool rules by sender or recipient They do not exist
Message history Not imported
You operate servers, IPs, reputation and blocklists The sending infrastructure is operated by Intesys

Step by step

  1. Take stock of what exists on your Postal: servers, credentials in use, domains, webhooks, tracking domains, routes and the suppression list.
  2. Ask for activation and send that inventory to [email protected]. We create the servers, link the domains and configure webhooks, tracking and routes.
  3. Publish the FrontEngine DNS records next to the current ones: verification TXT, DKIM key, include in SPF and the return path CNAME. See Set up a sending domain.
  4. Update the webhook receiver to accept the key published at https://api.frontengine.net/.well-known/jwks.json. During the transition, accept both keys, choosing by X-Postal-Signature-KID.
  5. Change the base URL and the key in a test environment and send.
  6. Move traffic gradually, from the lowest-risk flow to the most critical. See Deliverability practices.
  7. Point the tracking domains and the MX at FrontEngine once sending has been migrated.
  8. Shut Postal down after its queue empties and the old tracking links are no longer needed.

Tracking links already sent

The links of messages sent by your Postal point at the old tracking domain and depend on its database. When you move the tracking CNAME to FrontEngine, those old links stop redirecting. If that matters, use a new tracking name on FrontEngine and keep the old one on Postal for a while.

Return path

The return path prefix depends on your Postal's configuration. On FrontEngine it is frp: publish the CNAME frp.<domain> pointing at rp.frontengine.net. If your Postal already uses that same prefix, change the record's target at cutover.

Example of the change in one call:

curl -sS https://postal.yourdomain.com/api/v1/send/message \
  -H "X-Server-API-Key: $POSTAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from": "[email protected]", "to": ["[email protected]"], "subject": "Test", "plain_body": "Test"}'
curl -sS https://api.frontengine.net/api/v1/send/message \
  -H "X-Server-API-Key: $FRONTENGINE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from": "[email protected]", "to": ["[email protected]"], "subject": "Test", "plain_body": "Test"}'

Next steps