Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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>

becomes:

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

1 Answer 1

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

 
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.