LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-28-2004, 06:31 AM   #1
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Rep: Reputation: 15
Setting up a mail server


hi,

I have set up a small LAN with two computers. I have access to mail through my ISP but I want to set up a mail server for my LAN so I can have internal email addresses. I have looked at POSTFIX and read some of the documentation but I'm still not sure how to get the MTA up and running or how to administer it (add addresses, point mail client to the server....). Can anyone help???

Thanks
Steve
 
Old 01-28-2004, 10:51 AM   #2
GraemeK
Member
 
Registered: Aug 2003
Location: Essex, UK
Distribution: Windoze 2000, Fedora Core 3
Posts: 325

Rep: Reputation: 30
I dont use POSTFIX and only Sendmail at the moment but the steps all much the same...

first off i'm guessing you dont have a public domain name? therefore this internal mail is completely seperate from any external email?

right then... The way i see it you'll have to setup a DNS server. Then configure POSTFIX to listen on post 25 for mail. You can tell a mail server to forward mail on to an external mail server like your isp's but then you wont have a real domain name so i'd guess it would rejected it...

You'd setup aliases for pop and smtp pointing to your mailserver hostname. to enter into your email clients. You'd also need to enable the POP or IMAP service for mail retreival.

there the basics......i can explain more.

Last edited by GraemeK; 01-28-2004 at 11:11 AM.
 
Old 01-29-2004, 02:28 AM   #3
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Original Poster
Rep: Reputation: 15
hi,

Okay, I have DNS server installed (BIND) but how do I set it up for my domain?? Also we can use sendmail instead of POSTFIX as an example since I just need to find my way around setting up a mail server.

How do I configure sendmail to listen on port 25 and how can I check that it's running?

What is an alias and where to I set them up?

Also if I run my own internal mail server will this affect my mail which I receive from my ISP??

Thanks for the help.
Steve
 
Old 01-29-2004, 04:17 AM   #4
GraemeK
Member
 
Registered: Aug 2003
Location: Essex, UK
Distribution: Windoze 2000, Fedora Core 3
Posts: 325

Rep: Reputation: 30
I cant remember all the files off the top of my head for BIND but you'll need to create the zone files for forward and reverse lookup's and then modify the named.conf file in /etc once you've confirmed bind is work thats a start! oh and to use mail you'll need an MX record in your forward lookup zone file.

Now in /etc/mail theres a file for sendmail called sendmail.mc this is the configuration template. do all your changes here then you submit a command with generates the sendmail.cf file which sendmail uses. In the sendmail.mc file you specifiy the the IP's that sendmail listens on i.e 127.0.0.1 and the network IP wether this is a private or public ip doesnt matter but in your case if its only internal mail i guess it'll be within the 192.168 range?

aliases are nicknames to a user account for example... root isnt allowed to recieve email etc for security reasons (i think) so you setup an alias to send all email to root@domain.com to username@domain.com

so its baically a pointer.

um...you'' find a file in /etc called aliases. edit that. once your done you need to run the newaliases command to rebuild the aliases DB.

i dont see running an internal mail server causing problems. at the moment they only way i see it is to have two accounts setup in your mail client... i guess you can configure sendmail or postfix to send email on to another server but if you havent got your own domain this might be a problem?

in my case i own a domain and use my own mail server for local and external email. if i wanted my isp to relay email for me then i'd have to get them to configure their dns and mail server for me and then tell my mail server to send any external email (anything otherthan my domain) to the isp's server to forward on. but as i said if you havent a real piublic domain this wouldnt work? (i dont think)

G
 
Old 01-29-2004, 06:41 AM   #5
stedo
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 22

Original Poster
Rep: Reputation: 15
hi,

Okay, I'm on the way here. I have made some changes to my named configuration files, started the DNS service and it seems to be up and running. I have not added an MX record though, what does this record look like and where do I add it?? named.conf??

Thanks
Steve
 
Old 01-29-2004, 07:47 AM   #6
GraemeK
Member
 
Registered: Aug 2003
Location: Essex, UK
Distribution: Windoze 2000, Fedora Core 3
Posts: 325

Rep: Reputation: 30
you add the MX record to the forward look file in /var/named

i.e name to IP file

the MX record tells who's the mail server for the domain and the order of prefence

i.e

IN MX 1 hostname.domainname.com

'1' stands for first priority then 10 or 100 could be second etc etc
 
Old 01-29-2004, 07:49 AM   #7
GraemeK
Member
 
Registered: Aug 2003
Location: Essex, UK
Distribution: Windoze 2000, Fedora Core 3
Posts: 325

Rep: Reputation: 30
like so:

Authoritative data for Berkeley.EDU (ORIGIN assumed Berkeley.EDU)
;
$TTL 86400
;name ttl add-cls type specific data
@ IN SOA xxxxxxxxxxxxxx xxxxxxx
xxxxxxxxxxxxxxxxxxxxxx. (
2003090901 ; Serial
14400 ; Refresh 4 hours
300 ; Retry 5 minutes
1209600 ; Expire 2 week
3600 ) ; Minimum 1 hours
; in seconds,
; 60 = one minute
; 3600 = one hour
; 86400 = one day
; 604800 = one week
;
IN NS xxxxxxxxxxxxxxxxxxx

IN MX 1 xxxxxxxxxxxxxxxxxxxx
 
Old 02-09-2004, 09:08 PM   #8
ptalwar
LQ Newbie
 
Registered: May 2003
Posts: 1

Rep: Reputation: 0
HI,

do i need to setup bind on my Linux server which will be running the mail server? i am going to have my domain name register through a DNS provider. so please let me know what would be the best way to setup a simple mail server?
 
Old 02-10-2004, 05:21 PM   #9
jimval7
Member
 
Registered: Jan 2002
Location: Dallas, TX
Distribution: RedHat 7.0 - Kernel 2.4.17
Posts: 95

Rep: Reputation: 16
BIND

I don't run bind on my webserver, if you run your own DNS server, then yes, you will have to setup bind.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a Mail Server dr_angus Linux - Software 1 03-09-2005 09:57 AM
setting up a mail server krille Linux - Newbie 9 03-03-2005 09:03 AM
Setting up a mail server? ziphem Linux - Newbie 2 11-27-2004 02:09 AM
need help setting up a mail server Chijtska Linux - Networking 4 02-28-2002 09:23 PM
Setting up a mail server linuxguruwannabe Linux - Networking 13 08-07-2000 02:59 PM


All times are GMT -5. The time now is 08:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration