In-depth overview of Active Directory LDAP integration, Rspamd filtering pipeline, Let's Encrypt automated SSL, OpenDKIM signing, and Email-Driven Auto-Reply.
Postfix and Dovecot communicate directly with Microsoft Windows Active Directory Domain Controllers over LDAP (Port 389) for recipient validation, user authentication, and alias resolution.
520001 or john), as Dovecot queries in lowercase.mail attribute): Fill in the full email address in the user's mail attribute (e.g. john@example.com). Logon account and email can be different.ALIASES): Create an AD Group, set its mail attribute to the alias email address, and add member user accounts to this group.local_only): Set the description attribute to local_only on an AD User or Group to restrict messaging to local domain only.Every email is inspected by a coordinated milter pipeline comprising Rspamd, ClamAV antivirus, and OpenDKIM signing before local mailbox delivery.
http://<host-ip>:11334 (Default password: kafeiou.pw)docker exec -it mailserver rspamadm pw --encrypt -p <new_password> and update /etc/rspamd/local.d/worker-controller.inc.SPAM_EMAIL): Quarantined spam is automatically rerouted to the configured admin spam mailbox.Out-of-the-box readiness via self-signed fallback certificates, coupled with official Let's Encrypt DNS-01 host volume mapping.
# 1. Install Certbot on Host
sudo apt install certbot # Debian / Ubuntu
sudo dnf install certbot # RHEL / Rocky Linux
# 2. Issue Certificate via DNS-01 Challenge (No port 80 required)
sudo certbot certonly --manual --preferred-challenges dns -d mail.example.com -d example.com
# 3. Reload Container SSL Services
docker exec -it mailserver postfix reload
docker exec -it mailserver dovecot reload
Ensure high email deliverability and combat spoofing by configuring OpenDKIM keys and public DNS TXT records.
# Enter container
docker exec -it mailserver bash
# Uncomment milter settings in /etc/postfix/main.cf:
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = $smtpd_milters
milter_default_action = accept
# Reload Postfix
postfix reload
# Edit /getOpenDKIM.sh to add your domains:
domains=( 'example.com' 'example2.com' )
# Run the script:
/getOpenDKIM.sh
| Record Type | Host / Name | Value |
|---|---|---|
| SPF (TXT) | @ (or domain) |
v=spf1 ip4:<YOUR_SERVER_PUBLIC_IP> mx ~all |
| DKIM (TXT) | default._domainkey |
v=DKIM1; k=rsa; p=<PUBLIC_KEY_FROM_default.txt> |
| DMARC (TXT) | _dmarc |
v=DMARC1; p=quarantine; rua=mailto:postmaster@example.com |
For environments without Webmail, users can easily configure Vacation / Out of Office auto-replies simply by sending an email command to themselves.
Send email to yourself with date range. Automatically expires when period ends.
To: your_email@example.com
Subject: #autoreply 2026-08-25 ~ 2026-08-30 Out of Office
Body: Hello, I am currently out of office until Aug 30.
Turn on indefinitely or cancel immediately.
# Turn on:
Subject: #autoreply on Business Trip
Body: I am on business trip.
# Turn off immediately:
Subject: #autoreply off