Integrate Mailpiler in mailcow¶
This guide describes the integration of Mailpiler in mailcow for email archiving.
Prerequisites¶
- A working mailcow installation
- A working Mailpiler installation
- Administrator access to both systems
Step 1: Create Dummy Target in Transport Maps¶
Important
The dummy target entry created in this step will be used in the following steps to configure the BCC rules. This dummy mailbox does not need to exist, as it only serves to forward emails to the Mailpiler server.
This step only needs to be performed once per mailcow installation, regardless of the number of domains or mailboxes to be archived.
First, a dummy target must be configured in the Postfix transport maps to forward emails to Mailpiler.
- Log in to the mailcow administration interface
- Navigate to System > Configuration > Routing > Transport Maps
- Create a new transport entry:
- Destination:
archive.mailcow.local - Next Hop:
[mailpiler-host]:25(IP address or hostname of your Mailpiler server)
- Destination:
Step 2: Activate BCC Rules¶
Important
Make sure that the Mailpiler server is configured to accept emails from your mailcow server. For Mailpiler instances hosted by us, this is the default setting.
Also note that there can only be one BCC rule for incoming and one for outgoing emails per domain (or mailbox). If you have already configured other BCC rules, they must be removed or adjusted.
If the BCC rules are not set, no emails will be forwarded to Mailpiler for archiving.
Recipient-dependent BCC Rule¶
Configure a BCC rule for incoming emails:
- Navigate to Email > Configuration > Address Rewriting > BCC Maps
- Click Add BCC Entry
- Configure the rule:
- Local Destination: the domain present in mailcow, e.g.
your-domain.com - BCC Type: Recipient-dependent (incoming emails to the mailcow server)
- BCC Destination:
archive@archive.mailcow.local(dummy target from step 1 connected to a dummy mailbox, this only serves for forwarding and does not need to exist) - Active: ✓
- Local Destination: the domain present in mailcow, e.g.
Tip
You can also configure specific email addresses instead of the entire domain by entering the corresponding addresses in the Local Destination field, not recommended if you want to archive all emails.
Sender-dependent Domain Rule¶
Configure a BCC rule for outgoing emails:
- Navigate to Email > Configuration > Address Rewriting > BCC Maps
- Click Add BCC Entry
- Configure the rule:
- Local Destination: the domain present in mailcow, e.g.
your-domain.com - BCC Type: Sender-dependent (outgoing emails from the mailcow server)
- BCC Destination:
archive@archive.mailcow.local(dummy target from step 1 connected to a dummy mailbox, this only serves for forwarding and does not need to exist) - Active: ✓
- Local Destination: the domain present in mailcow, e.g.
Tip
You can also configure specific email addresses instead of the entire domain by entering the corresponding addresses in the Local Destination field, not recommended if you want to archive all emails.
Step 3: Test Configuration¶
Send test emails to verify archiving:
- Send an email to an address in your domain
- Send an email from an address in your domain
- Check in Mailpiler whether both emails have been archived
Notes¶
- All emails are blind copied (BCC), the original recipients do not see the archiving
- If Mailpiler is not reachable, emails will still be delivered, the BCC copy will remain in the email queue until Mailpiler is reachable again