Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-07-2014, 11:00 AM   #1
LQ Newbie
Registered: Sep 2012
Posts: 26

Rep: Reputation: Disabled
Postfix for Local Area Network Config Help ?

I wanted to learn Mail Servers, since i don't have a VPS, i am trying to work with postfix in my LAN env.

I have 2 Virtual Machines running Cent OS with postfix installed.

I have changed there hostnames with hostname command and here are the details :- ( ) ( )

In the /etc/host file of server , i have made an entry of and same with client side for server.

Now is this configuration right ? What am i suppose to do if i want to send mail to from ?

If there is root account in client side, should i send mail to from server ?

Last edited by sunzeal; 03-07-2014 at 11:02 AM.
Old 03-08-2014, 06:58 AM   #2
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 2,458

Rep: Reputation: Disabled
You can't properly test Internet mail functionality using hosts files alone; you'll have to set up a local DNS server (I recommend BIND). Sure, you could force the mail client software to use the Postfix server for all outgoing mail, but why not configure the test environment the same the way Internet domains and mail servers are configured?

Mail is delivered to the SMTP server defined as the Mail Exchanger for a given domain. This definition is found in a particular kind of DNS record, the MX record, in the DNS zone file for every mail-enabled domain.

You could to do something like this:
  1. Install the BIND DNS server (it may already be present on your system
  2. Create a DNS zone for testing purposes (you should use an invalid TLD, like "mailtest.local")
  3. Create an A record in this zone (something like "mail.mailtest.local"), pointing to the IP address of the mail server
  4. Create an MX record pointing to the name of the A record from [3]
  5. Configure forwarding so the BIND server can resolve Internet names as well
  6. Edit /etc/resolv.conf on both systems to have them use this DNS server
You should then be able to send mail from the client host to the server, and you should proceed to edit the Postfix configuration file in order to have it accept mail for the "mailtest.local" domain.

Last edited by Ser Olmy; 03-08-2014 at 07:00 AM. Reason: typo


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
Postfix - local area LAN and internet problems wheelnut Linux - Newbie 2 03-05-2013 12:37 AM
Setting up POP3 and SMTP server on Dovecot and Postfix over local area network ngkangjin Linux - Server 5 10-02-2010 05:41 AM
[SOLVED] Creating simultaneous network connections to a VPN and local area network. Reactor89 Linux - Networking 2 06-03-2010 12:52 AM
see the local area network vipin_jss Linux - Software 2 08-27-2007 05:50 PM
Local area network Anthony123 Linux - Laptop and Netbook 1 08-13-2003 05:00 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 AM.

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