Zionetrix::Git
Repositories
Help
Report an Issue
postfix_scripts
Code
Commits
Branches
Tags
Search
Tree:
774e0ce
Branches
Tags
master
postfix_scripts
scripts
inspect_user_deferred_mail
Initial commit
Benjamin Renard
commited
774e0ce
at 2016-01-19 19:51:30
inspect_user_deferred_mail
Blame
History
Raw
#!/bin/bash USERNAME="$1" [ -z "$USERNAME" ] && echo "Usage : $0 [username]" && exit 1 echo "Search deferred mail from user $USERNAME ..." for ID in $( username_to_deferred_mailid "$USERNAME" ) do SENDER=$( mailq|egrep ^$ID|awk '{print $7}') [ -z "$SENDER" ] && SENDER="Unkown sender" while true do echo -n "$ID [$SENDER] : (c = cat mail / d = delete mail / K = keap mail / q = quit ) ? " read a case $a in c) postcat -q $ID|less ;; d) postsuper -d $ID break ;; k|"") break ;; q) exit 0 ;; *) echo "Bad choice !" esac done done