1

Where does an ubuntu machine get the default domain to append to users when sending mail? Ours is currently sending as user@example.com, while /etc/mailname has mail.example.com set. Should this not be sending as user@mail.example.com? I'm using exim4, and I've dpkg-reconfigure'd it so that the system mail name, and the visible domain name are both set to mail.example.com.

--edited to include mailserver--

Cian
  • 5,838
  • 1
  • 28
  • 40

3 Answers3

2

Most mail servers will chop off the first part of the mail server name (i.e. pop, pop3, smtp, imap, mail) to get what it should put after the @ sign in the email address.

Without knowing the email server you are using, it is hard to give a recommendation on how to change this. I assume a form of Linux, but you should really give more detail.

Joshua Nurczyk
  • 748
  • 6
  • 17
  • It appears this is correct. It seems to read /etc/mailname, and then chop off everything up to the first dot to get the domain for users mail addresses. – Cian Jul 06 '09 at 22:12
2

In the default configuration on an Ubuntu / Debian box, the contents of /etc/mailname is used. It can, of course, be overridden in the actual config file for exim, postfix, etc.

Insyte
  • 9,394
  • 3
  • 28
  • 45
  • D'oh, sorry. Just noticed that you specifically referenced /etc/mailname. – Insyte Jul 06 '09 at 21:19
  • my /etc/mailname says mail.example.com, and I've dpkg-reconfigure'd exim4-config, so that the system mail name, and visible domain name are both set to mail.example.com. But my email is still showing up as coming from user@example.com. Anywhere else it could be set? – Cian Jul 06 '09 at 21:27
  • Well, there's the possible solution mentioned in this bug report: https://bugs.launchpad.net/ubuntu/+source/exim4/+bug/49776 Unfortunately, I'm not that familiar with exim, so I can't be much use other than to say: I just did a fresh install of exim4 on an Ubuntu 8.04 box and /etc/mailname was used appropriately. – Insyte Jul 06 '09 at 22:12
  • (After a dpkg-reconfigure exim4-config, of course.) – Insyte Jul 06 '09 at 22:13
  • After checking this again, it appears mutt reads /etc/mailname, minus everything before the first . Exim itself reads /etc/mailname itself. – Cian Sep 20 '09 at 01:14
0

Just to be on the safe side - you haven't accidentally set a mail address for the user in /etc/email-addresses?

towo
  • 1,887
  • 14
  • 12