1 2 3 4 5 6 7 8
#!/usr/bin/env sh QUEUEDIR=$HOME/.msmtpqueue for i in $QUEUEDIR/*.mail; do grep -E -s --colour -h '(^From:|^To:|^Subject:)' "$i" || echo "No mail in queue"; echo " " done