On Tue, Jul 13, 1999 at 04:19:38PM +1000, Shao Zhang wrote:
[...] 
> Say when I send a mail to my uni, I want to use my uni's mail address for the from
> header, and when I send a mail to the mailing list, I want to use a different mail
> address for the from header..
[...]

Here's how I'm doing it in my .muttrc (currently 0.95.6, but I've been using
this for quite some time now):

unset use_from

# defaults
send-hook .             'set sendmail="/usr/lib/sendmail -oi -oem"'
send-hook .             'set signature=~/.signature'
send-hook .             'my_hdr From: DEFAULT@ADDRESS'

# set emgaron alias fuer mutt Mailinglisten
send-hook mutt* 'set signature=~/.mutt_signature'
send-hook mutt* 'set sendmail="/usr/lib/sendmail [EMAIL PROTECTED] -oi -oem"'
send-hook mutt* 'my_hdr From: [EMAIL PROTECTED]'

That way, mutt defaults to using my DEFAULT@ADDRESS (which you obviusly need
to replace with your own one) - that's what the first three send-hook lines
do.
The second send-hook block sets the mail address to [EMAIL PROTECTED] when I'm
writing to this list.

The lines with "sendmail" make sure that not only the From line gets changed
but basically everything related to the address. The only problem with this
is that you need to be a "trusted user" to use sendmail's "-f" option. On
your own box, this isn't a problem, simply add yourself to the trusted user
list in the sendmail configuration.

HTH,

Thomas
-- 
-----------------------------------------------------------------------------
      Thomas Ribbrock    http://www.bigfoot.com/~kaytan    ICQ#: 15839919
   "You have to live on the edge of reality - to make your dreams come true!"

Reply via email to