Re: [ILUG] Mutt reply hooks

From: kevin lyda (kevin+dated+1028542165.571dd7 at domain linux.ie)
Date: Tue 30 Jul 2002 - 11:09:34 IST


On Tue, Jul 30, 2002 at 11:28:11AM +0200, David Neary wrote:
> For example, say I have a company, and sales at domain company.com,
> info at domain company.com and tech at domain company.com arrive in the same mailbox.
> I don't want to reply to sales at domain company.com mails with the From:
> set to dave at domain company.com, I would like the mail to come from
> sales at domain company.com.
>
> Is there any way to do this? Bearing in mind that mail can arrive
> with my email in the To or Cc fields (and Bcc?), and it might be
> buried in a couple of dozen other recipients...

i sort my mail into folders using procmail. so typically i'm in the
ilug folder for ilug mail, the doolin folder for doolin mail, etc.
so i use folder-hooks to accomplish that. as an example (i do line
wrapping to keep it less then 80 chars long - spacing is important):

folder-hook . "my_hdr From: kevin lyda <kevin at domain ie.suberic.net>;"\
"my_hdr X-GPG-Fingerprint: 9C1D 16F4 11F1 6BD2 933C 048D ACC7 9840 89D0 7646;"\
"set pgp_sign_as=0x89D07646;set signature=~/.signature;"\
"set folder=~/Mail;set record=~/Mail/outbox;set postponed=~/Mail/postponed"
folder-hook /(alphyra|Alphyra/[^.].*) \
"my_hdr From: kevin lyda <kevin at domain alphyra.com>;my_hdr X-GPG-Fingerprint: "\
"088E 2BC4 381E 990A 1E0E 1DA0 4D44 99EF 20E6 38A0;"\
"set pgp_sign_as=0x20E638A0;set signature=~/.signature.d/itg.sig;"\
"set folder=~/Mail/Alphyra;set record=~/Mail/Alphyra/outbox;"\
"set postponed=~/Mail/Alphyra/postponed"

you could also do this with send hooks. i use them to tweak gpg settings:

send-hook . "unset pgp_autoencrypt;set pgp_autosign"
send-hook (ilug|webdev|social) at domain linux.ie \
                                "unset pgp_autosign;unset pgp_autoencrypt"

and then i have an include file with all people who have keys.

kevin

-- 
kevin at domain suberic.net     that a believer is happier than a skeptic is no more to
fork()'ed on 37058400    the point than the fact that a drunken man is happier
meatspace place: home       than a sober one. the happiness of credulity is a
http://ie.suberic.net/~kevin   cheap & dangerous quality -- g.b. shaw


This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:06 GMT