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

Re: mail to list function muttrc?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday, June 25 at 10:58 PM, quoth Dave Patterson:
>So I'm in a mailing list mailbox and want to compose a mail to that list,
>by simply hitting a macro index mail to that list, similar to L
>reply-to-list, but I want to make a new subject, without recalling an
>alias.  A lot of lists.  An easy way?

Hmmm, well, without using a bunch of aliases (which is what I do -- I 
had to use the "subscribe" command for all my lists, I just added an 
alias at the same time), it's pretty difficult to do strictly within 
mutt.

I mean, if you use <list-reply>, you have to make sure to disconnect 
the message from the one you're replying to (i.e. blank-out the 
In-Reply-To: and References: headers) and, as you said, the subject. 
The problem is that the my_hdr command doesn't work on the 
In-Reply-To: header (i.e. you can add one, but you can't remove one).

One way to do it might be to use a combination of mutt macros and 
editor stuff. For example, you could set $edit_headers, and then set 
the $editor macro to some little script (fixheader.sh, say) like this:

    #!/bin/sh
    cat "$1" | formail -f -b \
        -I In-Reply-To: \
        -I References: \
        -I 'Subject: (no subject)' > "$1.tmp"
    mv "$1.tmp" "$1"

(if you don't have formail (from the procmail package), you can use 
awk/sed/grep to do the same thing, it's just more tricky to do it 
right.) So your macro would be something like this (I haven't tested this):

    macro index M "<enter-command>set 
editor='~/.fixheader.sh'<enter><list-reply>n<enter-command>set 
editor=$EDITOR<enter><edit-message>"

~Kyle
- -- 
He who dares not offend cannot be honest.
                                                       -- Thomas Paine
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFEnuTUBkIOoMqOI14RArErAJ9Xgz74ztJ1qmBrH9rg8dQ2r6ud7ACg26Z0
6nsAUW6nFO1fVcjD3G6hIFE=
=sj+Q
-----END PGP SIGNATURE-----