[Techtalk] Mutt/Postfix/SMTP

Claudine Chionh claudine at chionh.org
Tue Sep 23 17:52:32 EST 2003


Hello Erinn and list,

Erinn wrote:

> I receive (and send) mail from two domains. One is through my hosting 
> company, the other my ISP. As far as I can tell, there is no way to 
> really set this up. I have fetchmail setup to receive mail from both 
> domains (lets say mail.example1.com and mail.example2.com)
> 
> Is there any way I can specify that I'd like to send mail via both of 
> these domains or should I just use Mutt to more or less forge the From: 
> header so that it appears I sent mail from one address when it's actually
> going through a different server? Is that even possible?

Mutt can do everything you'd want a mail client to do, and possibly more
:-). If only I could use it at work.

Anyway...

First you'll want to tell Mutt what your email addresses are. You probably
have one address that you regard as your "main" or "default" address. In
your .muttrc in your home directory, define this address with

set from="youraddress"

and your other addresses with

set alternates="address1|address2|address3"

and so on. This variable is a regular expression, hence the pipe "|"
separator. (I think you should list your main address here as well.)

How do you tell Mutt which address to use when composing messages?

You can edit the From header either in the editor (if you have set
edit_headers to yes) or in the compose menu.

You can set reverse_name="yes" so that when replying to an email, Mutt will
check the orginal email's recipient headers for one of the addresses set by
alternates, and use that as your From address.

You can use send_hook to change the From header depending on the recipient
of your message.

All this and more is explained in the manual (it should have been installed
with Mutt, or see <http://mutt.org/doc/manual/>) which admittedly can be a
bit overwhelming for new users. Also, many tasks have multiple solutions so
others here might have different suggestions. Also also, it's been ages
since I actually looked at my .muttrc so I may have got something wrong.

There are links to sample mutt config files at
<http://mutt.org/links.html#config>.

And I would just use your ISP's SMTP host for sending all mail (it works for
me anyway).

Hope this helps,
Claudine




More information about the Techtalk mailing list