Cookies help us deliver our better services. By using our site, you agree to our use of cookies.

Extract all destinations (email recipients) from Postfix queue

To extract all destinations (i.e., the recipients) from the Postfix mail queue (mailq), you can use the following Bash one-liner:

mailq | awk '/^[A-F0-9]/ {in_msg=1; next} in_msg && /^[ \t]*[^ ]+@[^ ]+/ {print $1}' | sort | uniq

E ...

How to configure OpenDKIM with Postfix on Debian 12 (bookworm)

Here is a step by step guide to configure OpenDKIM with Postfix on Debian 12 bookworm.

We're gonna modify default configuration files to keep only minimal or required settings.

Install openDKIM

sudo apt-get install opendkim opendkim-tools

Conf ...

Delete messages from Postfix queue by sender address and recipient domain

Ever wanted to delete all messages from Postfix queue by sender email address and recipient domain ?

Today, I did ... and below you can find a handful script for this purpose.

Tools needed: grep, awk, mailq and postsuper.


In a hu ...