Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a hook available that allows to sanitize email recipients before sending the email?

Ideally, upon pressing "y", the name part is removed from all recipients and only the email address remains:

Mike Anderson <ma@example.com>, Andi Mikeson <am@example.com>


ma@example.com, am@example.com
share|improve this question
You could of course insert some filtering script between Mutt and your SMTP client (making Mutt pipe header+mail into the script, having the script call the SMTP client with the altered header+mail). But Mutt can probably do this already... – sr_ May 14 '12 at 12:49
Yeah, that would be an option too. My current workflow is: new mail -> enter recipients via goobook -> compose message in vim -> vim macro to sanitize the "TO:" line. – Chris May 14 '12 at 13:06
up vote 1 down vote accepted

From your comment, you already got a macro to sanitise the To: line in Vim, so an easy solution might be to

  1. create a secondary vimrc with an autocmd that triggers your macro on BufWrite
  2. set Vim with this configuration as your editor in Mutt.
share|improve this answer

Your Answer


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.