Inbound email to HTTP endpoints¶
FrontEngine receives email addressed to your domain and hands it to your application with an HTTP POST. Use it for customer replies to notifications, tickets opened by email and any flow where a received message triggers an action in your system.
Overview¶
- The MX of your domain (or of a subdomain) points at FrontEngine.
- A route says which address is accepted and what to do with the message.
- The message is stored and FrontEngine makes a signed
POSTto your endpoint, one request per recipient.
Routes and endpoints are configured by our team. Ask at [email protected], naming the server, the domain, the addresses and the destination URL.
Set up the MX¶
Create the MX record for the domain that will receive:
| Type | Name | Value | Priority |
|---|---|---|---|
| MX | replies.yourdomain.com | smtp-in.frontengine.net | 10 |
Prefer a subdomain
The MX decides where all email for a name goes. If your main domain already receives email at another service (company mailboxes), do not change its MX. Use a dedicated subdomain, such as replies.yourdomain.com, and ask for it to be linked to your server.
The domain must be linked to the server, the same way a sending domain is. See Set up a sending domain.
Routes¶
A route is an address on a domain linked to the server.
| Route address | Accepts |
|---|---|
[email protected] | That address only |
*@replies.yourdomain.com | Any other address of the domain without a route of its own |
Each route has a mode:
| Mode | Behavior |
|---|---|
endpoint | Stores the message and makes the POST to the HTTP endpoint |
accept | Accepts and stores the message, with no POST |
reject | Refuses the recipient in the SMTP conversation with 550 |
Endpoint¶
| Setting | Options | Default |
|---|---|---|
| URL | http:// or https://, on a public address | |
| Encoding | BodyAsJSON (JSON body) or FormData (form fields) | BodyAsJSON |
| Format | Hash (message already parsed) or RawMessage (original message in Base64) | Hash |
| Strip reply quotes | Separates the new text from the quoted text in the text part | off |
| Include attachments | Sends the attachments in the POST body | on |
| Timeout | From 1 to 60 seconds | 5 seconds |
Always use https://. The URL must resolve to a public address: destinations on private or local networks are refused, and redirects are not followed.
POST format¶
Hash format¶
{
"id": 2051,
"rcpt_to": "[email protected]",
"mail_from": "[email protected]",
"token": "kLmN9012",
"subject": "Re: Your order is confirmed",
"message_id": "[email protected]",
"timestamp": 1764331200.0,
"size": "4821",
"spam_status": "NotSpam",
"bounce": false,
"received_with_ssl": false,
"to": "[email protected]",
"cc": null,
"from": "Customer <[email protected]>",
"date": "Fri, 28 Nov 2026 10:00:00 -0300",
"in_reply_to": "[email protected]",
"references": "[email protected]",
"html_body": null,
"plain_body": "I need to change the delivery address.",
"attachment_quantity": 1,
"auto_submitted": null,
"reply_to": null,
"attachments": [
{
"filename": "receipt.pdf",
"content_type": "application/pdf",
"size": 18233,
"data": "JVBERi0xLjQK..."
}
]
}
| Field | Description |
|---|---|
id, token | Identify the message within the server |
rcpt_to, mail_from | Recipient and sender of the SMTP envelope |
to, cc, from, reply_to, date, subject | Message headers, already decoded |
message_id, in_reply_to, references | Use them to tie the reply to the original message |
plain_body, html_body | First text part and first HTML part. html_body is null when there is none |
auto_submitted | Value of the Auto-Submitted header. Use it to ignore automatic replies |
attachments | Present when "include attachments" is on. The data field is Base64 |
replies_from_plain_body | Present when "strip reply quotes" is on: it holds the quoted text, and plain_body keeps only the new text |
size | Size of the original message in bytes, sent as a string |
RawMessage format¶
{
"id": 2051,
"rcpt_to": "[email protected]",
"mail_from": "[email protected]",
"message": "UmVjZWl2ZWQ6IGZyb20uLi4=",
"base64": true,
"size": 4821
}
The message field carries the complete original message, in Base64, for you to parse with your language's MIME library.
Signature¶
The POST is signed the same way webhooks are, with the X-Postal-Signature, X-Postal-Signature-256 and X-Postal-Signature-KID headers. The public key is at https://api.frontengine.net/.well-known/jwks.json. Verify the signature over the raw request body before processing. See Webhooks and Security.
Your endpoint's answer and retries¶
| Your answer | What FrontEngine does |
|---|---|
2xx | Treats it as delivered |
5xx, timeout or connection failure | Tries again, with a growing interval starting at 5 minutes, up to 18 attempts, over about two days |
Any other answer, including 4xx and 429 | Gives up. There is no retry |
Answer 2xx as soon as you have stored the message and do slow processing afterwards, in a queue of your own. Because a retry can happen, use the message id to discard repeats.
Current limitations¶
spam_statusis alwaysNotSpamandreceived_with_sslis alwaysfalse. Do not base any decision on these fields.- When your endpoint answers
4xx, the original sender does not receive a failure notice. The failure is recorded on our side. - Only the
endpoint,acceptandrejectmodes exist. There is no forwarding to another email address or to another SMTP server. - There is no panel to create routes, see the requests made to the endpoint or replay them. Ask support.
- An endpoint hosted inside Intesys's own public network may not be reachable by FrontEngine. If that is your case, talk to support before setting it up.