The Mutt E-Mail Client : Configuration : Change settings before formatting a message
Previous: Change settings based upon message recipients
Next: Choosing the PGP key of the recipient

## 3.18. Change settings before formatting a message

Usage: `message-hook` [!]pattern command

This command can be used to execute arbitrary configuration commands before viewing or formatting a message based upon information about the message. command is executed if the pattern matches the message to be displayed. When multiple matches occur, commands are executed in the order they are specified in the muttrc.

See Message Matching in Hooks for information on the exact format of pattern.

Example:

> `

>     message-hook ~A 'set pager=builtin'
>     message-hook '~f freshmeat-news' 'set pager="less \"+/^  subject: .*\""'

> `

The Mutt E-Mail Client : Configuration : Change settings before formatting a message
Previous: Change settings based upon message recipients
Next: Choosing the PGP key of the recipient