send-hook vs. message-hook
I'm having some trouble creating roles using hooks. What I'm trying to
do is create a default configuration for initiating/replying to mail as
"tjacobs," and custom roles for nospam and contracts.
What's *supposed* to happen is that hitting F11/F12 will toggle between
the roles, and send mail as the specified user. That part seems to work.
But *replying* to mail doesn't seem to work as expected (e.g.
automagically using the specified role based on who the email was sent
to). What am I doing wrong?
Here's what I have:
# General settings
set alternates = 'tjacobs|nospam|contracts'
ignore x- list-
set move = no
set abort_unmodified = ask-yes
set use_from
set use_domain
set hidden_host
set fast_reply
# Set pager features
set pager_stop
bind pager <up> previous-line
bind pager <down> next-line
# Custom headers
set edit_headers
######################################################################
# Roles
######################################################################
macro index <F12> ":set from=tjacobs\n" 'Use role: Default'
macro index <F11> ":set from=contracts\n:set
signature=~/.signature-contracts\n" 'Use role: contracts'
macro index <F10> ":set from=nospam\n" 'Use role: nospam'
# nospam
send-hook '~L nospam' 'my_hdr From: "Todd A. Jacobs" <nospam@xxxxxxxxxxxxx>'
message-hook '~L nospam' 'my_hdr From: "Todd A. Jacobs"
<nospam@xxxxxxxxxxxxx>'
message-hook '~L nospam' 'set pgp_create_traditional = ask-yes'
message-hook '~L nospam' 'set pgp_sign_as = nospam@xxxxxxxxxxxxx'
send-hook '~t "(majordomo|subscribe)"' 'unset signature'
# contracts
message-hook '~L contracts' 'my_hdr From: "Todd A. Jacobs, CISSP"
<contracts@xxxxxxxxxxxxx>'
send-hook '~L contracts' 'my_hdr From: "Todd A. Jacobs, CISSP"
<contracts@xxxxxxxxxxxxx>'
send-hook '~L contracts' 'set signature = ~/.signature-contracts'
send-hook '~L contracts' 'set pgp_autosign = yes'
send-hook '~L contracts' 'set pgp_sign_as = contracts@xxxxxxxxxxxxx'
send-hook '~L contracts' 'set pgp_sign_command="gpg --comment \"CodeGnome
Consulting, LTD - http://www.codegnome.org/\" --no-verbose --batch --quiet
--output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"'
send-hook '~L contracts' 'set pgp_clearsign_command="gpg --comment
\"CodeGnome Consulting, LTD - http://www.codegnome.org/\" --charset utf-8
--no-verbose --batch --quiet --output - --passphrase-fd 0 --armor --textmode
--clearsign %?a?-u %a? %f"'
send-hook '~L contracts' 'set
pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --charset utf-8 --batch
--quiet --no-verbose --output - --encrypt --textmode --armor --always-trust
--comment \"CodeGnome Consulting, LTD - http://www.codegnome.org/\" -- -r %r --
%f"'
send-hook '~L contracts' 'set
pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg --comment \"CodeGnome
Consulting, LTD - http://www.codegnome.org/\" --charset utf-8 --passphrase-fd 0
--batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u
%a? --armor --always-trust -- -r %r -- %f"'
# tjacobs
send-hook '~L tjacobs' 'unmy_hdr from'
send-hook '~f tjacobs' 'unset pgp_autosign'
send-hook '~f tjacobs' 'unset pgp_create_traditional'
send-hook '~f tjacobs' 'set signature = ~/.signature'
--
Todd's "Customer Disservice Hall of Shame" currently contains:
- Charter Communications: Mislead their customers about service
levels, block normal Internet connectivity, and exhibit excessive
downtime.
- AT&T: Honoring the "checks" they send out to entice you to switch
long-distance providers is apparently optional.
- eFax: Receive (not send) 20 pages of *unsolicited* faxes, and lose
your account.