Find flagged message subjects in maildir
Simple, perhaps slightly cryptic oneliner to get the subjects of all flagged messages in a Maildir. It assumes that 'F' is the flag for flagged messages (as it almost always is) and that your message files end with ":2,".
find ~/Maildir -type f -name "*:2,*F*" -exec egrep -h "^Subject:" "{}" ";" | cut -c 10-