how can I specify the default domain for mutt to append to unqualified addresses

1

I would like to be able to type just the username of a recipient for people within my domain, and have mutt automatically qualify it for me. That is, if I type user1 I would like it to be transformed to user1@example.net.

I know with use_domain I can have the value of hostname automatically added in such cases, and I can almost get where I want if I specify hidden_host as well. The problem is that my FQDN is in a sub domain, and hidden_host doesn't strip enough off. For example, if my muttrc includes the following:

set hostname='host.sub.example.net'
set use_domain=yes
set hidden_host=yes

then if I type user1 as a recipient it will expand to user1@sub.example.net instead of user1@example.net as I desire.

I could create an alias for each user I suppose, but that feels cumbersome and hard to keep in sync as users and mailboxes are added or changed.

Is there a way to tell mutt what domain I would like to have added to the unqualified names I type, or should I just "lie" about my hostname?

Eric Renouf

Posted 2019-06-03T13:57:02.257

Reputation: 1 548

No answers