#postfix
13 one-liners with this tag.
All one-liners tagged postfix
Delete a single message from the Postfix queue
#postsuper -d 4F2A31C0E12
Delete all deferred mail from the Postfix queue
#postsuper -d ALL deferred
Delete all mail from one sender in the Postfix queue
#postqueue -p | awk -v s="info@example.com" '/^[0-9A-Za-z]/ && $7 == s {print $1}' | tr -d '*!' | postsuper -d -
Find a hacked mail account by its SMTP logins
#grep -o "sasl_username=[^ ,]*" /var/log/maillog | sort | uniq -c | sort -rn | head -20
Find permanently rejected emails in the mail log
#grep "status=bounced" /var/log/maillog | tail -n 20
Find the top senders in the Postfix queue
$postqueue -p | awk '/^[0-9A-Za-z]/ {print $7}' | sort | uniq -c | sort -rn | head -20
Flush the Postfix queue and retry delivery now
$postqueue -f
Regenerate the mail configuration in Plesk (mchk)
#plesk sbin mchk --with-spam
Send a test email from the command line
$printf "Subject: Testmail von %s\n\nTest\n" "$(hostname -f)" | sendmail admin@example.com
Show the Postfix mail queue
$postqueue -p
Trace delivery for an email address in the mail log
#grep -i "info@example.com" /var/log/maillog | tail -n 50
Trace local PHP mail sending to a system user
#grep "postfix/pickup" /var/log/maillog | grep -o "uid=[0-9]*" | sort | uniq -c | sort -rn | head -10
View the content of a message in the Postfix queue
#postcat -q 4F2A31C0E12