Skip to navigation

Mutt: set dynamic email signature from shell command output

I want to set my signature when mailing to the r-help mailing list to contain information about the R version I have currently installed. Creating a bash script that directly echoes the several lines that I want to have in my signature and executing that in the muttrc using backticks gives a “broken pipe” error.

One solution (I’m sure there are others, maybe better ones) is to make the shell script create a temporary signature file and echo the path to that file, then execute the shell script using backticks.

Shell script (don’t forget to chmod 744):



echo  "Marianne Promberger PhD, King's College London                                       " > $thesigfile
R --version | head -n 1 >> $thesigfile
cat /etc/issue | head -n 1 | cut -d " " -f 1-2 >> $thesigfile
echo $thesigfile


send-hook '~t r-help' 'set signature=`~/.mutt/signature_r-help`'

2 Responses to “Mutt: set dynamic email signature from shell command output”

  1. anonymous coward Says:

    I know it’s been a few years. But when I went looking for how to set a dynamic signature, this turned up as a top hit on google, so since it’s unresolved here, I figured I’d fix that.

    the solution is to do:
    set signature = ‘|’


  2. Marianne Says:

    Neat, thanks!