Skip to content

Instantly share code, notes, and snippets.

@gdugas
Created September 20, 2013 13:34
Show Gist options
  • Save gdugas/6637645 to your computer and use it in GitHub Desktop.
Save gdugas/6637645 to your computer and use it in GitHub Desktop.
#! /bin/sh
domain=example.com
rt=/var/qmail/mailnames/$domain
postqueue -p | grep ^[A-Z0-9] | grep $domain | while read line; do
id=`echo $line | awk '{print $1}' | sed 's/\*//'`
user=`echo $line | awk '{print $7}' | awk -F '@' '{print $1}'`
if [ ! -d $rt/$user ]; then
postsuper -d $id
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment