LinuxQuestions.org
Register a domain and help support LQ
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 03-07-2014, 12:00 PM   #1
sunzeal
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 :-

server.test.com ( 192.168.2.2 )
client.test.com (192.168.2.4 )

In the /etc/host file of server , i have made an entry of client.test.com 192.168.2.4 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 client.test.com from server.test.com ?

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

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

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 08:00 AM. Reason: typo
 
  


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


All times are GMT -5. The time now is 02:19 AM.

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