DBMAIL.CONF(5)
okay bestie, this is DBMAIL.CONF(5) โ the manual page for dbmail.conf, aka the configuration file for the DBMail Message Delivery Agent. Buckle up, because this file is literally the group chat where every DBMail setting gets to speak. ๐
๐ NAME ๐
dbmail.conf โ configuration file for DBMail Message Delivery Agent.
โจ SYNOPSIS โจ
There are 8 sections: DBMAIL, SMTP, LMTP, POP, IMAP, SIEVE, LDAP, DELIVERY. The default config file has documentation for all settings. Slay. โจ
๐ธ DESCRIPTION ๐ธ
The config file is literally titled # Configuration file for DBMAIL and opens with the copyright stack, so here it is exactly:
# Configuration file for DBMAIL
#
# Copyright (c) 2000-2006 IC&S, The Netherlands
# Copyright (c) 2004-2013 NFG Net Facilities Group BV support@nfg.nl
# Copyright (c) 2014-2019 Paul J Stevens, The Netherlands, support@nfg.nl
# Copyright (c) 2020-2026 Alan Hicks, Persistent Objects Ltd support@p-o.co.uk
#
Then it dives into the bracketed sections. The default config file has documentation for all settings, and here's what part 1 is giving. ๐ซถ
๐๏ธ [DBMAIL] ๐๏ธ
๐๏ธ Database settings
dburiโ the database connection URI. The format is as follows:database://[user:password@][host][:port]/database[?name=value][&name=value].... You probably want one of the following:
# dburi = mysql://user:password@db.example.com:3306/dbmail
# dburi = postgresql://user:password@db.example.com:5432/dbmail
The active default shown is dburi = sqlite:///var/tmp/dbmail.db.
authdriverโ authentication and email address lookup. Supported drivers aresqlandldap. The openldap client supports many ldap servers including OpenLDAP and Microsoft Active Directory. If you chooseldap, please configure[LDAP]. Value:authdriver = sql.max_db_connectionsโ number of database connections per threaded daemon; this also determines the size of the worker threadpool. Do NOT increase this without proper consideration. A very large database/worker pool will not only increase the connection pressure on the database, but will more significantly cause unnecessary context-switching in your CPUs. The file shows it commented out:#max_db_connections = 10.table_prefixโ table prefix. Defaults to"dbmail_"if not specified. Value:table_prefix = dbmail_.
๐ Network
bindipโ the IPv4 and/or IPv6 addresses the services will bind to. Use*for all local interfaces. Use127.0.0.1for localhost only. Separate multiple entries with spaces( )or commas(,). The default and commented alternatives are:
bindip = 0.0.0.0 # IPv4 only - all IP's
#bindip = :: # IPv4 and IPv6 - all IP's (linux)
#bindip = :: # IPv6 only - all IP's (BSD)
#bindip = 0.0.0.0,:: # IPv4 and IPv6 - all IP's (BSD)
backlogโ the maximum length of the queue of pending connections. Seelisten(2)for more information. The file has it commented:# backlog = 128.timeoutโ idle time allowed before a connection is shut off. Value:timeout = 300.login_timeoutโ idle time allowed before a connection is shut off if you have not logged in yet. Value:login_timeout = 60.resolve_ipโ ifyes, resolves IP addresses to DNS names when logging. Value:resolve_ip = no.reuseportโ ifyes, allow multiple loadbalanced dbmail processes on the same port. Value:reuseport = no.
๐ TLS Transport Layer Security
SSL/TLS certificates, bestie:
tls_cafileโ a file containing a list of CAs in PEM format. Value:tls_cafile =(blank).tls_certโ a file containing your certificate in PEM format. Value:tls_cert =(blank).tls_keyโ a file containing your ECDSA or RSA key in PEM format. Value:tls_key =(blank).tls_ciphersโ a cipher list string in the format given inopenssl-ciphers(1). Leave blank for openssl defaults. Value:tls_ciphers =(blank).
๐ค Message encoding
encodingโ must match the database/table encoding. i.e.latin1,utf8. Value:encoding = utf8.default_msg_encodingโ messages with unknown encoding will be assumed to havedefault_msg_encoding. i.e.iso8859-1,utf8. Value:default_msg_encoding = utf8.allow_invalid_messagesโ only valid emails are accepted. Setallow_invalid_messagestoyesto add a mime header allowing dbmail to store invalid messages. Value:allow_invalid_messages = no.postmasterโ postmaster's email address for use in bounce messages. Commented:#postmaster = DBMAIL-MAILER.
๐ค Sending emails
- Define
mail_hostto use smtp instead of sendmail. The file shows:# smtp_host = smtp://smtp.example.com:587. smtp_host,smtp_user,smtp_passwordโ the file lists these as commented placeholders:# smtp_host,# smtp_user,# smtp_password.sendmailโ sendmail executable for forwards, replies, notifies, vacations. You may use pipes (|) in this command, for example:dos2unix|/usr/sbin/sendmailworks well with Qmail. You may use quotes (") for executables with unusual names. Value:sendmail = /usr/sbin/sendmail.
๐ Logging
The following items can be overridden in the service-specific sections.
- Logging goes to logfile and syslog using one of the following:
emergency,alert,critical,error,warning,notice,info,debug,database,nothing. file_logging_levelsโ value:file_logging_levels = notice.syslog_logging_levelsโ value:syslog_logging_levels = warning.logfileโ location and name of the logfile. Set this to"stderr"if running under docker or systemd, which expect to receive and handle log lines. Value:logfile = /var/log/dbmail/dbmail.log.
If you need a specific logging level, numeric values are available. Logging is broken up into 8 logging levels and each level can be individually turned on or off. The Stderr/log file logs all entries to stderr or the log file. Syslog logging uses the facility mail and the logging level of the event for logging. Syslog can then be configured to log data according to the levels. Set the log level to the sum of the values next to the levels you want to record:
1= Emergency2= Alert4= Critical8= Error16= Warning32= Notice64= Info128= Debug256= Database -> Logs at debug level
Examples:
0= Nothing31= Emergency + Alert + Critical + Error + Warning511= Everythingquery_time_info,query_time_notice,query_time_warningโ generate a log entry for database queries for the log level at number of seconds of query execution time. Values:query_time_info = 10,query_time_notice = 20,query_time_warning = 30.query_timeoutโ throw an exception if the query takes longer thanquery_timeoutseconds. Value:query_timeout = 300.connection_pool_timeoutโ time in seconds to wait for a stopped connection pool before exiting (default:90). Keep this above the recoverable-reconnect worst case (~53s:db_connectsucceeds on the last retry after~50sof backoff plus a3sping sleep) so a transient DB blip is not turned into a process restart. An all-retries-fail stall (~78s) is unrecoverable, so exiting past that point is the intended behavior.90clears both. Value:connection_pool_timeout = 90.
๐ Privileges
- Root privileges are used to open a port, then privileges are dropped down to the user/group specified here.
effective_userโ value:effective_user = nobody.effective_groupโ value:effective_group = nobody.
๐ Statistics
authlogโ ifyes, keep statistics in the authlog table for connecting users. Value:authlog = no.
๐ File locations
pid_directoryโ directory for storing PID files. Value:pid_directory = /var/run/dbmail.library_directoryโ directory for locating libraries (normally has a sane default compiled-in). Commented:#library_directory =.
๐ Miscellaneous
hash_algorithmโ hashing algorithm. You can select your favorite hash type for generating unique ids for message parts. For valid values checkmhash(3)but minus theMHASH_prefix. If you ever change this value rundbmail-util --rehashto update the hash for all mimeparts. Examples:MD5,SHA1,SHA256,SHA512,TIGER,WHIRLPOOL. Commented:# hash_algorithm = SHA1.header_cache_readonlyโ header_cache tuning. Setheader_cache_readonlyto'yes'to prevent new unknown header-names from being cached. Commented:# header_cache_readonly = yes.message_part_hashโ message storing into database. In order to decrease storage, individual parts of the email are stored in such a way that reduces the spaces.0= default behaviour, check hash, size and content1= check hash and size. starting from sha1 should be ok and having a hash having the same size has a low probability2= do not check any, just insert, is the fatest but takes a lot of space.
Commented: #message_part_hash = 0.
๐ฌ [LMTP] ๐ฌ
Short and sweet:
[LMTP]
port = 24
#tls_port =
portโ value:port = 24.tls_portโ commented out:#tls_port =.
๐ฅ [IMAP] ๐ฅ
mailbox_update_strategyโ IMAP State Reload Strategy. Internally DBMail is loading various information about the selected folders (flags, message ids, etc).1= full reload (default)2= diff reload (experimental). In some setups it might be beneficial to use it, due to the fact that reloading is done in differential mode, which may result in lower DB usage.
Commented: # mailbox_update_strategy = 1.
mailbox_search_strategyโ IMAP Search strategy.1= full sql search (default). All searches performed on the current folder are made via sql queries.2= optimized search, use partial sql search (experimental). Some searches will be made via loaded state of the current folder. In some setups it might be beneficial to use it, due to lower DB usage.
Commented: # mailbox_search_strategy = 1.
mailbox_update_strategy_2_max_iterations = 64(commented out) โ this one only exists for the IMAP Reload Strategy (mailbox_search_strategy = 2). Doing a full reload after n iterations can be a vibe, and sometimes reloading the full state reload is the move.-1= no expiration, no cap, live forever โจ.x= number of iterations, and heads up: if no mails are received (IDLE Server) those iterations can be transformed into seconds. The math, bestie:
mailbox_update_strategy_2_max_iterations * idle_timeout * idle_interval = s
command_select_allow_unseen = 1(commented out) โ lets you reportUNSEENin the SELECT command. Even though RFC 3501 literally states it's mandatory, if it's missing the client has to go issue a whole search for the unseen messages.1= allowUNSEENin SELECT Command (this is the default โ ),0= do not allowUNSEENin SELECT Command.command_store_flags_silent_ignore_silent = 0(commented out) โ for those moments when a client fires off aUID STORE xxxxx FLAGS.SILENTbut then wants the flags afterwards anyway (lowkey their issue, e.g. Outlook ๐).0= don't ignore the.SILENTpart and don't return flags onUID FETCH(default),1= ignore the.SILENTpart and returnFLAGSon the next fetch (usually it helps with the set read reverting back to unread until folder sync, iykyk).mailbox_update_seq_strategy = 1(commented out) โ the Mailbox Sequence update strategy.1= normal behaviour, transactional safe ๐ซถ.2= non-transaction, still safe, and honestly might be better in clustered environments.mailbox_sync_deleted = 1(commented out) โ Mailbox DELETE and message status synchronization. Sometimes messages marked as deleted aren't actually carrying the deleted status ๐ญ.1= normal, don't sync.2= sync.mailbox_sync_batch_size = 64(commented out) โ used whenmailbox_sync_deleted=2, sets the size of the batch. > Because this flag is making correction live, protection should be put in place. Not a drill ๐banner = imap 4r1 server (dbmail 3.4.x)(commented out) โ set a whole alternate banner to display when connecting to the service. Customize your little greeting, main character energy ๐port = 143โ the port to bind to. That's the real one, uncommented, doing its job ๐tls_port = 993(commented out) โ the TLS sibling of the above.timeout = 4000โ IMAP prefers a longer timeout than other services. It's just built different.imap_before_smtp = noโ ifyes, allows SMTP access from the host IP connecting by IMAP. Heads up: this requires additional configuration of your MTA.idle_timeout = 30(commented out) โ during IDLE, how many seconds between checking the mailbox status (default:30).idle_interval = 10(commented out) โ during IDLE, how often should the server send an'* OK'still here message (default:10). The time between such a message isidle_timeout * idle_intervalseconds.login_disabled = yes(commented out) โ if TLS is enabled, login before starttls is normally not allowed. Uselogin_disabled=noto change that.enable_cram_md5 = yes(commented out) โ there's support forAUTH=CRAM-MD5in the code, but the mechanism is officially deprecated, so you may want to disable it withenable_cram_md5=nohere. Deprecated means deprecated, no cap ๐ฉcapability = IMAP4 IMAP4rev1 AUTH=LOGIN ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE(commented out) โ provides aCAPABILITYto override the default. Iconic string, do not touch a single character โจmax_message_size =(commented out) โ the max message size accepted by the IMAP daemon duringAPPENDcommands. Supported formats are: decimal1000000, octal03777777, hex0xfffff. Pick your fighter ๐
๐๏ธ [SIEVE] ๐๏ธ
port = 4190โ the port to bind to. Short, sweet, slaying.
๐ [LDAP] ๐
URI = ldap://127.0.0.1:389(commented out) andURI = ldapi://%2fvar%2frun%2fopenldap%2fldapi/(commented out) โ if your LDAP library supportsldap_initialize(), you can use the LDAP server DSN like this.uri = ldap://example.com/โ the live one, uncommented and ready ๐port = 389(commented out),version = 3(commented out),hostnam = ldap(commented out),base_dn = ou=People,dc=example,dc=com(commented out) โ these are available if your LDAP library doesn't support URIs. (and yes,hostnamis spelled exactly like that in the file โ we don't fix it, we respect it ๐ซถ)bind_dn =โ leave blank for anonymous bind. Example:cn=admin,dc=mydomain,dc=com.bind_pw =โ leave blank for anonymous bind. (yes, also blank-able, twins ๐)scope = SubTreeโ the search scope.referrals = yesโ AD users may want to set this to'no'to disable ldap referrals if you're seeing'Operations errors'in your logs.user_objectclass = top,account,inetOrgPersonโ the objectclass used for users.forw_objectclass = top,account,dbmailUserโ the objectclass used for forwards.cn_string = uidโ the attribute used for the CN string.field_passwd = userPasswordโ the field holding the password.field_uid = uidโ the field holding the uid.field_nid = uidNumberโ the field holding the numeric id.min_nid = 10000โ lower bound on those numeric ids.max_nid = 15000โ upper bound. Range:10000โ15000, cute and contained โจfield_cid = gidNumberโ the field holding the numeric group id.min_cid = 10000โ lower bound.max_cid = 15000โ upper bound.field_mail = mailโ a comma-separated list of attributes to match when searching for users or forwards that match a delivery address. A match on any of them is a hit ๐ฏfield_quota = mailQuotaโ the field that holds the mail-quota size for a user.field_fwdtarget = mailForwardingAddressโ the field that holds the forwarding address.query_string = (mail=%s)(commented out) โ override the query string used to search for users or forwards with a delivery address.
๐ฌ [DELIVERY] ๐ฌ
SIEVE = yesโ run Sieve scripts as messages are delivered.SUBADDRESS = yesโ use the'user+mailbox@domain'format to deliver to a mailbox. Subaddressing, we love her ๐SIEVE_VACATION = yesโ turn on/off the Sieve Vacation extension.SIEVE_NOTIFY = noโ turn on/off the Sieve Notify extension.SIEVE_DEBUG = noโ turn on/off additional Sieve debugging.AUTO_NOTIFY = noโ use theauto_notifytable to send email notifications.AUTO_REPLY = noโ use theauto_replytable to send away messages.AUTO_NOTIFY_SUBJECT =(commented out) โ defaults to"NEW MAIL NOTIFICATION".AUTO_NOTIFY_SENDER =(commented out) โ defaults toPOSTMASTERfrom theDBMAILsection.suppress_duplicates = noโ if you set this to'yes', dbmail will check for duplicate messages in the relevant mailbox during delivery using theMessage-IDheader. No more double-delivery jumpscares ๐quota_failure = hardโ soft or hard bounce on over-quota delivery. Options are literallysoftorhard, and the file ships withhard.
๐ฎ [POP] ๐ฎ
port = 110โ port to bind to.tls_port = 995(commented out) โ the TLS one.banner = DBMAIL pop3 server ready to rock(commented out) โ set an alternate banner to display when connecting to the service. "ready to rock" is genuinely the energy we're going for ๐คlogin_disabled = no(commented out) โ if TLS is enabled, login before starttls is normally allowed. Uselogin_disabled=yesto change this. (notice this one flips the other way from IMAP, don't get it twisted ๐)pop_before_smtp = noโ ifyes, allows SMTP access from the host IP connecting by POP3. This requires additional configuration of your MTA.
๐ [HTTP] ๐
port = 41380โ port to bind to.bindip = 127.0.0.1โ the httpd daemon provides full access to all users, mailboxes and messages. > Be very careful with this one! Like, genuinely ๐ Full access to everything, so keep that bind tight.admin = admin:secretโ the admin credentials,username:passwordstyle.
# end of configuration file
And that's the whole config file, bestie. You made it ๐
๐ SEE ALSO ๐
dbmail(1), dbmail.conf(5), dbmail-deliver(1), dbmail-export(8), dbmail-httpd(8), dbmail-imapd(8), dbmail-lmtpd(8), dbmail-pop3d(8), dbmail-sieved(8), dbmail-sievecmd(8), dbmail-users(8), dbmail-util(8)
Go read them, they're all part of the family ๐ซถ
๐ BUGS ๐
For the latest announcements, please subscribe to the DBMail announce mailing list.
For general discussion, please subscribe to the DBMail general mailing list.
If you experience an issue with DBMail, please report it on the DBMail Bug Tracker. It may be helpful to have a debug log available. (Translation: bring receipts, the logs are the receipts ๐โจ)
๐ LICENSE ๐
DBMail and its components are distributed under the terms of the GNU General Public License Version 2. Copyrights are held variously by the authors listed below.
๐ AUTHOR(S) ๐
DBMail is a collaborative effort among the core developers listed below and the tremendous help of the testers, patchers and bug hunters listed in the AUTHORS and THANKS files found in the DBMail source distribution. Group project, and everyone ate ๐
Alan Hicks Persistent Objects Ltd https://p-o.co.uk
Eelco van Beek Aaron Stone Paul J Stevens
Roel Rozendaal Open Source Engineer NFG Net Facilities Group BV
Ilja Booij Palo Alto, CA USA http://www.nfg.nl
IC&S http://www.ic-s.nl
โ๏ธ AUTHOR โ๏ธ
Alan Hicks <ahicks@p-o.co.uk> โ Author.
๐ NOTES ๐
- DBMail announce mailing list โ
https://dbmail.org/wws/info/dbmail-announce/ - DBMail general mailing list โ
https://dbmail.org/wws/info/dbmail-general/ - DBMail Bug Tracker โ
https://github.com/dbmail/dbmail/issues
and that's a wrap on DBMAIL.CONF(5) ๐ฆ this beauty is dated 08/28/2026, and you found her under section DBMAIL.CONF(5) โ go forth, configure responsibly, and don't touch [HTTP] admin unless you mean it ๐โจ
๐ฆ where this page comes from
- arch rolling: dbmail 3.5.6-2 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms