Email and SMTP
Receive mail as tickets or as agent conversations, reply in thread, and relay outbound notices through your SMTP server.
After reading this page you will be able to:
- Start the built-in SMTP listener and turn mail into tickets
- Give an agent an email door with allowed senders
- Configure an outbound relay
Inbound: the built-in SMTP listener
Liyagent includes a small SMTP server. Mail it receives lands in an inbox table (5 MB per message limit).
| Variable | Default | Meaning |
|---|---|---|
TICKETIQ_MAIL_HOST | 127.0.0.1 | Listen address |
TICKETIQ_MAIL_PORT | 2525 | Listen port |
TICKETIQ_MAIL_AUTOSTART | off | Start with the server |
TICKETIQ_MAIL_AUTO_INGEST | off | Turn inbox mail into tickets automatically |
Start, stop and test it with POST /api/mailserver/start, /stop and /send-test. Ingest the inbox by hand with POST /api/mailserver/ingest.
An email door for an agent
Mail addressed to an agent's email door becomes a conversation, and the agent replies in the same thread.
- On the agent's Triggers tab, add an Email trigger, or use
PUT /api/triggers/{name}/email. - Fill in Allowed senders, addresses or domains. An empty list means nobody is answered.
- Keep Require the receiving server to have authenticated the sender on (the default): the receiving server's
Authentication-Resultsheader must show DMARC or DKIM pass. - Deliver mail either to the SMTP listener or by
POST /api/email/inbound/{name}with the raw RFC 5322 message, signed with the door's signing secret (X-TicketIQ-SignatureandX-TicketIQ-Timestamp).
Warning
Only trust Authentication-Results from your own relays. List their IP addresses in TICKETIQ_EMAIL_TRUSTED_RELAYS. Mail from any other peer can't satisfy that check.
Outbound relay
| Variable | Meaning |
|---|---|
TICKETIQ_MAIL_RELAY_HOST / TICKETIQ_MAIL_RELAY_PORT | Your SMTP relay (port 25 by default). Unset, replies go to TICKETIQ_MAIL_HOST, the built-in listener, and never reach the sender. |
TICKETIQ_MAIL_RELAY_USER / TICKETIQ_MAIL_RELAY_PASSWORD | Relay credentials |
TICKETIQ_MAIL_FROM | The From address on notices and replies |