Have you tried the
push command to pass a key sequence to mutt? For example
Code:
mutt -e 'push /wordfilter\n'
will open an interactive session showing the result of the search. Suppose you want to read the message directly, add another \n (as you pressed enter in interactive mode).
Code:
mutt -e 'push /wordfilter\n\n'
At this point you may want to pass more complicated sequences of keys/commands to accomplish your task. Suppose you want to save the message in a file and quit mutt to avoid interaction:
Code:
mutt -e 'push <enter-command>"unset wait_key"\n/wordfilter\n<pipe-message>"cat > message.txt"\n<quit>'
The pipe-message command is used to pipe the content of the message to an external command. In this case you can save it to a file using cat (as shown). Note that the first part (in grey) is necessary to avoid the "Press any key to continue..." message that usually comes out after the execution of pipe-message. For a complete reference to mutt commands, see the official documentation here:
http://www.mutt.org/doc/manual/manual-6.html.