Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to create mail server

Status
Not open for further replies.

emmons

Technical User
Oct 9, 2002
114
Hello,

How do I get started? I work at a library, I need to set up an email server. We are on what is called a K20 network. I believe it is what community colleges and other schools have. I am wondering about hardware requirements and software requirements, that's all! What should I read or do to get started? What I know so far is perhaps I should install Red Hat and configure sendmail. How about some advice on how to get started. What info I can provide to you in order to get some practical advice.

Thank you!
 
If you are familiar with linux and the shell, you don't need to install everything on the CD's. You can tell the install programm that you plan on using this as a server and it will install everything you need to get up and running without all the overhead of running the GUI stuff (this takes up a lot of resources). Before you can run any type of server that will be accessed through the internet, you will need a domain name. If you don't already have one, you can get one from a registrar such as for about $8.00 a year. You will need to assign the IP of at least 2 DNS servers. You can use your registrar's or use a service such as to hold your dns records. There are 2 main dns records that you will need to modify from time to time. The "A" or Address record and "MX" Mail eXchange. The "A" record points your domain name to your IP address. It will also your sub-domains to your IP such as mail.yourdomain.com. The "MX" record tells the DNS server that mail.yourdomain.com handles the mail for yourdomain.com. When mail comes into you server, sendmail puts it in /var/spool/mail/username. Username is the name of a user on the local system. Once a user gets mail, they will have a file in that directory with their name. All of one persons mail is kept in one file. To be able to get mail off of the server at this point, you need a POP3 server. There is a pop3 daemon that comes with RedHat or you can download qpopper. The user will setup their mail client using mail.yourdomain.com as both the SMTP and POP servers. Then they will be able to get and send mail through your server just like they do their ISP. This was just an over view of what needs to be done. You may want to visit to get more info on setting up a mail server.
 
thanks rhythmace - the library already has a domain name in the format The library has a web server already. I want to make a mail server in a separate box using the email addresses username@city.lib.state.us. Is that using the same domain name? How do I get around this or do I have to?
 
Hi,

I think rhythmace gave you a great outline of how it all works. Yes this is using the same domain and know you do not need to work around it. Since the library has it's own domain and hosting it themselves your in business. You will need to talk to the system admin of the web server. They will have to open port25 so mail gets through to your domain. Find out if there are hosting there own dns for there domain. As rhythmace mentioned you will have to modify the dns zone record for the domain.

You will need to add lines similiar to these below to your zone file so the mail for your domain knows where to get delivered to. Use the ip of the new box your adding.

mail IN A 72.96.52.128
IN MX 10 mail
domain.com. IN MX 10 mail.domain.com.

Are you planning on doing this on a lan ip or public ip? Blizz
 
Hmmmm. Public ip or lan ip. I think it must be a public ip because the employees want to access their email from outside the library such as when they are home or on trips, etc. So does public ip sound right? Thanks a bunch for your help.
 
If you don't know the difference then you will need help from your system admin. They will need to allow port 25 and 110 to pass through the firewall. They will also need to forward that traffic to the ip of your mail server. What blizz means by public or private ip is a public ip is one that can be seen from the internet. To allow other computers on the local network to be able to access the internet, the network uses a gateway or router to the internet. The router is given a public ip from an internet service provider (ISP). The router needs to know where to route data to and from local computers so they are given a private ip that can only be seen by computers on that local network.
 
So rhythmace, a router is like a network interface card in that it has its own ip address? I haven't worked with routers but I will now. So you assign an ip address to each router?
 
Simply put, a router is a device that is installed at the library somewhere. It is what connects your LAN (local area network, or the machines in the library) to a WAN (wide area net, or a network that is outside the building somewhere). A router usually has several IP addresses, one for the wan interface, one for it's lan interface, etc. You probably only have one router.




Depending on what your setup is out there you might have a computer that actually hosts the WAN connection and provides service to the LAN (a 'software router')





You might want to check out a book on network topology or some CCNA training material. Networking is cool but complicated field and getting the basics down now before you get into something complicated like running an email server will help you a lot. Have fun!
 
So, verland, do you think running a mail server is a complicated endeavor? Any specific reading recommendations? I do like user friendly books. I have to start somewhere. I would like to know just what I need to know to get started and then learn on the job as they say. But I need to know enough to stay out of trouble if that is possible. I'll take any help and advice that I can get! How would I decide between an IMAP or a POP server? Does the number of employees make a difference? It's less than 50 if that matters.
 
Running an email server is not especially complicated but there are a lot of security and networking issues it helps to know about. You also need to know a bit about email clients and how they work. A lot of this is simple stuff, there's just an awful lot of 'simple'.



I wish I could recomend some reading but I'm just getting into *nix mail myself. Most of my email experience is self taught stuff on M$ Exchange. Perhaps someone else knows some good books?



Personally I like IMAP but it just depends on what you are doing. You will need POP anyway if you want to do internet email, but you can run both.



I think as long as your number of users does not tax the hardware or network (your talking, like 100's of mailboxen) it doesn't really matter. Support will matter though if you are the helpdesk for everyone, but if it's setup well you won't have many problems. Email administration is easy, most problems happen when users delete something by whoops, can't get off a mailing list, want to do something weird or other such noise :)
 
Mail with sendmail can be tough.
I personally am a huge fan of postfix, though
I have used sendmail in production and home
environments since 8.9.x as well.

For POP service QPOP is better than the vanilla
*nix POP server that ships with some linux distros.

As far as hardware:
I have had a production linux machine with
antiquated hardware, an add-on ide card with
chipset support that only seems to work k2.2.14,
-w- 32 megs of edo RAM, that services a VERY busy
125+ user LAN, running sendmail, and also provides primary
dns for the customer. Very stable, 2+ years.
Try that with exchange ;)

Sendmail can be tough to configure for special purpose
things. I have recompiled I don't know how many configs
using M4 in the last 3.5 years supporting special send-
mail "after-the-fact" readjustments.
Sendmail.cf syntax is a pain..yes, you can do what you
want..the learning curve is steep.
 
thanks verland and marsd - so you say I need POP if someone wants to access my mail server using "hotmail" for example. I did not realize that even though my 16 year told me that. Hmmm. kids. So why doesn't IMAP work? Different set of rules? marsd, What did you mean by K2.2.14 anyway? Libraries, as you may have guessed, typically have antiquated hardware. How did you know? At least public libraries. If I can avoid the steep learning curve I would like to. Thanks for the hardware info. I needed that.
 
K2.2.14 == Kernel 2.2.14.
Which is quite old and suffers from several internal
security problems, so it shouldn't be an option.
As a matter of fact pre 2.2.20 series kernel's have
a potentially serious kernel security problem.

Depending on your user base, if these are the only
services your machine is offering you can get by with
an older 586. I would suggest a large harddrive, and
a journaling file system.

IMAP is fine, but insecure. POP3 is just a no frills
mail storage and retrieval protocol and may not be
what you want if your users want complicated retrieval
and access to their mail. Without knowing what your
users want a POP server is a good place to start.
Your mail client must support the protocol(IMAP/POP3)
for it to "work".

Postfix is much easier to work with than sendmail.
I would suggest forgetting sendmail if you want to
avoid learning curves.
 
Can you tell me what is considered complicated retreival and access to mail? Also, what is a journaling file system? Thanks for the postfix suggestion. I like it that is consists of sseveral pecific programs to do specific tasks and is easier to find and fix errors than using one big file like sendmail does. are there any advantages to using sendmail? I don't mind learning curves but was hoping to aviod an especially steep one. I'm hoping to get the library to give me a box SOON so I can get started and have more specific questions to ask.
 
IMAP allows a wide range of options for the user in mail retrieval, in addition to offering a different mail storage format.
You can read more about a decent imap
server and implementation here.

No there are really no advantages to running sendmail anymore IMO.

GoodLuck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top