How to configure sendmail to relay local user mail to public host?

Posted by Chau Chee Yang on Super User See other posts from Super User or by Chau Chee Yang
Published on 2011-01-07T10:11:08Z Indexed on 2011/01/07 10:55 UTC
Read the original article Hit count: 323

Filed under:

I am using Linux/Fedora's sendmail as my mail server. The server do not has a public domain name. It connect to Internet via dial-up. There are few users in the server. I have successfully configure my sendmail to relay mail to public host (via smart_host):

# mail <user>@gmail.com

[email protected] receive mail from this private host.

However, if I send a mail to local user (without domain name):

# mail <user>

All mails are deliver to my server's mail spooler (/var/spool/mail).

I wish all mails send to local user may relay to a public domain that I have registered, is that possible to do so with sendmail?

mail user1

will send mail to [email protected]

mail user2

will send mail to [email protected]

© Super User or respective owner

Related posts about sendmail