Mutt reply address

Fairlight fairlite at fairlite.com
Thu Mar 16 16:47:28 PST 2006


In the relative spacial/temporal region of
Thu, Mar 16, 2006 at 03:31:17PM -0800, Bill Campbell achieved the spontaneous
generation of the following:
> I have a line in the ~/.muttrc file
> 
> source ~/.mutt_hooks

Mine's broken down completely.  Here's ~/.muttrc:

source ~/.mutt-variables
source ~/.mutt-display
source ~/.mutt-headers
source ~/.mutt-lists
source ~/.mutt-mailboxes
source ~/.mutt-macros
source ~/.mutt-hooks
source ~/.mutt-aliases

As a real-life example of how I was talking about using hooks depending
what context you're actually in as far as folders (I have procmail sort all
my mail into specific folders), here's ~/.mutt-hooks:

# Hooks
send-hook .* 'source /home1/fairlite/.attrmutt'
send-hook .* 'set pgp_autosign=no'
send-hook john at valar.com 'set pgp_autosign=no'
send-hook mantia at .*\.com 'set pgp_autosign=no'
mbox-hook .* =received
save-hook ~A =received
folder-hook . 'my_hdr From: Fairlight <fairlite at fairlite.com>'
folder-hook . 'my_hdr Reply-to: Fairlight <fairlite at fairlite.com>'
folder-hook . 'my_hdr Organization: Fairlight Consulting'
folder-hook . 'my_hdr X-TagLine: Real Life is what occurs between video gaming sessions.'
folder-hook . 'my_hdr X-BORG: We are Prolix.  Brevity is futile.  You will be inundated.'
folder-hook . 'set move=ask-yes'
folder-hook . 'push <esc>V'
folder-hook . 'set signature=~/.signature'
folder-hook . 'set pgp_autosign=no'
folder-hook . 'send-hook .* "set pgp_autosign=no"'
folder-hook filepro.mail unhook send-hook 
folder-hook filepro.mail 'send-hook .* "source /home1/fairlite/.attrmutt"'
folder-hook filepro.mail 'set pgp_autosign=no'
folder-hook filepro.mail 'set signature=~/.fpsignature'
folder-hook lics.mail 'set signature=~/.fpsignature'
folder-hook onegate.mail 'set move=no'
folder-hook main-ediver 'set move=no'
folder-hook sco.misc 'set move=no'
folder-hook > 'set move=no'
folder-hook (.*/)?News/.* 'set move=no'
folder-hook rawquery.mail 'set move=ask-no'
folder-hook received.*\.gz 'set move=no'
folder-hook received 'set move=no'
folder-hook reg.mail unhook send-hook 
folder-hook reg.mail 'send-hook .* "source /home1/fairlite/.attrmutt"'
folder-hook reg.mail 'set pgp_autosign=no'
folder-hook reg.mail 'set signature=~/.signature'
folder-hook reg.mail 'my_hdr From: Fairlight <registrations at fairlite.com>'
folder-hook reg.mail 'my_hdr Reply-to: Fairlight <registrations at fairlite.com>'
folder-hook vorxion.mail unhook send-hook 
folder-hook vorxion.mail 'send-hook .* "source /home1/fairlite/.attrmutt"'
folder-hook vorxion.mail 'set pgp_autosign=no'
folder-hook vorxion.mail 'set signature=~/.slrnsignature'
folder-hook vorxion.mail 'my_hdr From: Vorxion <vorxion at knockingshopofthemind.com>'
folder-hook vorxion.mail 'my_hdr Reply-to: Vorxion <vorxion at knockingshopofthemind.com>'
folder-hook vorxion.mail 'my_hdr Organization: Vortexa Elite'
folder-hook vorxion.mail 'unmy_hdr X-TagLine:'
folder-hook vorxion.mail 'unmy_hdr X-BORG:'
folder-hook khalist.mail unhook send-hook 
folder-hook khalist.mail 'send-hook .* "source /home1/fairlite/.attrmutt"'
folder-hook khalist.mail 'set pgp_autosign=no'
folder-hook khalist.mail 'unset signature'
folder-hook khalist.mail 'my_hdr From: Khalist <khalist at fairlite.com>'
folder-hook khalist.mail 'my_hdr Reply-to: Khalist <khalist at fairlite.com>'
folder-hook khalist.mail 'unmy_hdr Organization:'
folder-hook khalist.mail 'unmy_hdr X-TagLine:'
folder-hook khalist.mail 'unmy_hdr X-BORG:'

# Compressed folders
open-hook \\.gz$ "gzip -cd %f > %t"
close-hook \\.gz$ "gzip -c %t > %f"
append-hook \\.gz$ "gzip -c %t >> %f"


As you can see, I actually reset a few headers depending where I am.

The compression stuff only worked with a patch that was applied prior to
mutt 1.4.  Not sure they ever got it rolled in or applied again.  Let's me
gzip my folders though.

Oh, and the .attrmutt file is really:

send-hook .* 'set attribution="`/home1/fairlite/bin/fl-attrchange`"'

That's how I get the random attributions in.  Originally I tried it all in
one line in the hooks file but there were so many quotes that the nesting
got all buggered.  I had to break it out to make it work.

mark->
-- 
"An echo and a stranger's hand, a short term effect..." --Smith/Cure


More information about the Filepro-list mailing list