Discussion Locked

Email address

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a RedHat 6.0 system, runing different servers (daemons). One of them is for e-mailing (sendmail); the system has the hostname "host". What can I do for username@host.mydomain.com to receive their e-mails on the address username@mydomain.com?The internal network uses static ip addresses, the DNS for it is on the same machine.

Thank you for help

5 replies

by ebob

I would have thought it's more or less as straightforward as setting up an MX record in DNS for "mydomain.com" that points to your server's IP address.

Perhaps there's more?

by wls

For DNS: under the SOA record, include a MX record for the domain name.

$ORIGIN com.
mydomain IN SOA ns.mydomain.com.
IN MX 10 mail.mydomain.com.

$ORIGIN mydomain.com.
ns IN A 1.2.3.4
mail IN CNAME ns.mydomain.com.
host IN CNAME ns.mydomain.com.

Then in the sendmail.cf (under the /etc dir) file, have:

Cwlocalhost host.mydomain.com mydomain.com

DMmydomain.com

The "Cw" record says that you accept mail for the listed domain/machine names.

The "DM" record says that when you send mail, like from pine, to use this as the masqueraded name (so the host name doesn't show up).

That's the quick and dirty way to do it.

This discussion is closed to new replies.