* Sven Guckes <[EMAIL PROTECTED]>, 2002-03-16 20:26 -0500:
> * Andre Berger <[EMAIL PROTECTED]> [2002-03-16 18:34]:
> > I would like to set my Bcc headers on that basis,
> > but it seems to work randomly only!
> >   send-hook  '~t .*'   'my_hdr Bcc: mymail'
> >   send-hook !'~t .*' 'unmy_hdr Bcc'
> > I would be very happy if anyone could tell me what to do in
> > order to turn off my Bcc header automatically when posting.
> 
>   send-hook . "unmy_hdr *"
> 
> this should turn off *all* extra headers.
> set now set your BCC header as you need.
> 
> btw, your first send-hook reads like this:
> "When TO contains an address of arbitrary
>  length then set the following BCC line."
> And the length can be ZERO, too!
> 
> "Get to know your regular expressions!"
> (And next time start a new thread, ok?)
> 
> I think it's time for a workshop
> on regex here in Berlin..
> 
> Anyway, you did not describe
> what the hooks shall do.
> And it's a waste of time
> trying to guess it.

Sven, thank you very much for your response and your time.

What I'm trying to accomplish is more or less the same Jerome (the
original poster) wants. We use mutt with nntp-patch and want to set
headers according to the fact if we are mailing or posting. Jerome
came up with the solution above which indeed works for From-headers,
but not really (read: consistantly) for Bcc-headers, at least for me.
What I want is to test if there is a To-header or not - if there is
one, I'm mailing, if there is none, I'm posting. If I'm mailing, add
a Bcc header (I'm Bccing all mail to myself to keep track of it). If
not, do not add this header because this results in an ugly "To:
undiclosed recipients ;" line in my postings.

I've tried an otherwise empty .muttrc file and

send-hook . "unmy_hdr *"
send-hook '~t ..*' 'my_hdr Bcc: mail'
send-hook !'~t ..*' 'my_hdr Bcc: news'

Testing the settings:

1. (mail) no bcc
2. (mail) bcc: mail
3. (news) bcc: mail
4. (news) bcc: news

So it seems to work, but the send-hook is "one message late".

-Andre

Attachment: msg25625/pgp00000.pgp
Description: PGP signature

Reply via email to