Ubuntu – Changing default domain in mailutils


I have installed mailutils on Ubuntu 12.10 and I have run into a problem where the domain being attached is the fully qualified host and not just the domain. For example,

mail user2 [enter] then enter message and send produces a from address of user1@host.domain.com

I want the from address to be just user1@domain.com. I did not have this problem in 12.04, it only started when I upgraded to 12.10. Is there a system config file somewhere that would allow me to only set the domain.com as being added to the username when sending mail and not the full host name?


Best Answer

  • To use a local domain other than the hostname in Mailutils:

    Create a file /etc/mailutils.conf with the following contents:

    address {
      email-domain somedomain.com;

    You can see what else can be configured in mailutils.conf with:

    $ mail --config-help
  • Related Question