On 2015-06-06, Larry Hynes <[email protected]> wrote:
> Hello list
>
> In order not to bother my family with repeated exposure to my
> signature, I use the following send-hook setup:
>
>     send-hook . set signature
>     send-hook '~t ^foo@bar\.com$' unset signature
>
> This works, but only up to a point; the signature is unset for
> the intended recipient but is not re-set for any subsequent
> recipients, which necessitates restarting mutt. This isn't the
> end of the world, but I'm surprised that the behaviour isn't as
> I expected which would be to unset the sig for defined
> addresses, set the sig for everyone else.

Thanks for the replies, I think I've got it, thanks to some
Googling, which I really should have done prior to posting to
the list. :(

This stackoverflow q/a gives the answer:
https://stackoverflow.com/questions/18765928/mutt-send-signature-hook

I need to explicitly state the sig file, not alone in my
.muttrc, but *also* in the hooks file that I'm sourcing, so the
example above becomes:

    send-hook . set signature=~/.mutt/sig
    send-hook '~t ^foo@bar\.com$' unset signature

This has worked for each use I've tested with so far, setting
and unsetting where appropriate.

Thanks again,

Larry

Reply via email to