Dovecot is misbehaving and the maintainers want a system report, but dovecot-sysreport gathers more than you might expect. You will end up with a compressed report you can inspect and attach to a bug report without overwriting an existing archive.
The examples use dovecot-sysreport from Dovecot 2.3.21, installed by Ubuntu package dovecot-core 1:2.3.21+dfsg1-2ubuntu6.5. Allow about fifteen minutes, plus time to review the archive before sharing it.
Warning: The command collects operational data: process and service status, uptime output, an error log and a stats dump. Treat the archive as sensitive. Do not upload it to a public issue until you have checked its contents and your project's disclosure rules.
Start with a read-only help request. It needs no elevated privileges and confirms the option spelling on this host:
$ command -v dovecot-sysreport
/usr/sbin/dovecot-sysreport
$ dovecot-sysreport --help
dovecot-sysreport [-h|--help] [-o|--core [binary] core [...]] [-d|--destination dest]
[-k|--keeptemp] -- utility to gather information from the current
system to be reported for dovecot bug fixes.
Check the package and server version as well:
$ dpkg-query -W -f='${Package} ${Version}\n' dovecot-core
dovecot-core 1:2.3.21+dfsg1-2ubuntu6.5
$ dovecot --version
2.3.21 (47349e2482)
Checkpoint: The installed manpage documents Dovecot 2.3. Its synopsis contains a typographical inconsistency, but the installed help is clear: use -c for a root configuration file and -o for a core file.
By default, the utility writes dovecot-sysreport-<hostname>-<current_timestamp>.tar.gz in the current directory. Make the destination explicit so the archive does not turn up unexpectedly in a source tree or another shared directory:
$ report_dir="$HOME/dovecot-reports"
$ mkdir -p -- "$report_dir"
$ report="$report_dir/dovecot-sysreport-$(hostname)-$(date +%Y%m%d-%H%M%S).tar.gz"
$ printf 'report path: %s\n' "$report"
report path: /home/you/dovecot-reports/dovecot-sysreport-mail01-20260923-143000.tar.gz
The timestamp in this example is illustrative. Keep the destination new: a report is a generated evidence file, so do not point it at an existing archive you still need.
Tip: Normal report collection does not require sudo. Use elevated privileges only if the command says it cannot read data your host's Dovecot setup needs, and if you do, check the archive's ownership before handing it to another account.
Run the utility with the explicit destination:
$ dovecot-sysreport --destination "$report"
A successful run returns to the shell without an error. The useful verification is the file itself:
$ test -s "$report" && echo 'report created'
report created
$ file "$report"
/home/you/dovecot-reports/dovecot-sysreport-mail01-20260923-143000.tar.gz: gzip compressed data
If you are scripting this, record the exit status straight after the collection command:
$ dovecot-sysreport --destination "$report"
$ status=$?
$ printf 'dovecot-sysreport exit status: %s\n' "$status"
dovecot-sysreport exit status: 0
Warning: A zero status is not permission to publish the archive unreviewed. The report is meant for Dovecot bug fixes, but it may expose host names, paths, service state, log messages or other environment details.
List the archive without extracting it. This is read-only and catches an incomplete or unexpected result:
$ tar -tzf "$report"
.../dovecot-sysreport-ps.txt
.../dovecot-sysreport-service-status.txt
.../dovecot-sysreport-process-status.txt
.../dovecot-sysreport-uptime.txt
.../dovecot-sysreport-error-log.txt
.../dovecot-sysreport-stats.txt
Member names and ordering can vary with the installed Dovecot packaging and the state of the machine. What matters is that tar can read the archive and the expected categories of system information are present. Do not extract an untrusted archive into a working directory without first choosing a dedicated directory and checking the member names.
To read the text, extract into a temporary directory:
$ review_dir="$(mktemp -d)"
$ tar -xzf "$report" -C "$review_dir"
$ find "$review_dir" -type f -maxdepth 2 -print
$ rg -n -i 'password|secret|token|private key|authorization' "$review_dir" || true
The search is only a prompt for manual review. It does not guarantee that sensitive data has been found or removed. Read the relevant files, redact according to the receiving project's instructions, and keep the original locally until you have checked the redacted copy.
Warning: Remove the temporary review directory only after you have finished with it. Deleting it is irreversible.
The optional core mode adds a core file and dependencies extracted from the binary that produced it. Core dumps can contain process memory, so this is a security-sensitive choice. First identify the matching executable and core file without guessing:
$ file /path/to/dovecot-binary /path/to/core-file
/path/to/dovecot-binary: ELF 64-bit LSB pie executable, x86-64, ...
/path/to/core-file: ELF 64-bit LSB core file, x86-64, ...
If the files match the failure under investigation, add them with --core, placing the binary before the core file:
$ dovecot-sysreport --destination "$report" \
--core /path/to/dovecot-binary /path/to/core-file
Use a fresh destination for this run, and do not overwrite the ordinary report. If you do not need crash analysis, omit --core.
Security warning: Do not send a core-containing archive to a third party until the recipient has explicitly asked for it and your handling policy permits it.
When Dovecot uses a configuration root outside the default path, pass that root explicitly with --config:
$ dovecot-sysreport --config /path/to/dovecot.conf \
--destination "$report"
Replace the placeholder with the root configuration file the affected installation uses. Do not pass a directory or a guessed file name. If the standard configuration path is correct, leave --config out. The option changes only where the utility looks for Dovecot configuration; it does not repair a broken configuration or restart a service.
--keeptemp tells the utility not to remove its temporary files at the end. Leave it out for an ordinary report. Use it only when Dovecot support has asked for the intermediate data and you have a specific, protected location for it:
$ dovecot-sysreport --destination "$report" --keeptemp
Temporary files can contain the same sensitive material as the final archive. Find and handle them according to the command's output and your local policy. Once support no longer needs them, remove only the identified temporary files, not an entire unrelated directory. The command without --keeptemp is the safer default.
dovecot-sysreport help.tar -tzf can list it.--config and --keeptemp were used only for a known diagnostic purpose.