LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-07-2011, 11:25 PM   #1
magicalshashank31
Member
 
Registered: Apr 2011
Posts: 81
Blog Entries: 1

Rep: Reputation: 0
postfix not working over LAN


i am trying to Configure a mail transfer agent (MTA) to accept inbound email from other systems and
Configure an MTA to forward (relay) email through a smart host.

Code:
#postconf -e inet_interface=all
#postconf -e myorigin=server.example.com 
#postconf -e mynetworks="127.0.0.0/8 192.168.137.0/24"
#service postfix restart
here "server.example.com is my machine name"(192.168.137.1}

i am able to send mail to the users of my machine via
Code:
#mail user1
hiii
EOT
but when i try to send mail to the users of other machine over my lan 192.168.137.2
Code:
#mail user2@192.168.137.2
hiii
EOT
the mail is not able to reached to any user of 192.168.137.2.
 
Old 08-07-2011, 11:39 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Quote:
#postconf -e inet_interface=all
try
Code:
#postconf -e "inet_interfaces = all"
 
Old 08-08-2011, 12:44 AM   #3
magicalshashank31
Member
 
Registered: Apr 2011
Posts: 81

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
try
Code:
#postconf -e "inet_interfaces = all"
sory it was writing mistake ,it is inet_interfaces=all
but it do not worked for me.
 
Old 08-08-2011, 01:29 AM   #4
jrosco
Member
 
Registered: Aug 2010
Location: Australia
Posts: 37

Rep: Reputation: 4
Logs are your friends try something like this

Code:
less /var/log/maillog
or

Code:
less /var/log/mail.log
Depending on your system. This can tell you whats happening behind the scenes.

JC
 
Old 08-08-2011, 02:17 AM   #5
vivekraghuwanshi
LQ Newbie
 
Registered: Apr 2008
Location: India
Distribution: Redhat,Centos,Ubuntu
Posts: 8
Blog Entries: 3

Rep: Reputation: 1
please configure the postfix to process all lan queries
 
Old 08-08-2011, 05:44 AM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Following jrosco's comments, please try 'tailf /var/log/maillog' in one terminal then attempt to send an email in another terminal. If you post the logs from that time period we can assist with troubleshooting.
 
Old 08-08-2011, 09:10 AM   #7
magicalshashank31
Member
 
Registered: Apr 2011
Posts: 81

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Following jrosco's comments, please try 'tailf /var/log/maillog' in one terminal then attempt to send an email in another terminal. If you post the logs from that time period we can assist with troubleshooting.

when i send mail to my local user from root
Code:
#mail shank1
hiiii
EOT
and check 'tail /var/log/maillog' it shows the message is delivered from root@client.example.com to=shank1@client.example.com to its mail box

but when i use
Code:
#mail shank@192.168.137.1 {where shank is the user of my second machine 192.168.137.1(server.example.com)}
hello
EOT
and then check the

Code:
#tail /var/log/maillog
it shows
Aug 9 07:57:01 client postfix/qmgr[1499]: 60E0F231D6 removed
and when use
Code:
#mail shank@server.example.com
hiii
EOT
 it shows 

Aug 9 07:57:01 client postfix/qmgr[1499]: 6464C231DA :from=root@client.example.com ,size 451 nrcpt=1 (queue: active)
Aug 9 07:57:01 client postfix/qmgr[1499]: 6464C231DA to=<shank@server.example.com> relay=none  status :deferred ,hostname or domain name not found. Name service error for name=server.example.com type MX not found .try again

Last edited by magicalshashank31; 08-08-2011 at 09:27 AM.
 
Old 08-08-2011, 06:38 PM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Quote:
the message is delivered from root@client.example.com to=shank1@client.example.com to its mail box
Where is this mailbox located?

Please try 'mail shank@[192.168.137.1]' and see what the logs say
 
Old 08-08-2011, 11:30 PM   #9
magicalshashank31
Member
 
Registered: Apr 2011
Posts: 81

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Where is this mailbox located?

Please try 'mail shank@[192.168.137.1]' and see what the logs say
the mailbox is in /var/spool/mail/shank
and what about the error hostname server.example.com not found type=MX ,what does it say???
 
Old 08-09-2011, 10:46 AM   #10
magicalshashank31
Member
 
Registered: Apr 2011
Posts: 81

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Where is this mailbox located?

Please try 'mail shank@[192.168.137.1]' and see what the logs say
when i use 'mail shank@[192.168.137.1]' it says in /var/log/maillog that connect to 192.168.137.1[192.168.137.1]:25:connection refused status : deffered
 
Old 08-09-2011, 06:14 PM   #11
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Sounds like it's not accepting connections .. try running 'netstat -tnlp | grep postfix' on 192.168.137.1.
 
Old 08-10-2011, 01:17 AM   #12
magicalshashank31
Member
 
Registered: Apr 2011
Posts: 81

Original Poster
Blog Entries: 1

Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
Sounds like it's not accepting connections .. try running 'netstat -tnlp | grep postfix' on 192.168.137.1.
no not working ,it says same error connection refused when try mail shank@[192.168.137.1] after running 'netstat -tnlp | grep postfix'
on machine 192.168.137.1
 
  


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
how to make postfix send email to another postfix in local network (LAN)? h4k33m Linux - Server 9 06-04-2015 04:33 PM
[SOLVED] Postfix smtpd_recipient_restrictions not working (postfix, amavis, SA, BSD) andrewggrant *BSD 2 08-29-2012 11:41 AM
Ethernet LAN, Sound and Wireless LAN not working dongarry Linux - Newbie 1 11-03-2009 03:31 PM
Postfix TLS working fine but SSL over port 25 not working bob808 Linux - Server 10 07-25-2009 09:20 PM
Postfix Configuration Question: Postfix server as a catch-all on office LAN enso491 Linux - Server 5 04-14-2008 04:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:32 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
Open Source Consulting | Domain Registration