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

Setting the "From", depending on the Recipient



Hoi,

I have two questions and hope someone can help me with this?!

1. I've set up a few send-hooks to change my From:-line depending
   on who I send mail to:

send-hook .                   'my_hdr From: Martin Hasenbein <mh@xxxxxxx>'
send-hook '~t @space.net'     'my_hdr From: Martin Hasenbein <mh@xxxxxxxxx>'   
send-hook '~C @hasenbein.com' 'my_hdr From: Martin Hasenbein 
<martin@xxxxxxxxxxxxx>'

Now, if I send out an eMail to someone, the first From:-line is used.
If I send an eMail to one of my colleagues (*@space.net), the second
From:-line is used. And if I send an eMail to a member of my family
(*@hasenbein.com), the third From:-line is used. That works perfect!
But I also have defined some folder-hooks for e.g. the mailing-lists:

folder-hook =mailings/mutt 'my_hdr From: Martin Hasenbein 
<mh-mutt@xxxxxxxxxxxx>'
folder-hook =mailings/mutt 'set record=/home/mh/emails/archives/mutt-out'

When I now change to the folder and try to send an eMail to this list,
my From:-line doesn't change. It reminds "Martin Hasenbein <mh@xxxxxxx>".
Why? Do send-hooks have a higher priority over folder-hooks? Or do I
have to specify a send-hook for each mailing-list, I send eMails to?


2.) I also have specified alternates like this:

set alternates = 
((beastie|martin|mh)@(beastie|bsd|bsdcafe|bsdguide|bsdmail|bsdnet|got-root|hasenbein|linuxintern|spassnetz|unixpert).(de|com|name|net))

and a send-hook like this:

send-hook ~p 'my_hdr From: Martin Hasenbein <mh@xxxxxxxxxx>'

What I want to achieve now is, when someone sends eMail to e.g.
"mh@xxxxxxxxxxx" and I reply to this eMail, that the From:-line
automatically changes to "Martin Hasenbein <mh@xxxxxxxxxxx>".
And when someone sends eMail to "martin@xxxxxxxxxxxx", that
the From:-line changes to "Martin Hasenbein <mh@xxxxxxxxxxxx>".
And so on ...
The only thing, that works right now is, when I specify a fixed
eMail-Adress, like, as above, "mh@xxxxxxxxxx". But it should
change to the eMail-Adress the eMail has been sent to. Is there
a way to solve this problem?

Thank you very much!


Ciao,
  -Martin.

-- 
Martin Hasenbein     |   Elvirastrasse 20   |     D-80636 Muenchen
fon: +49 89 12163761 | fax: +49 89 12163763 | gsm: +49 175 2255715
Unix is simple, but it takes a genius to understand the simplicity
  --Dennis Ritchie