<<< Date Index >>>     <<< Thread Index >>>

Using send-hook to remove a header



I am looking into using send-hook to remove a header that I insert by
default in my messages, I just want to check that I'm going about this
the right way and also need some help on the RE.

The header I want to remove (for some messages) is inserted by a
my_hdr in my muttrc file.  I assume that an unmy_hdr command will just
remove it again.

What I want to do is remove the header whenever I send mail to a
mailing list.  I can easily produce a string which is a list of all my
mailing lists, I already have the following lines in my muttrc:-

    lists `awk '!/#/ {printf("%s ", $2)}' ~/.mutt/lists`
    subscribe `awk '!/#/ {printf("%s ", $2)}' ~/.mutt/lists`

These just produce a space separated list of the mailing list names.
Can I adapt this so that I can run a send-hook against the same set of
mailing lists, e.g. will something like the following work:-

    send-hook `awk '!/#/ {printf("%s|", $2)}' ~/.mutt/lists` un_myhdr Reply-to

Will the | on the end break anything, i.e. will it cause a match on
every message?

Is it necessary to have another 'generic' send-hook to put the
Reply-to header back for non-mailing list messages?

-- 
Chris Green (chris@xxxxxxxxxxx)

    "Never ascribe to malice that which can be explained by incompetence."