# Sending queue

> The sending queue for rule mail, its stages and statuses, retries, unconfirmed sends, bounces, and the actions Retry, Change recipient, Restore to mailbox and Download .eml.

Source: https://docs.posternmail.app/rules/sending-queue/

The sending queue shows every message your rules send (redirects, forwards, automatic replies)
and where each one is. A message that cannot be sent waits here for you; it is never dropped.
Open it under **Settings → Sending queue**. When something needs you, the sidebar shows **Rule
mail needs you** with a count.

![The sending queue with a redirect that needs attention and the actions Retry, Change recipient and Restore to mailbox](https://posternmail.app/img/queue.webp)

## What is listed

| Item | Listed |
|---|---|
| Redirect, Forward, Automatic reply | Always, from the moment the rule matched |
| Capture, Permanent delete, Copy | Only while they need you. Normally these finish in seconds and never show up. |

Each item shows the subject, its status, the kind and recipients ("Redirect to
helpdesk@example.com"), the mailbox, the rule, its progress, any error, and the number of tries
with the time of the next one ("2 tries · next try in 5 minutes").

Use the buttons at the top to filter: **Needs you** (with a count), **Not sent yet** and
**All**. Finished items are removed 30 days after they finished.

## Statuses

| Status | Meaning |
|---|---|
| **Waiting** | Due to run, or waiting for its next try |
| **Sending** | Being sent right now |
| **Paused** | Held by a [daily limit or the burst pause](https://docs.posternmail.app/rules/limits/). It goes on by itself. |
| **Needs you** | Stopped. The Hub will not try again until you act. |
| **Sent** | Done |
| **Put back** | You restored the message to the mailbox. The item is closed. |

## Stages

Each item goes through fixed stages. The Hub records each stage in its database before it moves
on, so after a restart (an update, a power cut) it continues exactly where it stopped and never
repeats a finished stage.

| Stage | Redirect | Forward | Automatic reply | Capture, Delete for good |
|---|---|---|---|---|
| **Copy saved**: encrypted copy stored on the Hub and checked | Yes | Yes (kept hidden, for **Restore**) | | Yes |
| **Taken out of the mailbox**: deleted at the provider | Yes | | | Yes |
| **Ready to send** | Yes | Yes | Yes | |
| **Sent** | Yes | Yes | Yes | |
| **Done**: clean-up finished | Yes | Yes | Yes | Yes |

A redirect removes the original before it sends. If the send then fails, the message is still
safe on your Hub: you can send it again, send it elsewhere, or put it back.

After a redirect is sent, the Hub removes the copy that your provider put into the Sent folder.
For a forward or automatic reply it does this only if **Keep a copy in Sent** is off. It waits
up to 10 minutes for the provider's copy to appear. On Gmail, if the message also has another
label, only the **Sent** label is removed.

## Retries

A send that fails with a temporary error (the server is down, a timeout, too many requests) is
tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. If the provider asks for
a longer wait (`Retry-After`), the Hub waits longer. After the fifth retry the item goes to
**Needs you** and you get an [alert](https://docs.posternmail.app/rules/alerts/).

Some errors go to **Needs you** at once, without retries:

| Error shown | Cause | What to do |
|---|---|---|
| The mailbox needs you to sign in again. | The provider no longer accepts the Hub's sign-in. | Choose **Sign in to you@example.com again**. Once the mailbox syncs again, waiting items start by themselves. |
| The mail was refused. | The provider refused the message for good, for example an invalid recipient, or the provider does not support sending (a JMAP server without submission). | Read the error after the label. Fix the address with **Change recipient**, or **Restore to mailbox**. |
| We could not confirm whether this was sent. Check your Sent folder or ask a recipient; Retry sends it again. | See [Unconfirmed sends](https://docs.posternmail.app/rules/sending-queue/#unconfirmed-sends). | Check, then **Retry** or leave it. |

Items that wait for a sign-in start again on their own when the mailbox syncs again: the first
time right away, after that no more often than 15 minutes, 1 hour, 6 hours and 24 hours apart.

Other labels you can see while an item is still moving:

| Error shown | Meaning |
|---|---|
| The mail server had a problem. It is tried again. | A temporary error. The next try is shown. |
| A daily limit was reached. | **Paused** by a [daily limit](https://docs.posternmail.app/rules/limits/). |
| Sending is paused because many messages went out in a short time. | **Paused** by the [burst pause](https://docs.posternmail.app/rules/limits/). |

## Unconfirmed sends

A send can be interrupted after the message left the Hub but before the provider answered, for
example by a restart or a lost connection. Sending again could deliver the message twice, so the
Hub first finds out what happened:

1. It waits 10 minutes after the send started, so the provider has time to file the message.
2. It looks in the mailbox's Sent folder for the message, by its unique Message-ID.
3. If it finds it, the item is recorded as **Sent**.
4. If it finds nothing, it sends again with the same Message-ID.
5. If it cannot tell (the lookup keeps failing for 6 hours, or the provider cannot be searched),
   the item goes to **Needs you** with "We could not confirm whether this was sent".

On IMAP mailboxes that are not Gmail, the Hub itself stores the copy in Sent, marked unread,
just before it sends, and marks it read afterwards. An unread copy found later means the send
may not have happened, so this also ends as unconfirmed rather than as sent.

For an unconfirmed item: look in your Sent folder or ask the recipient. If the message did not
arrive, choose **Retry**. If it did, leave the item; it does nothing further.

## Bounces

For 14 days after a rule sent mail, the Hub watches the mailbox for bounces (delivery failure
reports). It recognises them by the sender (`mailer-daemon`, `postmaster`), typical subjects
("Undeliverable", "Delivery Status Notification", "Mail delivery failed", "Unzustellbar" and
others) or the report format, and matches them to the item by its headers.

A matching bounce:

- moves the item to **Needs you** with "Bounced 2 hours ago: 550 5.1.1 user unknown" (the reason
  from the report),
- raises the alert "A rule mail bounced: ...",
- moves the bounce message itself to Trash, so it does not clutter your Inbox.

**Retry** on a bounced item sends it again with a new Message-ID. **Change recipient** sends it to
another address.

## Actions

Actions appear on items that are not **Sent** or **Put back**. While an item is **Sending**, they
are disabled; if you are too quick, the Hub answers "This item is being sent right now. Try again
in a moment."

### Retry

Starts the item again with fresh retries, also for a **Needs you** item. The message is "Trying
again shortly." Daily limits still apply. If the item finished in the meantime, the Hub answers
"This message was already sent", "This action is already done" or "The message was put back into
the mailbox; this item is closed".

### Change recipient

For redirects and forwards. Opens a dialog **Send to** with the current addresses. Type one or
more addresses separated by commas and choose **Send to this address**. The dialog says "The
message is sent to the new address. The rule itself stays as it is." The message gets a new
Message-ID and is sent shortly ("Recipient changed. It is sent again shortly."). An address of
the mailbox itself is refused, as in the rule editor.

| Message | Meaning |
|---|---|
| Add at least one address. | The field is empty. |
| “you@example” isn't an email address. | One of the addresses is not valid. |

To change the address for future mail, edit the rule.

### Restore to mailbox

Puts the message back into the mailbox and does not send it. The confirmation reads "The
message goes back into you@example.com and is not sent." After **Restore** you see "Put back in
you@example.com." and the item shows **Put back**.

- If the message was not taken out of the mailbox yet, nothing needs to be imported: the item is
  just cancelled.
- If it was, the Hub imports its copy into the original folder (or the Inbox if that folder is
  gone), with the read and star state and the original date.
- A forward or automatic reply that was already sent cannot be restored: "This message was
  already forwarded; the original is still in the mailbox" or "This automatic reply was already
  sent".

For a **Copy** item that needs you, the button is **Cancel copy** instead: "The message is not
copied. It stays where it is."

### Download .eml

Downloads the message as a `.eml` file you can open in any mail program: for a send, the message
exactly as it would be sent; for capture and delete, the kept original. A **Copy** item has
nothing to download: "No copy of this message is kept".

## When the queue does not move

| You see | Check |
|---|---|
| Many items **Waiting** with growing tries | The provider has a problem, or the Hub cannot reach it. See the error under the item and the Hub's logs. |
| Items **Paused** | A daily limit or the burst pause. They continue by themselves. See [Limits and guards](https://docs.posternmail.app/rules/limits/). |
| **Needs you** with a sign-in error | Sign the mailbox in again under **Settings → Mailboxes**. |
| Nothing listed although a rule should have sent | Check **Settings → Rule activity**. The rule may be in Test mode, or a guard skipped the send. |
