Connect a Mailcow Mailbox to AI Email Filter
AI Email Filter talks plain IMAP, so a self-hosted Mailcow server works out of the box. Mailcow’s built-in spam filter (Rspamd) and AI Email Filter complement each other: Rspamd catches classic spam, AI Email Filter sorts what’s left by what it actually says.
What you need
- A mailbox on your Mailcow server
- Your server’s mail hostname (the one your mail clients use, e.g.
mail.yourdomain.com) - An AI Email Filter account (sign up free)
Step 1: Create an app password (recommended)
Mailcow lets each user create passwords that only work for specific protocols.
- Log in to the Mailcow user interface as the mailbox user.
- Open the App passwords tab and add one named
AI Email Filter. - Limit it to IMAP and copy the password.
You can also use the normal mailbox password, but an app password can be revoked on its own without affecting your other devices.
Step 2: Connect the mailbox
- Sign in at app.email-filter.ai and add a mailbox.
- Enter the full address, the app password, your mail hostname and port
993. - Connect.
Settings at a glance
| Setting | Value |
|---|---|
| your full address | |
| Password | the Mailcow app password |
| IMAP server | your mail hostname, e.g. mail.yourdomain.com |
| Port | 993 (SSL/TLS) |
Troubleshooting
- Connection refused or times out: port 993 must be reachable from the internet, and the hostname must have a valid TLS certificate.
- Login blocked after several attempts: Mailcow’s Netfilter may have banned the connecting IP. Check Configuration → Fail2ban in the admin UI.
- Want nothing to leave your servers? Combine this with Bring Your Own LLM and a local model.
Still fighting Mailcow’s spam filter? Read fixing Mailcow’s spam filter once and for all. More: all setup guides · self-hosted email sorting.
Ready to put your inbox on autopilot?
Get Started Free