# Tickets by email

Source: https://docs.neode.sk/console/tickets-by-email/
Last updated: 2026-11-30

> Let mails to your support address open tickets, turn replies into comments, and mail the people who wrote in when your team answers or the status changes.

The server reads a support mailbox over IMAP: a mail to your support address
opens a [ticket](https://docs.neode.sk/console/tickets.md), and a reply becomes a comment on it.
The person who wrote in gets a mail when your team answers or the ticket's
status changes, and can answer that mail.

## What you need

- A mailbox for your support address that the server can read over IMAP with
  TLS or STARTTLS, with a user name and password. The server never reads a
  mailbox over IMAP without encryption.
- A mail server under [Settings, Email](https://docs.neode.sk/console/settings/email.md) for the
  mails to the people who write in. Without one their mails still open
  tickets, but they get no confirmation and no answers, and the section says
  so.
- **Change server settings**, which Super admin and Server admin accounts have
  by default, to add and change mailboxes.

Use a mailbox only the server reads, or a folder of it: every mail that
arrives in the folder becomes a ticket or a comment.

## Add a mailbox

Go to **Settings**, **Email**. The section **Tickets by email** lists your
mailboxes, each with its address and whether the last read worked: **Read**
and when, **Reading failed** with what the mail server said, **Not read yet**
or **Off**. **How it works** under the list sums up the rules of this page.

![The Tickets by email section in the email settings with the mailbox Support, its address, the state Read, and How it works opened](https://docs.neode.sk/shots/settings-email-tickets-light.png)

Click **Add mailbox**, fill in the sheet and click **Add mailbox** at its
bottom. The sheet stays open on the saved mailbox.

![The sheet of the mailbox Support with its name, support address, host, security TLS, port 3993 and user name, and the buttons Delete, Test connection, Read now and Save](https://docs.neode.sk/shots/mailbox-light.png)

| Field | What goes in |
|---|---|
| **Name** | Shown in the list and in the log, for example Support. Required. |
| **Support address** | The address people write to, for example `support@example.com`. The mails to the people who write in carry it as Reply-To, so their answers come back here. Required. |
| **Host** | Host name or IP address of the IMAP server, without a port, for example `imap.example.com`. Required. |
| **Security** | **TLS** or **STARTTLS**. |
| **Port** | Usually 993 with TLS or 143 with STARTTLS. It follows **Security** until you type a port of your own. |
| **User name** | The user name of the mailbox, often its full address. Required. |
| **Password** | The password of the mailbox. It is stored encrypted and never shown again; a saved mailbox shows it masked, and leaving the mask as it is keeps it. Required. |
| **Folder** | The folder the server reads. Empty reads INBOX. |
| **Check the certificate** | On at first. Turn it off only for a server with a self-signed certificate on a network you trust. |
| **Read this mailbox** | On at first. Off: the server stops reading the mailbox until you turn it on again. |
| **Confirm new tickets by mail** | On at first: the person gets a mail with the ticket number right away. |
| **Priority** and **Category** | The priority and category of the tickets this mailbox opens, **Medium** and **General** at first. The priority sets the due time as for any ticket. |

The IMAP server may be on your LAN. Loopback, link-local and cloud metadata
addresses are refused.

**Delete** asks first. The tickets the mailbox opened stay, but the people
who wrote in get no more mails about them.

## Test connection and Read now

A saved mailbox has two more buttons at the bottom of the sheet. Both use the
saved settings, so save your changes first.

- **Test connection** signs in and opens the folder, without reading a mail.
  It answers, for example, "Connected. Mails in INBOX: 12.", or what went
  wrong.
- **Read now** reads the mailbox at once instead of waiting for the next
  minute, and says what came of it: "Read. New tickets: 1, comments: 0, left
  alone: 0, not readable: 0."

**A new mailbox starts with the mail that arrives after you added it.** Its
first read only notes where the folder ends, so the mails already in it open
no tickets. **Read now** then says "First read done". The same happens when
the mail server rebuilds the folder.

The server reads every mailbox that is on once a minute. In a cluster one
instance does it. It marks the mails it read as read and deletes nothing.

## What happens to a mail

A mail that belongs to no ticket opens one:

- The title is the subject and the description is the text of the mail; a
  mail with only HTML is turned into text. A mail without a subject gets
  "(no subject)".
- The sender's name is shown as who created it, with their address. The
  ticket has the priority and category of the mailbox, is assigned to nobody
  and is about no device.
- Up to 10 files of the mail come along, each up to 25 MB. Files beyond that
  are named in a line under the text: "Files of the mail that were not kept
  (too large, or more than 10)".
- Mails larger than 40 MB are not fetched; the log shows them as left alone.

A reply becomes a public comment on its ticket, as "Sofia Brandt, by mail",
with its files. The quoted mail at its end is cut off. A reply to a resolved
or closed ticket opens it again; the [audit log](https://docs.neode.sk/console/activity.md)
records that a mail from that address reopened it.

The bell in the console tells you about each new ticket and each reply by
mail. How such a ticket looks in the console is under
[Tickets by email](https://docs.neode.sk/console/tickets.md#tickets-by-email) on the tickets
page.

![A ticket opened by mail, with the sender as its creator, the description from the mail and the hint that public comments and status changes are mailed to her](https://docs.neode.sk/shots/ticket-by-mail-light.png)

## Which ticket a reply lands on

A mail belongs to a ticket when:

- it answers one of the ticket's mails, the one that opened it or one the
  server sent about it. This holds for a mail from anyone, such as a
  colleague the person forwarded the mail to.
- its subject carries the ticket's number, as `[#12]`, and it comes from the
  address the ticket is from. The number alone from another address opens a
  new ticket, so nobody can write into a ticket by guessing its number.

Any other mail opens a new ticket. A mail the server reads twice opens one
ticket only.

## The mails the person gets

The server mails the person who wrote in:

| Mail | Sent when |
|---|---|
| Confirmation | A mail opened a ticket and **Confirm new tickets by mail** is on. It names the ticket number. |
| An answer | Someone of your team adds a public comment. The mail quotes it. |
| A change of status | The ticket's status changes. When it is resolved or closed, the mail says that a reply opens it again. |

Internal notes are never mailed, and neither is what the person's own mail
did: their reply, and the reopening that came with it.

The mails go out through the mail server of
[Settings, Email](https://docs.neode.sk/console/settings/email.md), with its sender and footer.
The subject carries the ticket number, such as `[#10]`, and Reply-To is the
mailbox's support address, so an answer comes back to the mailbox. They are
written in the console's default language. A mail that fails is tried again;
the log shows the mail server's answer.

## What is left alone

These mails open no ticket, become no comment and are never answered:

- automatic answers, such as out-of-office replies (`Auto-Submitted`,
  `X-Autoreply` and similar headers);
- bulk and mailing list mail (`Precedence: bulk`, `junk` or `list`);
- delivery reports and bounces;
- the server's own mails that come back.

One address gets at most 20 mails an hour through; the rest is left alone
until the hour is over. That stops a loop with another automatic system that
none of the checks caught.

## The log

**Recent mails** at the bottom of the sheet lists the newest mails the
mailbox read and the mails sent to the people who wrote in: when, the subject
with who sent or got it, the result with a link to its ticket, and details.

![The Recent mails log of the mailbox: a reply added as a comment, an out-of-office mail left alone, three mails sent about ticket 10 and the mail that opened it](https://docs.neode.sk/shots/mailbox-log-light.png)

| Result | What it means |
|---|---|
| **Ticket opened** | The mail opened the ticket it links to. |
| **Comment added** | The mail is a reply and became a comment on the ticket. |
| **Left alone** | The mail was not used. **Details** says why. |
| **Not readable** | The server could not read the mail. |
| **Sent** | A mail to the person went out. **Details** says which: **Confirmation with the ticket number**, **Answer from staff** or **Change of status**. |
| **Not sent** | A mail to the person failed, with what the mail server said. |

The details of a mail left alone:

| Details | Why |
|---|---|
| **Sent automatically** | It carries `Auto-Submitted`. |
| **Automatic answer, such as an out-of-office reply** | It carries `X-Autoreply` or a header like it. |
| **Bulk or mailing list mail** | It carries `Precedence: bulk`, `junk` or `list`. |
| **Delivery report (bounce)** | A bounce or another delivery report. |
| **One of this server's own mails** | A mail the server sent came back. |
| **More than 20 mails from this address in an hour** | The limit above. |
| **No sender address** | The mail names no sender. |
| **Larger than 40 MB** | It was not fetched. |
| **Read before** | The same mail was read already. |

## On the command line

The [mail-intake](https://docs.neode.sk/command-line/reference/mail-intake.md) commands do the
same as the sheet: `list`, `show`, `create`, `update`,
`delete`, `test`, `run` and `log`. For example, to switch a mailbox off:

```bash
neodesk mail-intake update <id> -F enabled=false
```

Put the mailbox's ID in place of `<id>`. The list shows the IDs:

```bash
neodesk mail-intake list
```

## Who can use it

The mailboxes, their test, **Read now** and the log need **Change server
settings**. The tickets a mail opens follow the rules of all tickets: who sees
them and who answers them is on the [Tickets](https://docs.neode.sk/console/tickets.md#who-can-use-them)
page. Adding, changing and deleting a mailbox is written to the
[audit log](https://docs.neode.sk/console/activity.md), without the password. Ticket events for
[webhooks](https://docs.neode.sk/console/settings/webhooks.md) and notification channels don't
carry the address of the person who wrote in.
