DBMAIL.CONF(5)

๐Ÿ“ฆ version 3.5.6, in arch rolling

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 are sql and ldap. The openldap client supports many ldap servers including OpenLDAP and Microsoft Active Directory. If you choose ldap, 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. Use 127.0.0.1 for 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. See listen(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 โ€” if yes, resolves IP addresses to DNS names when logging. Value: resolve_ip = no.
  • reuseport โ€” if yes, 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 in openssl-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 have default_msg_encoding. i.e. iso8859-1, utf8. Value: default_msg_encoding = utf8.
  • allow_invalid_messages โ€” only valid emails are accepted. Set allow_invalid_messages to yes to 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_host to 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/sendmail works 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 = Emergency
  • 2 = Alert
  • 4 = Critical
  • 8 = Error
  • 16 = Warning
  • 32 = Notice
  • 64 = Info
  • 128 = Debug
  • 256 = Database -> Logs at debug level

Examples:

  • 0 = Nothing
  • 31 = Emergency + Alert + Critical + Error + Warning
  • 511 = Everything
  • query_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 than query_timeout seconds. 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_connect succeeds on the last retry after ~50s of backoff plus a 3s ping 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. 90 clears 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 โ€” if yes, 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 check mhash(3) but minus the MHASH_ prefix. If you ever change this value run dbmail-util --rehash to update the hash for all mimeparts. Examples: MD5, SHA1, SHA256, SHA512, TIGER, WHIRLPOOL. Commented: # hash_algorithm = SHA1.
  • header_cache_readonly โ€” header_cache tuning. Set header_cache_readonly to '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 content
    • 1 = check hash and size. starting from sha1 should be ok and having a hash having the same size has a low probability
    • 2 = 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 report UNSEEN in 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 = allow UNSEEN in SELECT Command (this is the default โœ…), 0 = do not allow UNSEEN in SELECT Command.
  • command_store_flags_silent_ignore_silent = 0 (commented out) โ€” for those moments when a client fires off a UID STORE xxxxx FLAGS.SILENT but then wants the flags afterwards anyway (lowkey their issue, e.g. Outlook ๐Ÿ™ˆ). 0 = don't ignore the .SILENT part and don't return flags on UID FETCH (default), 1 = ignore the .SILENT part and return FLAGS on 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 when mailbox_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 โ€” if yes, 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 is idle_timeout * idle_interval seconds.
  • login_disabled = yes (commented out) โ€” if TLS is enabled, login before starttls is normally not allowed. Use login_disabled=no to change that.
  • enable_cram_md5 = yes (commented out) โ€” there's support for AUTH=CRAM-MD5 in the code, but the mechanism is officially deprecated, so you may want to disable it with enable_cram_md5=no here. Deprecated means deprecated, no cap ๐Ÿšฉ
  • capability = IMAP4 IMAP4rev1 AUTH=LOGIN ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE (commented out) โ€” provides a CAPABILITY to 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 during APPEND commands. Supported formats are: decimal 1000000, octal 03777777, hex 0xfffff. Pick your fighter ๐Ÿ’–

๐Ÿ•Š๏ธ [SIEVE] ๐Ÿ•Š๏ธ

  • port = 4190 โ€” the port to bind to. Short, sweet, slaying.

๐Ÿ” [LDAP] ๐Ÿ”

  • URI = ldap://127.0.0.1:389 (commented out) and URI = ldapi://%2fvar%2frun%2fopenldap%2fldapi/ (commented out) โ€” if your LDAP library supports ldap_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, hostnam is 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 the auto_notify table to send email notifications.
  • AUTO_REPLY = no โ€” use the auto_reply table to send away messages.
  • AUTO_NOTIFY_SUBJECT = (commented out) โ€” defaults to "NEW MAIL NOTIFICATION".
  • AUTO_NOTIFY_SENDER = (commented out) โ€” defaults to POSTMASTER from the DBMAIL section.
  • suppress_duplicates = no โ€” if you set this to 'yes', dbmail will check for duplicate messages in the relevant mailbox during delivery using the Message-ID header. No more double-delivery jumpscares ๐Ÿ™ˆ
  • quota_failure = hard โ€” soft or hard bounce on over-quota delivery. Options are literally soft or hard, and the file ships with hard.

๐Ÿ“ฎ [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. Use login_disabled=yes to change this. (notice this one flips the other way from IMAP, don't get it twisted ๐Ÿ‘€)
  • pop_before_smtp = no โ€” if yes, 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:password style.
# 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 ๐Ÿ“Ž

  1. DBMail announce mailing list โ€” https://dbmail.org/wws/info/dbmail-announce/
  2. DBMail general mailing list โ€” https://dbmail.org/wws/info/dbmail-general/
  3. 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