OS Manuals

/usr/bin/mailpit

An email and SMTP testing tool with API for developers

From mailpit-fips 1.33.1-r1 (enterprise-packages), captured 2026-11-09 by running mailpit --help (exit 0). permalink

Mailpit is an email testing tool for developers.

It acts as an SMTP server, and provides a web interface to view all captured emails.

Documentation:
  https://github.com/axllent/mailpit
  https://mailpit.axllent.org/docs/

Usage:
  mailpit [flags]
  mailpit [command]

Available Commands:
  dump        Dump all messages from a database to a directory
  ingest      Ingest a file or folder of emails for testing
  readyz      Run a healthcheck to test if Mailpit is running
  reindex     Reindex the database
  sendmail    A sendmail command replacement for Mailpit
  version     Display the current version & update information

Flags:
  -d, --database string                                Database to store persistent data
      --disable-wal[=true|false]                       Disable WAL for local database (allows NFS mounted DBs)
      --disable-version-check[=true|false]             Disable version update checking
      --disable-auto-vacuum[=true|false]               Disable auto-VACUUM for the database
      --compression int                                Compression level to store raw messages (0-3) (default 1)
      --label string                                   Optional label identify this Mailpit instance
      --tenant-id string                               Database tenant ID to isolate data
  -m, --max int                                        Max number of messages to store (default 500)
      --max-age string                                 Max age of messages in either (h)ours or (d)ays (eg: 3d)
      --max-message-size int                           Maximum message size in MB (0 = unlimited) (default 50)
      --use-message-dates[=true|false]                 Use message dates as the received dates
      --ignore-duplicate-ids[=true|false]              Ignore duplicate messages (by Message-ID)
      --log-file string                                Log output to file instead of stdout
  -q, --quiet[=true|false]                             Quiet logging (errors only)
  -v, --verbose[=true|false]                           Verbose logging
  -l, --listen string                                  HTTP bind interface & port for UI (default "[::]:8025")
      --allowed-hosts string                           Allowlist of Host header values, comma-separated (mitigates DNS rebinding)
      --webroot string                                 Set the webroot for web UI & API (default "/")
      --ui-auth-file string                            A password file for web UI & API authentication
      --ui-tls-cert string                             TLS certificate for web UI (HTTPS) - requires ui-tls-key
      --ui-tls-key string                              TLS key for web UI (HTTPS) - requires ui-tls-cert
      --api-cors string                                Set CORS origin(s) for the API, comma-separated (eg: example.com,foo.com)
      --block-remote-css-and-fonts[=true|false]        Block access to remote CSS & fonts
      --allow-internal-http-requests[=true|false]      Allow link checker, HTML checker & screenshots to access internal IP addresses
      --disable-link-check-rate-limit[=true|false]     Disable the per-domain rate limiter and result cache used by the link checker
      --enable-spamassassin string                     Enable integration with SpamAssassin (<host>:<port>)
      --enable-rspamd string                           Enable integration with Rspamd (https://<password>@<host>:<port>)
      --allow-untrusted-tls[=true|false]               Do not verify HTTPS certificates (link checker & screenshots)
      --disable-http-compression[=true|false]          Disable HTTP compression support (web UI & API)
      --hide-delete-all-button[=true|false]            Hide the "Delete all" button in the web UI
      --send-api-auth-file string                      A password file for Send API authentication
      --send-api-auth-accept-any[=true|false]          Accept any username and password for the Send API endpoint, including none
  -s, --smtp string                                    SMTP bind interface and port (default "[::]:1025")
      --smtp-auth-file string                          A password file for SMTP authentication
      --smtp-auth-accept-any[=true|false]              Accept any SMTP username and password, including none
      --smtp-tls-cert string                           TLS certificate for SMTP (STARTTLS) - requires smtp-tls-key
      --smtp-tls-key string                            TLS key for SMTP (STARTTLS) - requires smtp-tls-cert
      --smtp-require-starttls[=true|false]             Require SMTP client use STARTTLS
      --smtp-require-tls[=true|false]                  Require client use SSL/TLS
      --smtp-auth-allow-insecure[=true|false]          Allow insecure PLAIN & LOGIN SMTP authentication
      --smtp-strict-rfc-headers[=true|false]           Return SMTP error if message headers contain <CR><CR><LF>
      --smtp-max-recipients int                        Maximum SMTP recipients allowed (default 100)
      --smtp-allowed-recipients string                 Only allow SMTP recipients matching a regular expression (default allow all)
      --smtp-ignore-rejected-recipients[=true|false]   Ignore rejected SMTP recipients with 2xx response
      --smtp-disable-rdns[=true|false]                 Disable SMTP reverse DNS lookups
      --smtp-relay-config string                       SMTP relay configuration file to allow releasing messages
      --smtp-relay-all[=true|false]                    Auto-relay all new messages via external SMTP server (caution!)
      --smtp-relay-matching string                     Auto-relay new messages to only matching recipients (regular expression)
      --smtp-forward-config string                     SMTP forwarding configuration file for all messages
      --enable-chaos[=true|false]                      Enable Chaos functionality (API / web UI)
      --chaos-triggers string                          Enable Chaos & set the triggers for SMTP server
      --pop3 string                                    POP3 server bind interface and port (default "[::]:1110")
      --pop3-auth-file string                          A password file for POP3 server authentication (enables POP3 server)
      --pop3-tls-cert string                           Optional TLS certificate for POP3 server - requires pop3-tls-key
      --pop3-tls-key string                            Optional TLS key for POP3 server - requires pop3-tls-cert
  -t, --tag string                                     Tag new messages matching filters
      --tags-config string                             Load tags filters from yaml configuration file
      --tags-title-case[=true|false]                   TitleCase new tags generated from plus-addresses and X-Tags
      --tags-disable string                            Disable auto-tagging, comma separated (eg: plus-addresses,x-tags)
      --tags-username[=true|false]                     Auto-tag messages with the authenticated username
      --enable-prometheus string                       Enable Prometheus metrics: true|false|<ip:port> (eg:'0.0.0.0:9090')
      --webhook-url string                             Send a webhook request for new messages
      --webhook-limit int                              Limit webhook requests per second (default 1)
      --webhook-delay int                              Delay in seconds before sending webhook requests (default 0)

Use "mailpit [command] --help" for more information about a command.
Options (64)
OptionDescriptionSource
-d, --database stringDatabase to store persistent datahelp
--disable-wal true|falseDisable WAL for local database (allows NFS mounted DBs)help
--disable-version-check true|falseDisable version update checkinghelp
--disable-auto-vacuum true|falseDisable auto-VACUUM for the databasehelp
--compression intCompression level to store raw messages (0-3) (default 1)help
--label stringOptional label identify this Mailpit instancehelp
--tenant-id stringDatabase tenant ID to isolate datahelp
-m, --max intMax number of messages to store (default 500)help
--max-age stringMax age of messages in either (h)ours or (d)ays (eg: 3d)help
--max-message-size intMaximum message size in MB (0 = unlimited) (default 50)help
--use-message-dates true|falseUse message dates as the received dateshelp
--ignore-duplicate-ids true|falseIgnore duplicate messages (by Message-ID)help
--log-file stringLog output to file instead of stdouthelp
-q, --quiet true|falseQuiet logging (errors only)help
-v, --verbose true|falseVerbose logginghelp
-l, --listen stringHTTP bind interface & port for UI (default "[::]:8025")help
--allowed-hosts stringAllowlist of Host header values, comma-separated (mitigates DNS rebinding)help
--webroot stringSet the webroot for web UI & API (default "/")help
--ui-auth-file stringA password file for web UI & API authenticationhelp
--ui-tls-cert stringTLS certificate for web UI (HTTPS) - requires ui-tls-keyhelp
--ui-tls-key stringTLS key for web UI (HTTPS) - requires ui-tls-certhelp
--api-cors stringSet CORS origin(s) for the API, comma-separated (eg: example.com,foo.com)help
--block-remote-css-and-fonts true|falseBlock access to remote CSS & fontshelp
--allow-internal-http-requests true|falseAllow link checker, HTML checker & screenshots to access internal IP addresseshelp
--disable-link-check-rate-limit true|falseDisable the per-domain rate limiter and result cache used by the link checkerhelp
--enable-spamassassin stringEnable integration with SpamAssassin (<host>:<port>)help
--enable-rspamd stringEnable integration with Rspamd (https://<password>@<host>:<port>)help
--allow-untrusted-tls true|falseDo not verify HTTPS certificates (link checker & screenshots)help
--disable-http-compression true|falseDisable HTTP compression support (web UI & API)help
--hide-delete-all-button true|falseHide the "Delete all" button in the web UIhelp
--send-api-auth-file stringA password file for Send API authenticationhelp
--send-api-auth-accept-any true|falseAccept any username and password for the Send API endpoint, including nonehelp
-s, --smtp stringSMTP bind interface and port (default "[::]:1025")help
--smtp-auth-file stringA password file for SMTP authenticationhelp
--smtp-auth-accept-any true|falseAccept any SMTP username and password, including nonehelp
--smtp-tls-cert stringTLS certificate for SMTP (STARTTLS) - requires smtp-tls-keyhelp
--smtp-tls-key stringTLS key for SMTP (STARTTLS) - requires smtp-tls-certhelp
--smtp-require-starttls true|falseRequire SMTP client use STARTTLShelp
--smtp-require-tls true|falseRequire client use SSL/TLShelp
--smtp-auth-allow-insecure true|falseAllow insecure PLAIN & LOGIN SMTP authenticationhelp
--smtp-strict-rfc-headers true|falseReturn SMTP error if message headers contain <CR><CR><LF>help
--smtp-max-recipients intMaximum SMTP recipients allowed (default 100)help
--smtp-allowed-recipients stringOnly allow SMTP recipients matching a regular expression (default allow all)help
--smtp-ignore-rejected-recipients true|falseIgnore rejected SMTP recipients with 2xx responsehelp
--smtp-disable-rdns true|falseDisable SMTP reverse DNS lookupshelp
--smtp-relay-config stringSMTP relay configuration file to allow releasing messageshelp
--smtp-relay-all true|falseAuto-relay all new messages via external SMTP server (caution!)help
--smtp-relay-matching stringAuto-relay new messages to only matching recipients (regular expression)help
--smtp-forward-config stringSMTP forwarding configuration file for all messageshelp
--enable-chaos true|falseEnable Chaos functionality (API / web UI)help
--chaos-triggers stringEnable Chaos & set the triggers for SMTP serverhelp
--pop3 stringPOP3 server bind interface and port (default "[::]:1110")help
--pop3-auth-file stringA password file for POP3 server authentication (enables POP3 server)help
--pop3-tls-cert stringOptional TLS certificate for POP3 server - requires pop3-tls-keyhelp
--pop3-tls-key stringOptional TLS key for POP3 server - requires pop3-tls-certhelp
-t, --tag stringTag new messages matching filtershelp
--tags-config stringLoad tags filters from yaml configuration filehelp
--tags-title-case true|falseTitleCase new tags generated from plus-addresses and X-Tagshelp
--tags-disable stringDisable auto-tagging, comma separated (eg: plus-addresses,x-tags)help
--tags-username true|falseAuto-tag messages with the authenticated usernamehelp
--enable-prometheus stringEnable Prometheus metrics: true|false|<ip:port> (eg:'0.0.0.0:9090')help
--webhook-url stringSend a webhook request for new messageshelp
--webhook-limit intLimit webhook requests per second (default 1)help
--webhook-delay intDelay in seconds before sending webhook requests (default 0)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.