Count total number of emails in queue with a specific subject line?
Hello.
I only find
but please, how I can count the number of emails in queue with "*some string in subject*" ?? After of I know the number total, then I want please the line/command to remove this emails in queue filtering by "*some string in subject*", no by "*some string in BODY*" in body. is possible? Thanks
exiqgrep -i |awk '{ print "exim -Mvh "$1 }' |sh |grep -i 'here subject EXACT'but please, how I can count the number of emails in queue with "*some string in subject*" ?? After of I know the number total, then I want please the line/command to remove this emails in queue filtering by "*some string in subject*", no by "*some string in BODY*" in body. is possible? Thanks
-
I guess this should work to get what you are expecting here: - To get the count of emails in queue with a specific subject: exiqgrep -i | awk '{print "exim -Mvh "$1}' | sh | grep "Subject:" | awk -F"Subject:" '{print $2}' | grep -c "STRING YOU WISH TO MATCH"
- To remove the emails matches with a subject from queue:grep -lri "STRING YOU WISH TO MATCH" /var/spool/exim/ | grep input | cut -d"/" -f7 | awk -F"-" '{print $1"-"$2"-"$3}' | uniq -c | awk '{print $2}' | xargs exim -Mrm0 -
Thanks @Muhammed Fasal for the helpful response! @000 let us know if that helps or if you have further questions/concerns 0 -
Thanks @Muhammed Fasal for the helpful response! @000 let us know if that helps or if you have further questions/concerns
The excellent help from @Muhammed Fasal it"s very well!! Thanks very much by your time :-)0
Please sign in to leave a comment.
Comments
3 comments