LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   postfix not working over LAN (https://www.linuxquestions.org/questions/linux-server-73/postfix-not-working-over-lan-896118/)

magicalshashank31 08-07-2011 11:25 PM

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.

kbp 08-07-2011 11:39 PM

Quote:

#postconf -e inet_interface=all
try
Code:

#postconf -e "inet_interfaces = all"

magicalshashank31 08-08-2011 12:44 AM

Quote:

Originally Posted by kbp (Post 4436435)
try
Code:

#postconf -e "inet_interfaces = all"

sory it was writing mistake ,it is inet_interfaces=all
but it do not worked for me.:(

jrosco 08-08-2011 01:29 AM

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

vivekraghuwanshi 08-08-2011 02:17 AM

please configure the postfix to process all lan queries

kbp 08-08-2011 05:44 AM

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.

magicalshashank31 08-08-2011 09:10 AM

Quote:

Originally Posted by kbp (Post 4436666)
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


kbp 08-08-2011 06:38 PM

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

magicalshashank31 08-08-2011 11:30 PM

Quote:

Originally Posted by kbp (Post 4437253)
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???

magicalshashank31 08-09-2011 10:46 AM

Quote:

Originally Posted by kbp (Post 4437253)
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

kbp 08-09-2011 06:14 PM

Sounds like it's not accepting connections .. try running 'netstat -tnlp | grep postfix' on 192.168.137.1.

magicalshashank31 08-10-2011 01:17 AM

Quote:

Originally Posted by kbp (Post 4438222)
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


All times are GMT -5. The time now is 10:13 PM.