AnnexGroup

Documentation

Mailbox connection — parallel operation without DNS changes

The mailbox connection integrates existing IMAP mailboxes of the previous provider (Plesk, hosted Exchange via IMAP) without MX or DNS changes: AnnexGroup fetches continuously, places the mail in an internal mailbox and sends in the name of the external address through the provider’s SMTP submission path. Management belongs to the operator (Administration → Mailbox connections); tenants and users set nothing up themselves.

1. How to set up a connection

  1. Create: name, external address (sender) and target mailbox — a user or shared mailbox. Only this mailbox and its delegates (send_as / send_on_behalf) may send as the external address; everyone else gets 550.
  2. IMAP access: server, port and encryption (TLS immediately or STARTTLS; unencrypted is rejected by the API), user name and password. When editing, an empty password field keeps the stored password.
  3. Folders: by default INBOX and \Sent (the provider’s Sent), further folders by name; optionally a prefix for the target folders (e.g. OldProvider/INBOX).
  4. Mode and cadence: mode mirror (default) or fetch, fetch interval 30–3600 seconds (default 120).
  5. Outgoing (optional): the provider’s SMTP server for mail sent as the external address. Empty user and password = those of the IMAP access. Optionally the server stores a copy in the provider’s Sent folder.
  6. Test before saving or afterwards: the connection test checks reachability, encryption, login, the folders and — for the fetch mode — whether the provider knows UID EXPUNGE, plus IDLE (yes/no) and the SMTP result.

2. What applies during fetching

  • Resuming without duplicates: per folder the server remembers UIDVALIDITY and the highest fetched UID. On a UIDVALIDITY change the folder starts over; messages whose Message-ID already exists in the target are not created again — this also covers the return of your own Sent copy.
  • Cadence: after fetching, the fetcher waits on the INBOX via IDLE — if the provider can IDLE — otherwise in the interval. Further folders are always polled in the interval rhythm. Errors lead to reconnecting with backoff (interval × 2^n, at most 15 minutes); from three failures in a row the active administrators receive one notification email per failure series.
  • Mode mirror: the provider stays untouched; markers (read, flagged, keywords as categories) only travel from the provider inward, at most every 10 minutes. If AnnexGroup fails, everything stays with the provider — that is the fallback path.
  • Mode fetch: after the takeover the message is deleted at the provider — only the fetched UIDs, via UID EXPUNGE. If the provider does not know UIDPLUS, the fetch aborts with a clear message and nothing is deleted.

3. Passwords and backup

Passwords are stored AES-256-GCM encrypted; the key lives as 32 bytes hex in <data_dir>/geheimnis.key. Plaintext never appears in the database, in API responses, in the audit log or in stored error texts — without the key the server stores and reads nothing (fail-closed).

Warning: the backup archive contains the database and the key. Whoever has the archive can read the stored passwords. Protect the archive accordingly. If secret_key_file lives outside the data directory, the restore still puts the file back at <data_dir>/geheimnis.key.

4. What does not work

  • Markers only travel from the provider inward. Read, flagged or deleted in the internal mailbox has no effect at the provider. In mirror mode, messages deleted at the provider do not disappear in the target; what is deleted in the target does not come back.
  • The marker sync costs one query per message (a pass every 10 minutes). For very large mailboxes (100,000+) increase the interval.
  • A broken message stalls the folder at that UID; there is no skipping. It counts as an error and, after the series, triggers the notification email.
  • IDLE only watches the INBOX; further folders come in the interval rhythm.
  • The outgoing path via the provider has no silent fallback: when it is down, mail is deferred and the error is counted — it is not relayed through a connector or smarthost. The copy in the provider’s Sent folder is best-effort, not guaranteed.
  • As targets, loopback and link-local addresses are always blocked, private networks only with the privates_netz switch (in the form of the “Mailbox connections” admin page). The address is checked when saving and in the connection test, not on every send.
  • State of proof: the connection is shown against the server’s own IMAP server as the counterpart, not against Plesk/Dovecot or hosted Exchange.

Something unclear or described wrong? Tell us — we will fix it. Your question shows us where the text falls short.