5

How would I go about parsing new message subject lines non-interactively using Mutt?

Mutt is already configured and fetches mail from our Exchange server.

What I'd like is for an action to be triggered when a message arrives in my inbox with a certain subject line.

And this would have to be non-interactive, as it is for scripting purposes.

Any and all help is appreciated. I have Googled extensively but to no avail.

Thank you!

1 Answer 1

6

Is is critical that it's mutt that does this? Performing actions when email arrives (that matches certain criteria) is otherwise precisely what procmail is for.

Here is a guide that shows you how to use fetchmail in conjunction with procmail to do filtering of emails that come from a remote mailbox:

http://fak3r.com/2011/07/07/howto-retrieve-email-with-fetchmail-and-forward-it-on-with-procmail/

Please disregard this answer is using mutt is essential.

3
  • Well.. embarrassment The reason why I'm using Mutt is because it's the only client I found that I had no trouble configuring.. I'll try with fetchmail using the article you linked to.
    – SirCharlo
    Feb 17, 2012 at 14:16
  • In that case, I think you will find procmail to be the perfect tool to use. :-) When you want to figure out how do do things with procmail, searching for "procmail recipes" will most likely help you do everything you could ever want to do with email. Feb 17, 2012 at 14:20
  • Thanks! Your answer turned out to be exactly what I needed :)
    – SirCharlo
    Feb 18, 2012 at 5:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .