Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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 '12 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. –  Lakritsbollar Feb 17 '12 at 14:20
    
Thanks! Your answer turned out to be exactly what I needed :) –  SirCharlo Feb 18 '12 at 5:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.