setting up Intranet mail serever (newbie Question)

setting up Intranet mail serever (newbie Question)

Post by Raju V » Tue, 14 Jan 2003 09:57:14



This is a re-post. My earlier posting does not seem reached the group.

We are setting up a small linux network in my office. There are about
12 machines. Current setup is Win 98 /95 in peer to peer network.
TCP/IP is enabled and the Machines are numbered from 192.168.1.1 to
192.168.1.11 with a mask of 255.255.255.0. The machine 192.168.1.1 is
a Redhat 8.0 set up on experimental basis, since we are planning to
shift to LINUX. The RH installation is successsfull and is using as a
workstation without any problem.  I can ping other machines. Now we
are trying to install an internal mail network. This is for
communicating between officers inside the office.  Although I searched
the net and read the manuals I could not comprehend them in full.
Therefore can somebody tell me step by step what to do. I wish to
know:
1. Can I give any name to my domain? I propose to give "ksinc.net"?
What exactly the difference between "hosts " and domain"

2. the machine 192.168.1.1 is named as "cs" ( as host). The /etc/hosts
file has the following entries:
192.168.1.1     cs
192.168.1.2     murali
192.168.1.3     maheswari, the last two entries being the names of windows
machines with the IP no and name. (the balance machines are not added.
is the entries are correct ?
3. In the computer "cs" I added two users "raju" and "mnk", with
passwords.

4. with this info. how can I set up the internal e-mail system. what

5. Is it required to configure the "sendmail". or is it
pre-configured? The smtp is running.

6. for setting up an IMAP protocol e-mail what shall I do ? Is there
any other simple solutions ?

Regards,

Raju
-

 
 
 

setting up Intranet mail serever (newbie Question)

Post by /dev/rob » Tue, 14 Jan 2003 12:36:30



> are trying to install an internal mail network. This is for
> communicating between officers inside the office.  Although I searched
> the net and read the manuals I could not comprehend them in full.

Mail is not an easy subject matter, and you seem to need a bit more
understanding of TCP/IP as well.

Quote:> Therefore can somebody tell me step by step what to do. I wish to
> know:
> 1. Can I give any name to my domain? I propose to give "ksinc.net"?

If there is *no* external connectivity whatsoever, yes you can. If even
one of the machines has at least a part-time Internet connection, you
should ensure that the name is not resolvable on the Internet. What I
use for my internal hosts is a bogus TLD: "ksinc.office" or "ksinc.lan"
for example.

That's a better plan for the future. Linux will make Internet connection
sharing much easier and safer, so eventually you might want to put this
network online. (You can also open up your mail server to provide real
Internet mail addresses.)

Quote:> What exactly the difference between "hosts " and domain"

A "host" is a machine, or more technically, a network interface on a
machine. (Every TCP/IP machine has a loopback interface called
"localhost" on IP 127.0.0.1; if it dials out to an ISP its modem would
become a PPP interface with a hostname as assigned by the ISP.)

A domain is a group of machines, typically networked together in some
form. Specifically their DNS resolution is handled by the same servers.
For example, the kernel.org domain includes servers all over the world,
but a client seeking the IP address of any of them would send its query
to one of these servers:
  NS.VGER.kernel.org.     172800  IN      A       209.116.70.75
  NS1.kernel.org.         172800  IN      A       63.209.29.2
  NS2.GIMP.org.           172800  IN      A       195.92.249.252
  NS2.kernel.org.         172800  IN      A       204.152.189.113

But as I say, typically a domain will be a network or group of networks
close together. Suppose you registered a domain name for your office
(ksinc.net is taken, BTW :) like "ksinc.net.in". You'd arrange for
hosting and DNS, either through an external provider or your own
servers. You could then assign hostnames under that domain for all the
machines under your control. If configured in the DNS server and these
machines are available on real Internet IP addresses, anyone in the
world could access your services by name.

Quote:> 2. the machine 192.168.1.1 is named as "cs" ( as host). The /etc/hosts
> file has the following entries:
> 192.168.1.1        cs
> 192.168.1.2        murali
> 192.168.1.3        maheswari, the last two entries being the names of windows
> machines with the IP no and name. (the balance machines are not added.
> is the entries are correct ?

You should leave in the default "localhost" line. Otherwise that's fine.
The /etc/hosts file (%WINBOOTDRIVE%:\%WINDIR%\hosts on Windows machines)
is a simple means of TCP/IP name resolution. I'd recommend using a fully
qualified domain name (FQDN) like this:
  192.168.1.1   cs.ksinc.office         cs

> 3. In the computer "cs" I added two users "raju" and "mnk", with
> passwords.

> 4. with this info. how can I set up the internal e-mail system. what


Set up the mail clients to use "cs" as the SMTP and POP3/IMAP server.
If they have similar hosts files, they can resolve "cs" to the IP

Again, make a FQDN as I suggested above, and use that.

Quote:> 5. Is it required to configure the "sendmail". or is it
> pre-configured? The smtp is running.

sendmail is VERY difficult. For this job I highly recommend postfix,
which I believe is included as an option in Red Hat.

You *do* need to configure the MTA to accept mail for a certain domain
name or names. Other than that (which is in one well-commented file for
postfix, probably /etc/postfix/main.cf) the default settings should
work.

Quote:> 6. for setting up an IMAP protocol e-mail what shall I do ? Is there
> any other simple solutions ?

You're most likely to trip on your default firewall. :) By default no
services are allowed in. Disable it if it's enabled.

You need to be running an IMAP server on cs. Typically this would run
from xinetd. Make sure you have such a server installed (Red Hat surely
includes one or more choices) and enabled. Check your Red Hat and/or
xinetd docs to find out how to do that.

And that's it! That's all you need to know to run an internal mail
server. The only difference between internal and external mail servers
is the matter of having an externally-resolvable hostname. Work on that
one next. :) Good luck.

--

  or put "not-spam" or "/dev/rob0" in Subject header to reply

 
 
 

setting up Intranet mail serever (newbie Question)

Post by Raju V » Wed, 15 Jan 2003 03:02:49


It seems that I am some what on the course. But when I tried TELNET
192.168.1.1 25 (i.e the port of sendmail) the connection is refused
(from any where in the network. But If I try 127.0.0.1 25 it works.
Why is this ?. How can I assign 192.168.1.1 as the server address. (I
wish to install it on this machine)

If there is any simple documentation on setting a mailserver please
tell me.


domain name of ksinc.net to my LAN ?

Regards,

Raju



> > are trying to install an internal mail network. This is for
> > communicating between officers inside the office.  Although I searched
> > the net and read the manuals I could not comprehend them in full.

> Mail is not an easy subject matter, and you seem to need a bit more
> understanding of TCP/IP as well.

> > Therefore can somebody tell me step by step what to do. I wish to
> > know:
> > 1. Can I give any name to my domain? I propose to give "ksinc.net"?

> If there is *no* external connectivity whatsoever, yes you can. If even
> one of the machines has at least a part-time Internet connection, you
> should ensure that the name is not resolvable on the Internet. What I
> use for my internal hosts is a bogus TLD: "ksinc.office" or "ksinc.lan"
> for example.

> That's a better plan for the future. Linux will make Internet connection
> sharing much easier and safer, so eventually you might want to put this
> network online. (You can also open up your mail server to provide real
> Internet mail addresses.)

> > What exactly the difference between "hosts " and domain"

> A "host" is a machine, or more technically, a network interface on a
> machine. (Every TCP/IP machine has a loopback interface called
> "localhost" on IP 127.0.0.1; if it dials out to an ISP its modem would
> become a PPP interface with a hostname as assigned by the ISP.)

> A domain is a group of machines, typically networked together in some
> form. Specifically their DNS resolution is handled by the same servers.
> For example, the kernel.org domain includes servers all over the world,
> but a client seeking the IP address of any of them would send its query
> to one of these servers:
>   NS.VGER.kernel.org.     172800  IN      A       209.116.70.75
>   NS1.kernel.org.         172800  IN      A       63.209.29.2
>   NS2.GIMP.org.           172800  IN      A       195.92.249.252
>   NS2.kernel.org.         172800  IN      A       204.152.189.113

> But as I say, typically a domain will be a network or group of networks
> close together. Suppose you registered a domain name for your office
> (ksinc.net is taken, BTW :) like "ksinc.net.in". You'd arrange for
> hosting and DNS, either through an external provider or your own
> servers. You could then assign hostnames under that domain for all the
> machines under your control. If configured in the DNS server and these
> machines are available on real Internet IP addresses, anyone in the
> world could access your services by name.

> > 2. the machine 192.168.1.1 is named as "cs" ( as host). The /etc/hosts
> > file has the following entries:
> > 192.168.1.1   cs
> > 192.168.1.2   murali
> > 192.168.1.3   maheswari, the last two entries being the names of windows
> > machines with the IP no and name. (the balance machines are not added.
> > is the entries are correct ?

> You should leave in the default "localhost" line. Otherwise that's fine.
> The /etc/hosts file (%WINBOOTDRIVE%:\%WINDIR%\hosts on Windows machines)
> is a simple means of TCP/IP name resolution. I'd recommend using a fully
> qualified domain name (FQDN) like this:
>   192.168.1.1   cs.ksinc.office         cs

> > 3. In the computer "cs" I added two users "raju" and "mnk", with
> > passwords.

> > 4. with this info. how can I set up the internal e-mail system. what

> Set up the mail clients to use "cs" as the SMTP and POP3/IMAP server.
> If they have similar hosts files, they can resolve "cs" to the IP

> Again, make a FQDN as I suggested above, and use that.

> > 5. Is it required to configure the "sendmail". or is it
> > pre-configured? The smtp is running.

> sendmail is VERY difficult. For this job I highly recommend postfix,
> which I believe is included as an option in Red Hat.

> You *do* need to configure the MTA to accept mail for a certain domain
> name or names. Other than that (which is in one well-commented file for
> postfix, probably /etc/postfix/main.cf) the default settings should
> work.

> > 6. for setting up an IMAP protocol e-mail what shall I do ? Is there
> > any other simple solutions ?

> You're most likely to trip on your default firewall. :) By default no
> services are allowed in. Disable it if it's enabled.

> You need to be running an IMAP server on cs. Typically this would run
> from xinetd. Make sure you have such a server installed (Red Hat surely
> includes one or more choices) and enabled. Check your Red Hat and/or
> xinetd docs to find out how to do that.

> And that's it! That's all you need to know to run an internal mail
> server. The only difference between internal and external mail servers
> is the matter of having an externally-resolvable hostname. Work on that
> one next. :) Good luck.

 
 
 

setting up Intranet mail serever (newbie Question)

Post by Peter T. Breue » Wed, 15 Jan 2003 03:17:46



> It seems that I am some what on the course. But when I tried TELNET
> 192.168.1.1 25 (i.e the port of sendmail) the connection is refused
> (from any where in the network. But If I try 127.0.0.1 25 it works.
> Why is this ?. How can I assign 192.168.1.1 as the server address. (I

Why shouldn't it be like that? Firewalls tend not to leave external
ports open, for a start. Sendmail only binds to the ports you tell it
to, under some configurations, etc.

Quote:> wish to install it on this machine)

It's a fact, not something that you "assign".

Quote:> If there is any simple documentation on setting a mailserver please
> tell me.

You don't need any. It's a question of configuring the server and
starting it.

It isn't.

Quote:> domain name of ksinc.net to my LAN ?

So that the mail software works. It has to know what is a local
address and what is not, and unless you supply a domain name it's kinda
hard to tell.

Peter

 
 
 

setting up Intranet mail serever (newbie Question)

Post by /dev/rob » Wed, 15 Jan 2003 05:55:17


Please trim unnecessary quoted text, and don't top-post. Thanks.


> 192.168.1.1 25 (i.e the port of sendmail) the connection is refused
> (from any where in the network. But If I try 127.0.0.1 25 it works.
> Why is this ?.

Already answered: disable your firewall.

Quote:> How can I assign 192.168.1.1 as the server address. (I
> wish to install it on this machine)

Normally you'd configure it to listen on all interfaces. In postfix this
is controlled in the main.cf file. But your problem more likely is that
the firewall is blocking you.

Quote:> If there is any simple documentation on setting a mailserver please

Each MTA (postfix, exim, qmail, sendmail and others) has its own set of
documentation. I recommended postfix because I know it's easy. Probably
the main.cf is the only thing you need to read.

At this point I think a TCP/IP fundamentals tutorial would help you
more. I think there's one at www.netfilter.org. Probably some of the
ones from tldp.org would help as well.


> domain name of ksinc.net to my LAN ?

Perhaps none? Many things you will try to run want to find a FQDN for
the system hostname. But that has nothing to do with the mail server.


will try to resolve. If postfix sees "cs" in "$my_destination" it will
handle the message as a local one. Otherwise it will try to look up the
hostname (by sending a DNS query to one of the nameservers listed in
/etc/resolv.conf). If the hostname exists, postfix will go to its port
25 (or to the port 25 of the MX record if found.)

--

  or put "not-spam" or "/dev/rob0" in Subject header to reply