~2 min read • Updated Jan 27, 2026
1. What is Dovecot?
Dovecot is a high‑performance, secure Mail Delivery Agent (MDA) and Mail Access Server. Its primary responsibilities include:
- Providing IMAP and POP3 access to users
- Authenticating email users (SASL)
- Delivering messages to mailboxes (LDA/LMTP)
In iRedMail, Dovecot is essential because:
- It delivers emails to user mailboxes
- It acts as the authentication backend for Postfix (SMTP Auth)
2. Dovecot’s Role in iRedMail Architecture
Incoming Mail Flow
Internet ↓ Postfix (SMTP) ↓ Amavis (Scan) ↓ Dovecot (LDA / LMTP) ↓ Mailbox (Maildir)
Outgoing Mail Flow
Mail Client → SMTP Auth → Postfix
↑
Dovecot (Auth)
3. Dovecot Service Architecture
Dovecot is a daemon‑based service composed of multiple processes:
- dovecot
- auth
- imap
- pop3
- lmtp
Service control:
systemctl status dovecot
4. Dovecot Installation in iRedMail
Dovecot is installed and configured automatically by iRedMail. To verify installation:
rpm -qa | grep dovecot # Rocky / Alma apt list --installed | grep dovecot # Ubuntu
5. Important Dovecot Paths
| Path | Description |
|---|---|
| /etc/dovecot/ | Main configuration directory |
| /etc/dovecot/dovecot.conf | Primary configuration file |
| /etc/dovecot/conf.d/ | Modular configuration files |
| /var/vmail/ | User mailboxes |
| /var/log/maillog | Logs |
6. Key Dovecot Configuration
6.1 Protocols
protocols = imap pop3 lmtp
6.2 Mailbox Format
mail_location = maildir:/var/vmail/%d/%n/Maildir
Maildir advantages:
- Better performance
- Easy backup
6.3 User / Group
mail_uid = 2000 mail_gid = 2000
This corresponds to the vmail user/group created by iRedMail.
6.4 Authentication Backend
Dovecot in iRedMail can authenticate users via MariaDB/MySQL or LDAP.
Example SQL Authentication:
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
Written & researched by Dr. Shahin Siami