I have a mutt mail client installed for receiving backup logs on my server for monitoring, Is there a way I can read the body of a mail message directly in the client in a way that I can search for a specific string or strings within it, and if found to trigger an alert mail sending?

Something like a log watcher only working with mutt or some else mail client that scans every mail that arrives.

  • In Alpine, you could do it with a filter that saves it to a mailbox, and then run iwatch on that mailbox or something like that. If you have gmail or something and are comfortable with ifttt.com scanning your email, that's an other possibility? (or you could set up a gmail forwarding rule to another gmail account and have ifttt.com check that one) – barrycarter Oct 30 '14 at 23:27
  • Tnx for the answer, i will try it and notify you if it succeded, but i must try it first with mutt because that was the first demand. – dusan90 Oct 31 '14 at 10:00

Apline and Mutt both don't work, or at least they are not needed. After a tons of research and tries the solution was to install Fetchmail as a MRA and install Procmail as a MDA, then Procmail would do the error string search because it has the egrep function built in, and supports mail forwarding based on regular exp. match. So the mail client is not needed at all, it was rather simple after a research of the two software tools man pages.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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