Re: How to get mail to local destinations delivered?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris G wrote:
I have a fairly default Fedora 7 installation, certainly the sendmail
is just as it was installed.

How do I get sendmail to deliver mail to local destinations?  The
system's hostname is home.isbd.net and it's connected to the Internet
via a router.  I have a CNAME set up at the hosting provider that
hosts isbd.net to point at the static address of my ADSL connection.

When I send mail from my system to a local address it gets the
hostname added, thus mail gets sent to root@xxxxxxxxxxxxx,
postmaster@xxxxxxxxxxxxx, chris@xxxxxxxxxxxxx, etc.  All of this
fails because sendmail attempts to connect to the SMTP port of
home.isbd.net, which isn't possible because my router's firewall
doesn't accept connections on port 25.

I don't want to open up port 25 and it seems a bit silly anyway to
send mail on such a long round trip.  Is there any way I can tell
sendmail that home.isbd.net is localhost (or 192.168.1.1)?  I have an
entry for home.isbd.net in my /etc/hosts file which is:-

    192.168.1.1     home    home.isbd.net

but obviously sendmail is doing a DNS lookup for home.isbd.net which
Don't confuse "resolver" with DNS. The resolver uses a variety of services, one of which may be DNS.
returns the 'external' IP address.



I don't know whether sendmail or other MTAs work with hosts files, I've not used them for ten years or so.

I do something a little more educational.

What I do is, first, choose my own top level domain. You've already found problems with using someone else's domain, such as your IAPs.

I use .lan, and go from there. For hysterical reasons I,m using "demo.lan," but js.lan or home.lan would do as well. I want a name that will work for me, and conflict with nobody. I could use a domain name that I own such as herakles.homelinux.org, but once I start adding further domain names to that, it's getting a little long for my taste. I will use example.lan here. change it to something that suits you.

I'm not going to describe how to do these things, there's probably other documentation on your computer, at the fedora websites, at tldp.org and other places which google can tell you. For example, ask google 'How to" cook beetroot'

Zeroth, choose a domain name and a range of private IP addresses. Say 172.17.45.0/24

These next steps are for a computer you designate as the server.

First, I set up bind. You need the bind and caching-nameserver packages. Add a zone for example.lan covering the IP addresses you chose. I chose thematic names, Australian animals.

Second, set up a DHCP server to hand out IP addresses from your range. The DHCP server listens to interfaces on the subnets you define, and ignores others. This point once had me confused.

2a If you want to dest that this much is working, boot a rescue CD or 2a Knoppix on a client computer and check that it gets an IP address.

Third, configure your clients to configure their networks using DHCP. With this setup, some will change their names, some won't. I don't worry about it

Fifth (actually, at any time), configure sendmail (or exim or postfix) on the server to listen to the LAN for incoming mail. If you don't understand sendmail, postfix is fairly simple to set up, good for beginners and good enough for quite large offices.

Sixth About this time, users with shell accounts on the server can receive mail there. You will want something to serve it out, dovecot does it quite well. If, like me, you use lots of computers, you might want to configure it to do imap.

This setup is fairly close to being able to handle mail for your one free dyndns subdomain name, maybe Chris.IsaGeek.org if it's not taken:-)





--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

Please do not reply off-list


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux