Dovecot + AI

Connect your Dovecot server
to Claude, Cursor and any MCP client

You run the IMAP server, so you decide what an agent can reach. Point mcpemails at your own Dovecot host and let Claude read, search, send, reply, schedule and file mail in the mailboxes you already operate.

Claude cannot reach a Dovecot server on its own. mcpemails is a hosted MCP server that connects to your Dovecot install over IMAP at your own hostname, typically mail.yourdomain.com on port 993, using the mailbox password your passdb already accepts, so Claude, Cursor or any MCP client can read, search, send and organize that mail. There is no shared hostname to look up: the host is whatever your server is called, it has to be reachable from the internet, and its TLS certificate has to be valid for the name you connect to. One inbox is free.

1 inbox free, forever Your existing Dovecot mailbox password Email fetched live, never stored

How Dovecot connects: your own host, your own passdb

Dovecot is not a mailbox provider, it is the IMAP server you installed, so there is no shared hostname and no vendor account to sign into. The host is the name your server answers to, usually something like mail.yourdomain.com. Which ports it answers on is decided in conf.d/10-master.conf, where the service imap-login block holds an inet_listener imap for port 143 and an inet_listener imaps for port 993 with ssl = yes. Setting a listener's port = 0 switches it off, which is how many hardened builds end up with 993 only. Credentials are whatever your passdb validates, so on a virtual-mailbox setup that is the password you set in your SQL or LDAP user table, and on a system-user setup it is the Unix account password. Run doveconf -n on the box to see the configuration Dovecot actually loaded rather than the one you think you wrote.

What your AI can do

A Dovecot inbox your agent can actually use

Seventeen action-based MCP tools: send, reply, forward, schedule, and organize. Your agent finishes the job inside Dovecot.

  1. 01Read

    Read & search mail

    List, read and search across folders to find that invoice, summarize a thread, or pull the latest from a sender.

  2. 02Send

    Send, reply & forward

    Compose and send real messages, reply in-thread, and forward, directly from your mailbox, not as a draft you finish by hand.

  3. 03Schedule

    Schedule for later

    Queue a message to go out at the right time, so your agent can draft now and send on schedule.

  4. 04Organize

    Move, copy, flag, archive, delete

    Keep the inbox tidy: file mail into folders, flag what matters, archive the rest, or delete on request.

Setup

Connect Dovecot in four steps

From sign-up to first AI email in a couple of minutes.

01

Create a free account

Sign up for mcpemails, no card required. The free plan connects one inbox, forever, which is enough to try this against a real mailbox on your own server.

02

Confirm what Dovecot is listening on

On the server, run doveconf -n and read the service imap-login block. Note whether inet_listener imaps is present on 993, and check the listen setting: if it says 127.0.0.1, Dovecot is answering on loopback only and nothing outside the machine can reach it.

03

Check the certificate on 993 from outside

From a machine that is not your mail server, run openssl s_client -connect mail.yourdomain.com:993. You want a chain that verifies and a subject name matching the host you will type into mcpemails. Then add the inbox: choose IMAP / SMTP, enter your hostname, the mailbox login and its password.

04

Paste the MCP URL into your AI

Drop https://mcpemails.com/api/mcp into Claude, Cursor or ChatGPT, authorize, and your agent has the inbox.

Before you start

What actually goes wrong with Dovecot

Without special_use entries, Dovecot ships no folder roles

Dovecot only advertises the SPECIAL-USE extension for mailboxes you have declared. Unless 15-mailboxes.conf carries entries like mailbox Sent { special_use = \Sent }, an IMAP client gets a flat list of names and has to guess which folder is Sent, Drafts, Junk or Trash. mcpemails falls back to name matching, so a server whose folders are called Sent Items, Gesendet or Papierkorb may need the folder chosen by hand once. Adding the special_use lines fixes it permanently for every client you own.

A namespace prefix rewrites every folder name you see

Maildir++ layouts commonly set an inbox namespace with prefix = INBOX. and separator = ., so folders arrive as INBOX.Sent and INBOX.Archive rather than Sent and Archive. That is not a fault, but it means folder names you copied out of your webmail will not match what IMAP reports. Read the real names from doveadm mailbox list -u user@yourdomain.com before you assume something is missing.

disable_plaintext_auth turns a good password into a BAD on 143

With disable_plaintext_auth = yes, which is the default on most distributions, Dovecot refuses LOGIN on port 143 until the client has issued STARTTLS. The client sees an authentication failure and the user concludes the password is wrong. It is not: the connection was not encrypted yet. Port 993 is unaffected because implicit TLS is already up before authentication starts, which is one more reason to use 993.

ssl_cert needs the < prefix, and one cert per name needs local_name

In 10-ssl.conf, the leading &lt; in ssl_cert = &lt;/etc/letsencrypt/live/mail.yourdomain.com/fullchain.pem is mandatory: it tells Dovecot to read the file's contents rather than treat the path as the certificate. Point it at fullchain.pem and not cert.pem, or the intermediate is missing and strict validators reject a certificate that your browser accepted. If the box serves several hostnames, each needs its own local_name block, otherwise every connection gets the default certificate and only one hostname validates.

Known limits with Dovecot

  • Your Dovecot server has to accept connections from the public internet for a hosted MCP server to reach it. If your policy is that IMAP never leaves the LAN or the VPN, that is a legitimate answer and this product cannot serve you as a hosted service. mcpemails can be self-hosted instead, which keeps the IMAP connection inside your own network.
  • Strict TLS validation is not optional here. A self-signed certificate, an expired one, or one issued for a different hostname will be refused, and there is no checkbox to accept it anyway.
  • Sending goes out through your own submission service, so your SPF, DKIM and DMARC records govern deliverability exactly as they do for every other client on that server.
FAQ

Dovecot and AI: common questions

Does Claude work with Dovecot?

Not directly. Claude has no way to open an IMAP socket to a server you run. Connecting an MCP server such as mcpemails to your Dovecot host gives Claude read, search, send, reply, schedule and organize access to the mailboxes on it, using the same credentials any other IMAP client would use.

What are the Dovecot IMAP and SMTP settings?

The hostname is your own server, so nobody can publish it for you. The ports come from the service imap-login block in conf.d/10-master.conf: 993 for implicit TLS and 143 for STARTTLS, unless someone has changed them. SMTP submission is handled by Postfix or Exim alongside Dovecot, normally on 587 or 465.

Why does my Dovecot password get rejected?

Check the server log rather than guessing. The two usual causes are plaintext authentication being refused on an unencrypted port 143 connection, and the login name not matching what your passdb expects, since virtual setups want the full address while system-user setups want a bare username. Run doveadm auth login user@yourdomain.com on the server to test the credential without the network in the way.

Does my Dovecot server have to be reachable from the internet?

Yes, for the hosted service. mcpemails connects inbound to your IMAP port, so a server bound to loopback, firewalled to your office range, or reachable only over a VPN cannot be connected. If you would rather not expose IMAP publicly, mcpemails is self-hostable and can run inside the same network as the mail server.

Which products are built on Dovecot?

Several of the packaged mail servers people run are Dovecot underneath, including mailcow, Mail-in-a-Box and Poste.io, and Open-Xchange App Suite is normally deployed against Dovecot as its mail backend. Everything on this page about listeners, certificates and folder roles applies to them too, though each one has its own admin interface for changing it.

Is my mail stored on your servers?

No. Messages are fetched live from your Dovecot server over IMAP for each request and passed to your AI client. Credentials are encrypted at rest and message bodies are not retained.

Give your AI a Dovecot inbox

Point mcpemails at your own server. One inbox free forever, no card required.