how to add domain name to email address (that is different from hostname)

John Hawkinson jhawk at alum.mit.edu
Sat Oct 16 06:48:15 UTC 2021


Replies in-line to you both.

Globe Trotter <itsme_410 at yahoo.com>wrote on Sat, 16 Oct 2021
at 00:45:19 EDT in <1714592883.3655338.1634359519652 at mail.yahoo.com>:

> >> I am wondering how it is possible automagically add a given domain name to an email address that is not in my address book.
> >> Specifically, if I type joe and joe is in my addressbook (or is not a complete email address) as my recipient, I get:
> > 
> > joe at hostname
> >> 
> >> what I want to happen is for joe to automagically expand to joe at yahoo.com (say).

Mutt doesn't have an address book, per se (although aliases provide some similar functions, see below).
But what you ask for is not possible -- if mutt doesn't know the the address (it is not in the address book), there is no way for it to know the domain suffix to add.

Are you saying you want to add the same suffix to all unqualified addresses?
Always @yahoo.com, both for joe@ and also for steve@ and mike@?

That is what $hostname is for (when $use_domain is set, the default).
This has other side effects, but it's the only way to unconditionally add @yahoo.com for all unqualified addresses.

It doesn't seem like a request that makes much sense with a doman like @yahoo.com; although it makes a lot more sense with @mycompany.com. Is it realy what you want?

> 
> > You use "a" to add aliases, just try and you may figure it out.
> 
> Thank you!
> 
> Sorry if I did not follow your answer, but my question is not about adding or using aliases, I know how to do that, but how to automagically add a proper domain name to some userid while sending email.

The alias function in mutt serves aas a crude address book, and you can autocomplete addresses that are in the aliases list.
So if you have joe at yahoo.com and steve at gmail.com and mike at aol.com, then autocomplete will help, by hitting TAB.


Chuck Martin <unicorn+mutt at sdf.org> wrote on Sat, 16 Oct 2021
at 01:14:45 EDT in <20211016051445.o3eygnc3esgufl5x at iceland.freeshell.org>:

> Have you tried setting hostname=yahoo.com in your .muttrc?  I haven't
> tried it, but it seems like that would work.

Maybe I'm misinterpretting the original request, but I don't think that's what is desired. But maybe so (see above).

--
jhawk at alum.mit.edu
John Hawkinson


More information about the Mutt-users mailing list