Wednesday, March 1, 2017

Cleanup a postfix mail queue




  1. Do you need to cleanup a postfix mail queue?

    To delete all email from one specific email address, or all email From: a specific domain name, please choose the appropriate command from the following list.

    To delete all email in the queue from a domain run this command as root:

    postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /@example\.com/ { print $1 }' | tr -d '*!' | postsuper -d -

    To delete all email in the queue From: a specific email address run this command as root:

    postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /username@example\.com/ { print $1 }' | tr -d '*!' | postsuper -d -


    To delete ALL email from the queue regardless of domain name or email address use:


    postsuper -d ALL 


1 comment:

zephanbabine said...

Casino Tycoon 2021 - Mapyro
Casino Tycoon 창원 출장샵 2021 제주도 출장안마 – Find out the best 상주 출장안마 Casino Tycoon in America, compare promo code offers, game variety, You can bet with these Software: Microgaming, NetEnt, Evolution, Playtech, BetConstruct, Microgaming, NetEnt, 목포 출장안마 PlaytechGame 속초 출장마사지 Type: Video slotsSpecial feature: No deposit bonus