On 2022-09-15 08:27, Cameron Simpson wrote:
> On 13Sep2022 16:50, Sébastien Hinderer <sebastien.hinde...@ens-lyon.org> 
> wrote:
> > I would like to have a nice way to deal with several accounts in mutt. I
> > am talking just about the .muttrc file aspect here.
> > 
> > My present configuration is that each account has its own muttrc file
> > which sources a common one.
> 
> I thought the common approach was what you next outline: a single muttrc
> which sources the appropriate account-specific muttrc.
> 
> [...]
>     reply-hook . "my_hdr BCC: $my_cs"

An indirect version of this reply-hook does not work for me

reply-hook '~C "^mutt-users@mutt.org$"' 'source ~/.mutt/mutt-users.cf'

where mutt-users.cf sets an address and sources reset.cf:

# reset.cf
set from=$my_address
unmy_hdr *
my_hdr Bcc: $my_address

According to the docs, the BCC header is set before reply-hooks are
evaluated[1], and the above configuration does not change this header
(unlike the From header):

> my_hdr processing for To, Cc, Bcc, Subject headers.
> Prompts for To, Cc, Bcc, Subject headers. See $askcc, $askbcc, $fast_reply.
> From header setting. Note: this is so send-hooks below can match ~P, but From 
> is re-set further below in case a send-hook changes the value.
> reply-hook
> send-hook
> From header setting.
> my_hdr processing for From, Reply-To, Message-ID and user-defined headers. 
> The To, Cc, Bcc, Subject, and Return-Path headers are ignored at this stage.

How did you manage to change the BCC header with your reply hook?

- Jan

[1] http://mutt.org/doc/manual/#compose-flow

Attachment: signature.asc
Description: PGP signature

Reply via email to