Receiving email
DBMail receives emails from a Message Transfer Agent (MTA) such as exim or postfix.
When an email is received by your SMTP server for one of your users, it gets forwarded to either the command line utility dbmail-deliver or the dbmail-lmtpd LMTP service. dbmail-deliver might be preferable for lower volume or the LMTP server dbmail-lmtpd for higher volume.
Exim is a modern and highly configurable SMTP server that works well with DBMail. XML Team sponsored DBMail and an Exim configuration file is available on GitHub, though any MTA can send emails to DBMail through dbmail-deliver or LMTP. Either of the following two options work well.
dbmail_delivery:
driver = pipe
command = /usr/local/sbin/dbmail-deliver -d "$local_part_data@$domain_data"
#command = /usr/local/sbin/dbmail-deliver -d "$address_data"
return_fail_output
user = mail
dbmail_delivery:
driver = smtp
protocol = lmtp
hosts_avoid_tls = example.com
hosts = example.com
port = 24
allow_localhost = true
DBMail's LMTP daemon should be protected from the internet, it should only receive emails from the MTA.