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

Re: Using send-hook to remove a header



Hello Chris,

 On Thursday, August 25, 2005 at 10:33:25 AM +0100, Chris Green wrote:

> To: mutt-users@xxxxxxxxxxx
> Mail-Followup-To: mutt-users@xxxxxxxxxxx

    Better correct these addresses before bouncing to the list.
Otherwise it can confuse filters, dispatchers, and Mutt list functions.


> What I want to do is remove the header whenever I send mail to a
> mailing list.

    Why not use the ~l pattern for "message is addressed to a known
mailing list"? But note the <F1> lies: It matches *only* subscribed
lists. And even patch-1.4-me.lists.1 doesn't help. Is that a bug in doc
or in code?


> 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`

    ~/.mutt/lists file contains your lists addresses in an enough strict
regexp format? Something like "^mutt-users@mutt\\.org$"? Otherwise
you'll have false positives.

    BTW: That's either "lists" or "subscribe". Not both.


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

    Yes. All Mutt settings are persistent.

| my_hdr Reply-To: blah
| send-hook .   "my_hdr Reply-To: blah"
| send-hook ~l  "unmy_hdr Reply-To:"

    I seem to vaguely recall there are circumstances where send-hooks
are not triggered, hence the static my_hdr in addition to the default
send-hook. But I'm not sure?


Bye!    Alain.
-- 
How to Report Bugs Effectively
<URL:http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>