The message log
The mxgate log has one row for each message: forwarded, sent, deferred, bounced, expired or rejected, with the reply of the other server.
mxgate writes a log row for each message that it forwards, sends or refuses. The row says what happened, what the other server answered, and what to do.
Read the log
$ npx mxgate logs example.com
2026-11-14 09:14:02 in forwarded client@example.org -> hello@example.com -> you@gmail.com
2026-11-14 09:20:41 in rejected promo@example.net -> hello@example.com
rspamd scored it as spam and mxgate refused it at SMTP time. The sender got an error; nothing was forwarded.
2026-11-14 10:02:10 in bounced client@example.org -> sales@example.com -> old@example.org
The destination mailbox does not exist.
2026-11-14 10:30:55 out sent ada@example.com -> client@example.orgThe newest row is first. Times are in UTC. A row for forwarded mail shows the sender, the alias, and the destination. For a message that failed, the CLI also prints a line that starts with server said: and has the reply of the server.
The log has one row for each message and destination. A message to an alias with two destinations has two rows. A message that mxgate refused has one row.
Statuses
| Status | Meaning |
|---|---|
forwarded | The destination server accepted the forwarded message. |
sent | The server of the recipient accepted a message that you sent. |
deferred | The other server did not accept the message yet. mxgate tries again for up to 2 days. The row changes when a later try has a result. |
bounced | The other server refused the message. For forwarded mail, the sender gets no bounce message. For mail that you sent, you get a bounce message. |
expired | mxgate tried for 2 days and stopped. |
rejected | mxgate refused the message at SMTP time. The sending side got an error, and nothing was forwarded or sent. |
The most frequent causes of rejected for incoming mail are spam, an address with no alias and no catch-all, an alias with no confirmed destination, and a domain that is not verified. For outgoing mail the causes are the send limit of the plan, a sender address at a different domain, and the spam filter.
Direction
in is mail to your domain that mxgate forwards. out is mail that you send through smtp.mxgate.io or the send API.
Fields of a row
mxgate logs --json and GET /v1/logs give each row with these fields:
| Field | Meaning |
|---|---|
received_at | When mxgate got the message. |
updated_at | When the status last changed. |
direction | in or out. |
status | One of the six statuses. |
sender | The original sender. It is null for a bounce. |
recipient | For in: the alias address. For out: the recipient. |
destination | The mailbox that mxgate forwarded to. It is empty for a refused message and for sent mail. |
domain | Your domain. |
reason | What the other server or mxgate said. |
explanation | The same in one plain sentence, with what to do. |
dsn | The status code of the delivery, for example 5.1.1. |
relay | The server that mxgate delivered to. |
client | The server that gave the message to mxgate. |
message_id | The Message-ID of the message. Use it as in_reply_to when you answer: see Send as your domain. |
attempts | The number of delivery tries. |
Filters
| CLI | API parameter | Shows |
|---|---|---|
mxgate logs example.com | domain | One domain. Without it: all your domains. |
--in, --out | direction | in or out. |
--status bounced | status | One status. |
--address a@b | address | Rows where this address is the alias, the destination or the sender. |
--before <time> | before | Rows received before this ISO 8601 time. |
--limit 100 | limit | The number of rows: 1 to 500. The default is 50. |
npx mxgate logs example.com --status bounced
npx mxgate logs --out --address client@example.org --json
curl "https://api.mxgate.io/v1/logs?domain=example.com&status=bounced&limit=100" \
-H "Authorization: Bearer $MXGATE_API_KEY"Paging
The API answer is {entries, next_before, retention_days}. When there are more rows, next_before has a time. Give it as before in the next call. At the end, next_before is null. The CLI prints the command for the next page:
More: mxgate logs example.com --before 2026-11-14T09:14:02.000ZWhat the log does not keep
The log has no subject and no body. It has the addresses, the time, the servers, the Message-ID, and the result.
Retention
The free plan keeps a row for 7 days. The paid plan keeps a row for 90 days. retention_days in the API answer shows the number for your account.
Send as your domain
Send mail as an address at your domain: SMTP logins for a mail client, or one call to the send API with thread headers and idempotency keys.
Notifications and webhooks
mxgate tells you when mail fails: an hourly email digest and a signed webhook. The payload, the signature check in Node.js, retries and the test call.