Show every Postfix log line for a queue ID
Build a paste-ready command, then review its compatibility and effects before running it.
grep -F <postfix-queue-id> /var/log/mail.logComplete required fields to copy the generated command.
read-onlyno known side effects Compatibility
Postfix text logsUse the queue ID printed by qmgr, smtpd, cleanup, smtp, local, or other Postfix services.
Operational knowledgereview due 2027-01-19
Requirementsgrepgrep must be installed and available on PATH.
Version supportgrep Current supported releasesVerified for linux using posix, bash, zsh syntax; consult compatibility notes for platform-specific differences.
Expected signalsJul 23 09:18:31 mail postfix/qmgr[2142]: 4D92A2F18C: from=<alice@example.com>, size=1842, nrcpt=1Representative successful output; values vary with the selected target and system state.
Known errorsgrep: command not foundgrep is missing or is not available on PATH.
Verifygrep -F {{queueId}} {{logFile}}The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01grepCommandRuns the grep stage of this one-liner.
02-FOptionTreats the search value as a fixed string instead of a pattern.
03<postfix-queue-id>ParameterA value supplied in the Fill parameters section.
04<postfix-log-file>ParameterA value supplied in the Fill parameters section.
Example input
grep -F 4D92A2F18C /var/log/mail.log
Example output
Jul 23 09:18:31 mail postfix/qmgr[2142]: 4D92A2F18C: from=<alice@example.com>, size=1842, nrcpt=1
Jul 23 09:18:33 mail postfix/smtp[2208]: 4D92A2F18C: to=<bob@example.net>, status=sent
Jul 23 09:18:33 mail postfix/qmgr[2142]: 4D92A2F18C: removed
Illustrative output — exact values vary by system and data.
Official sources
Related commands