> I would like to retrieve the contents of my inbox - the emails' > metadata, sender, subject, date - to stdout, rather than by opening > an application. Can Mutt dump the inbox page? Does it have any way > to return to stdout information about the inbox? Or should I use a > different tool for this?
This doesn't entirely do what you want, and it doesn't involve mutt; however, the command frm -s new /var/mail/$(whoami) will output the "From" and "Subject" lines of all unread messages in /var/mail/$(whoami) to standard output. Or, if you just want the "From" lines: frm -f From -s new /var/mail/$(whoami) There is documentation here: https://mailutils.org/manual/mailutils.txt As I recall, the OP was interested in being notified upon arrival of a response to an e-mail he sent. For this, perhaps for ((;;)) ; do sleep 60 ; frm -f From -s new /var/mail/$(whoami) ; done is suitable to check for a response every minute. This can of course be modified to display only e-mails from a particular sender: for ((;;)) ; do sleep 60 ; frm -f From -s new /var/mail/$(whoami) | egrep -n -e 'friend@example\.org' ; done Best regards, Greg Marks
signature.asc
Description: PGP signature