OS Manuals

/usr/bin/mailpit

An email and SMTP testing tool with API for developers

From mailpit 1.30.1-r4 (os), captured 2026-11-05 by running mailpit --help (exit 0). permalink

Also provided by 2 other package versions
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                       Disable WAL for local database (allows NFS mounted DBs)
      --disable-version-check             Disable version update checking
      --disable-auto-vacuum               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                 Use message dates as the received dates
      --ignore-duplicate-ids              Ignore duplicate messages (by Message-ID)
      --log-file string                   Log output to file instead of stdout
  -q, --quiet                             Quiet logging (errors only)
  -v, --verbose                           Verbose logging
  -l, --listen string                     HTTP bind interface & port for UI (default "[::]:8025")
      --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        Block access to remote CSS & fonts
      --allow-internal-http-requests      Allow link checker, HTML checker & screenshots to access internal IP addresses
      --enable-spamassassin string        Enable integration with SpamAssassin
      --allow-untrusted-tls               Do not verify HTTPS certificates (link checker & screenshots)
      --disable-http-compression          Disable HTTP compression support (web UI & API)
      --hide-delete-all-button            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          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              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             Require SMTP client use STARTTLS
      --smtp-require-tls                  Require client use SSL/TLS
      --smtp-auth-allow-insecure          Allow insecure PLAIN & LOGIN SMTP authentication
      --smtp-strict-rfc-headers           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   Ignore rejected SMTP recipients with 2xx response
      --smtp-disable-rdns                 Disable SMTP reverse DNS lookups
      --smtp-relay-config string          SMTP relay configuration file to allow releasing messages
      --smtp-relay-all                    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                      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                   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                     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 (61)
OptionDescriptionSource
-d, --database stringDatabase to store persistent datahelp
--disable-walDisable WAL for local database (allows NFS mounted DBs)help
--disable-version-checkDisable version update checkinghelp
--disable-auto-vacuumDisable 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-datesUse message dates as the received dateshelp
--ignore-duplicate-idsIgnore duplicate messages (by Message-ID)help
--log-file stringLog output to file instead of stdouthelp
-q, --quietQuiet logging (errors only)help
-v, --verboseVerbose logginghelp
-l, --listen stringHTTP bind interface & port for UI (default "[::]:8025")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-fontsBlock access to remote CSS & fontshelp
--allow-internal-http-requestsAllow link checker, HTML checker & screenshots to access internal IP addresseshelp
--enable-spamassassin stringEnable integration with SpamAssassinhelp
--allow-untrusted-tlsDo not verify HTTPS certificates (link checker & screenshots)help
--disable-http-compressionDisable HTTP compression support (web UI & API)help
--hide-delete-all-buttonHide the "Delete all" button in the web UIhelp
--send-api-auth-file stringA password file for Send API authenticationhelp
--send-api-auth-accept-anyAccept 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-anyAccept 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-starttlsRequire SMTP client use STARTTLShelp
--smtp-require-tlsRequire client use SSL/TLShelp
--smtp-auth-allow-insecureAllow insecure PLAIN & LOGIN SMTP authenticationhelp
--smtp-strict-rfc-headersReturn 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-recipientsIgnore rejected SMTP recipients with 2xx responsehelp
--smtp-disable-rdnsDisable SMTP reverse DNS lookupshelp
--smtp-relay-config stringSMTP relay configuration file to allow releasing messageshelp
--smtp-relay-allAuto-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-chaosEnable 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-caseTitleCase new tags generated from plus-addresses and X-Tagshelp
--tags-disable stringDisable auto-tagging, comma separated (eg: plus-addresses,x-tags)help
--tags-usernameAuto-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.