On Sun, Feb 09, 2003 at 11:27:37AM -0500, Nori Heikkinen wrote:
| so i managed to get myself subscribed to a mailing list with a
| postfixed address -- i.e., not the one i usually write from.  this is
| a "subscribers-only" list -- and i'm subscribed! -- but every time i
| post, i get a "your reply is being held for moderation by the list
| moderator because you were not subscribed" error because i forgot to
| send the email from the address at which i'm subscribed.
| 
| is there a way i can tell mutt to automatically use the different
| address when i'm writing to that list?  or do i have to remember
| myself?

Here's how I do it.

#   First set the default From:
set realname="Derrick 'dman' Hudson"
set from="[EMAIL PROTECTED]"
set use_from

#   First reset it when changing folders.  This is because some of the
#   dynamic behavior is folder-based and some is sender-based.
folder-hook '.' unmy_hdr From
folder-hook '.' set signature="~/util/script/sig_gen.py|"

folder-hook '.' set pgp_sign_as = "1293A514"

# If I was reading SF-related messages, use my SF address as the From:
folder-hook 'SF-Inbox|roundup' my_hdr "From: \"Derrick \'dman\' Hudson\" 
<[EMAIL PROTECTED]>"

# Use the address in that domain if I send to someone in that domain.
send-hook '~t ^.*@iteams\.org$' \
    my_hdr 'From: Derrick Hudson <[EMAIL PROTECTED]>'

# Likewise for some other dynamic address/.sig changing.


Note that this only affects the Headers, not the Envelope.  Probably
the test is performed on the headers (some lists do that) and this
will get you through.  If it is based on the envelope, then you'll
need to adjust the MTA to rewrite the envelope properly.  There are a
number of ways to do that depending on the MTA and how it is set up.
I'll go into that if you need.

-D

-- 
Pride only breeds quarrels,
but wisdom is found in those who take advice.
        Proverbs 13:10
 
http://dman.ddts.net/~dman/

Attachment: msg29694/pgp00000.pgp
Description: PGP signature

Reply via email to