Manage hosted mail routing and scheduled automatic replies

This commit is contained in:
parkel committed 2026-11-22 11:03:26 +01:00
1 parent a8b51ce629
commit b7bc6b988b
25 files changed
+1435 -2

No files matched your search

+73
View File
@@ -1345,6 +1345,79 @@ Back up mail on the node that hosts the mailbox. The archive can be used to
recover messages and folders into a newly provisioned mailbox with the same
address. [Mailbox backup and restore](development.md#back-up-and-restore-a-mailbox)
## Configure mail routing and automatic replies
Set up these features on the Postfix and Dovecot node, including when it runs
on a separate server. Upgrade the panel and that node to the same Coulobre
version and keep the existing mailbox provisioning worker enabled.
### Enable aliases, forwarders, and catch-all
Create the managed alias map once on the mail node. Keep its contents when
upgrading.
```sh
if ! sudo test -e /etc/postfix/coulobre-aliases; then
printf '%s\n' '# Managed by Coulobre Panel' |
sudo tee /etc/postfix/coulobre-aliases >/dev/null
sudo chmod 0644 /etc/postfix/coulobre-aliases
fi
```
Set `virtual_alias_maps` in Postfix's `main.cf`. Put Coulobre's map first
if you have other maps, and give each Coulobre-managed mail domain a single
source for alias and catch-all rules.
```ini
virtual_alias_maps = proxy:texthash:/etc/postfix/coulobre-aliases
smtpd_reject_unlisted_recipient = yes
```
Run `sudo postfix check` and `sudo postfix reload`. Set
`COULOBRE_MAIL_ROUTING=1` in `/etc/coulobre/panel.env`. Operators can opt a
hosting plan into catch-all and external forwarding separately. Plan changes
are checked when saving the next routing revision. To revoke an active
forwarder or catch-all, remove the rule and apply the update.
From **Mail domains**, open **Manage routing**, then preview and apply your
routes. A route can have several destinations. Local destinations are
provisioned mailboxes on that domain. Catch-all sends unknown recipients
to one mailbox on the same domain. Leave it blank for normal rejection of
unknown recipients. The panel shows the last confirmed publication and any
publication error. For individual delivery failures, check Postfix's
delivery status notification and the mail node's logs. Verify forwarding
to external providers with real test mail because their SPF and DMARC
policies can affect delivery. [Postfix virtual aliases](https://www.postfix.org/virtual.5.html)
### Enable scheduled automatic replies
Install the distribution's `dovecot-sieve` package. Add the settings in
[the Dovecot 2.4 example](../deploy/dovecot/vacation-2.4.conf.example) on Ubuntu
26.04 or Debian 13, or
[the Dovecot 2.3 example](../deploy/dovecot/vacation-2.3.conf.example) on Ubuntu
24.04. If you already run Sieve, merge the configuration and keep the
Coulobre script in the sequence before personal scripts. Check the merged
configuration with `sudo doveconf -n` and reload Dovecot. A default Postfix
installation provides the local `sendmail` command used for replies.
Set `COULOBRE_MAIL_VACATION=1` in `/etc/coulobre/panel.env`. Open
**Automatic replies** for a deployed mailbox and enter a subject and message.
Optional start and end times are in UTC. Sieve checks the schedule at
delivery. It continues the normal delivery and suppresses responses to
automatic mail and repeat responses to the same sender within seven days.
[Dovecot Sieve documentation](https://doc.dovecot.org/2.4.2/core/plugins/sieve.html)
After changing either panel flag, run `panel_manage migrate --noinput`.
Restart `coulobre-panel`, `coulobre-worker`, `coulobre-beat`, and
`coulobre-mailbox-provisioner`. Customers and resellers can manage the
settings for their own accounts. Operators need view permissions for the
account and mailboxes and change permission for the mail domain or mailbox.
The panel database keeps the last requested and confirmed settings. Include
the mail node's Coulobre state and `/var/lib/coulobre-vacation` in your
server backup if you use these features. Maildir-only archives contain
messages and folders. Reapply policy settings after a mailbox-only recovery.
## Check and provision mail DNS
Open **Check mail DNS** under **Mail domains**. The check reads MX and