Thursday, March 31, 2005

postfix queue operations and tools

Tonight I found a utility called mailq (http://mail.python.org/pipermail/mailman-developers/2002-January/010542.html) (not quite the same as the mailq that comes with postfix). To remove the name conflict, I renamed this to mq and placed it in the /usr/local/bin directory. This utility can scan the postfix queue and report on the contents using a regex to filter the output by domain or e-mail address. Using mq with postcat (postcat -q `mq -i e-mail@domain.tld`) can be used to print the content of queued e-mails. The should be helpful for creating a web interface for monitoring the queue status. Also used with postsuper messages can be deleted (postsuper -d) or placed on hold (postsuper -h).

No comments: