Monday, 11 July 2011

Clearing out the old mail queue

Never got the hang of executing stuff from inside awk until now... this searches all the queued mail for a specific string that we think we can discard, then calls rm with the filename. not pretty or clever but functional.

grep /opt/zimbra/libexec/zmqueuelog *|awk -F \: '{system("rm " $1)}'

No comments:

Post a Comment