Not able to send mails between one machine to another

Hi all,

  I have configured Post fix installation for a local dns server(with domain name as dns.internal) in OPEN SUSE 11.1 .I have set the dns A ,NS, MX record accordingly.Since i am learning i have used the same server for both dns as well as mail server and IP of the machine is 192.168.1.20.

i am able to send and receive mails locally(within 192.168.1.20) that is to/fro between local users without issues.Now i installed centos in another machine with IP(192.168.1.40) and joined this machine to my local dns server(192.168.1.20).I am able to ping the machines from each other but sending and receiving mails fail).

FQDN of the dns server(OPENSUSE 11.1) is suse1.dns.internal(machine 1)
FQDN of the centos machine is centos.dns.internal(machine 2)

when i run mailq command after sending the mail from user@machine1 to user@machine2 the following error i get and similar error while sending from user@machine 1 to user@machine 2.
root@suse1#sendmail -v guest_user@centos.dns.internal

#####gave some subject and text ,saved and mailed#######
root@suse1#mailq

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
1A32242045 599 Thu Aug 20 15:55:10 root@dns.internal
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
guest_user@dns.internal

12C0942066 1931 Thu Aug 20 18:19:44 MAILER-DAEMON
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

7A31142048 2182 Thu Aug 20 15:53:08 MAILER-DAEMON
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

05B3A42074 293 Thu Aug 20 19:46:43 root@dns.internal
(connect to centos.dns.internal[192.168.1.40]:25: Connection refused)
root@centos.dns.internal

987764206B 1943 Thu Aug 20 18:44:12 MAILER-DAEMON
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

6B33C42069 317 Thu Aug 20 18:43:55 root@dns.internal
(connect to centos.dns.internal[192.168.1.40]:25: No route to host)
guest_user@centos.dns.internal

599E44206F 2351 Thu Aug 20 19:41:42 MAILER-DAEMON
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

C28F74205E 2758 Thu Aug 20 17:19:12 MAILER-DAEMON
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

E559C42063 291 Thu Aug 20 18:19:38 root@dns.internal
(connect to centos.dns.internal[192.168.1.40]:25: No route to host)
root@centos.dns.internal

2FFC742054 599 Thu Aug 20 16:01:02 root@dns.internal
(delivery temporarily suspended: connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
guest_user@dns.internal

2C0D942077 1839 Thu Aug 20 19:46:51 MAILER-DAEMON
(connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

8A23042058 2758 Thu Aug 20 17:14:12 MAILER-DAEMON
(delivery temporarily suspended: connect to suse1.dns.internal[192.168.1.20]:25: Connection refused)
root@dns.internal

####Similarly while trying to send mails from centos machine to my suse machine #####

root@centos#sendmail -v root@suse1.dns.internal
root@centos#mailq

/var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
n7KEIBPA002254 0 Thu Aug 20 19:48 <guest_user@centos.dns.internal>
(Deferred: Connection refused by suse1.dns.internal.)
<root@suse1.dns.internal>
n7KCjQcp003781 12 Thu Aug 20 18:15 <root@centos.dns.internal>
(Deferred: Connection refused by suse1.dns.internal.)
<root@suse1.dns.internal>
Total requests: 2

I tried checking for dig nslookup frm both the machines.No problems in name resolution.Should i do anything with the confguration files?

And also i got a mailer delivery mail

Date: Fri, 21 Aug 2009 12:35:14 +0530
From: Mail Delivery Subsystem <MAILER-DAEMON@centos.dns.internal>
To: <root@centos.dns.internal>
Subject: Warning: could not send message for past 4 hours
Auto-Submitted: auto-generated (warning-timeout)

– Attachment #1 --]
– Type: text/plain, Encoding: 7bit, Size: 0.5K --]

********************************************** 
**      THIS IS A WARNING MESSAGE ONLY	** 
**  YOU DO NOT NEED TO RESEND YOUR MESSAGE  ** 
********************************************** 

The original message was received at Thu, 20 Aug 2009 18:15:26 +0530
from centos.dns.internal [127.0.0.1]

----- Transcript of session follows -----
<root@suse1.dns.internal>… Deferred: Connection refused by suse1.dns.internal.
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old

– Attachment #2 --]
– Type: message/delivery-status, Encoding: 7bit, Size: 0.3K --]

Reporting-MTA: dns; centos.dns.internal
Arrival-Date: Thu, 20 Aug 2009 18:15:26 +0530

Final-Recipient: RFC822; root@suse1.dns.internal
Action: delayed
Status: 4.4.1
Remote-MTA: DNS; suse1.dns.internal
Last-Attempt-Date: Fri, 21 Aug 2009 12:35:14 +0530
Will-Retry-Until: Tue, 25 Aug 2009 18:15:26 +0530

– Attachment #3 --]
– Type: message/rfc822, Encoding: 7bit, Size: 0.7K --]

Date: Thu, 20 Aug 2009 18:15:26 +0530
From: root <root@centos.dns.internal>
To: root@suse1.dns.internal
Subject: Testing
User-Agent: Mutt/1.4.2.2i

Hi testing

Please help me in this regard…Thanks

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well you’ve certainly found the issue… did you try using Google to
search on ‘Connection Refused’? It would appear you have not told the
receiving machine to listen on a non-localhost IP using port 25 (the
default SMTP port) and as a result it, like every other mail server on
Linux by default, is probably listening only on 127.0.0.1:25 instead of
yourPublicIP:25 so even if your firewall is not blocking port 25 you still
do not have a socket to which you can connect. Reconfigure Postfix to
listen on its other IPs and you will likely be done.

Good luck.

fizeeosuse wrote:
> Hi all,
>
> I have configured Post fix installation for a local dns
> server(with domain name as dns.internal) in OPEN SUSE 11.1 .I have set
> the dns A ,NS, MX record accordingly.Since i am learning i have used the
> same server for both dns as well as mail server and IP of the machine is
> 192.168.1.20.
> i am able to send and receive mails locally(within 192.168.1.20) that
> is to/fro between local users without issues.Now i installed centos in
> another machine with IP(192.168.1.40) and joined this machine to my
> local dns server(192.168.1.20).I am able to ping the machines from each
> other but sending and receiving mails fail).
>
> FQDN of the dns server(OPENSUSE 11.1) is suse1.dns.internal(machine 1)
> FQDN of the centos machine is centos.dns.internal(machine 2)
>
> when i run mailq command after sending the mail from user@machine1 to
> user@machine2 the following error i get and similar error while sending
> from user@machine 1 to user@machine 2.
> root@suse1#sendmail -v guest_user@centos.dns.internal
>
> #####gave some subject and text ,saved and mailed#######
> root@suse1#mailq
>
>
> -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
> 1A32242045 599 Thu Aug 20 15:55:10 root@dns.internal
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> guest_user@dns.internal
>
> 12C0942066 1931 Thu Aug 20 18:19:44 MAILER-DAEMON
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> root@dns.internal
>
> 7A31142048 2182 Thu Aug 20 15:53:08 MAILER-DAEMON
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> root@dns.internal
>
> 05B3A42074 293 Thu Aug 20 19:46:43 root@dns.internal
> (connect to centos.dns.internal[192.168.1.40]:25: Connection
> refused)
> root@centos.dns.internal
>
> 987764206B 1943 Thu Aug 20 18:44:12 MAILER-DAEMON
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> root@dns.internal
>
> 6B33C42069 317 Thu Aug 20 18:43:55 root@dns.internal
> (connect to centos.dns.internal[192.168.1.40]:25: No route
> to host)
> guest_user@centos.dns.internal
>
>
> 599E44206F 2351 Thu Aug 20 19:41:42 MAILER-DAEMON
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> root@dns.internal
>
> C28F74205E 2758 Thu Aug 20 17:19:12 MAILER-DAEMON
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> root@dns.internal
>
> E559C42063 291 Thu Aug 20 18:19:38 root@dns.internal
> (connect to centos.dns.internal[192.168.1.40]:25: No route
> to host)
> root@centos.dns.internal
>
> 2FFC742054 599 Thu Aug 20 16:01:02 root@dns.internal
> (delivery temporarily suspended: connect to
> suse1.dns.internal[192.168.1.20]:25: Connection refused)
> guest_user@dns.internal
>
> 2C0D942077 1839 Thu Aug 20 19:46:51 MAILER-DAEMON
> (connect to suse1.dns.internal[192.168.1.20]:25: Connection
> refused)
> root@dns.internal
>
> 8A23042058 2758 Thu Aug 20 17:14:12 MAILER-DAEMON
> (delivery temporarily suspended: connect to
> suse1.dns.internal[192.168.1.20]:25: Connection refused)
> root@dns.internal
>
> ####Similarly while trying to send mails from centos machine to my suse
> machine #####
>
> root@centos#sendmail -v root@suse1.dns.internal
> root@centos#mailq
>
> /var/spool/mqueue (2 requests)
> -----Q-ID----- --Size-- -----Q-Time-----
> ------------Sender/Recipient-----------
> n7KEIBPA002254 0 Thu Aug 20 19:48
> <guest_user@centos.dns.internal>
> (Deferred: Connection refused by suse1.dns.internal.)
>
> <root@suse1.dns.internal>
> n7KCjQcp003781 12 Thu Aug 20 18:15 <root@centos.dns.internal>
> (Deferred: Connection refused by suse1.dns.internal.)
>
> <root@suse1.dns.internal>
> Total requests: 2
>
>
>
> I tried checking for dig nslookup frm both the machines.No problems in
> name resolution.Should i do anything with the confguration files?
>
> And also i got a mailer delivery mail
>
> Date: Fri, 21 Aug 2009 12:35:14 +0530
> From: Mail Delivery Subsystem <MAILER-DAEMON@centos.dns.internal>
> To: <root@centos.dns.internal>
> Subject: Warning: could not send message for past 4 hours
> Auto-Submitted: auto-generated (warning-timeout)
>
> – Attachment #1 --]
> – Type: text/plain, Encoding: 7bit, Size: 0.5K --]
>
> **********************************************
> ** THIS IS A WARNING MESSAGE ONLY **
> ** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
> **********************************************
>
> The original message was received at Thu, 20 Aug 2009 18:15:26 +0530
> from centos.dns.internal [127.0.0.1]
>
> ----- Transcript of session follows -----
> <root@suse1.dns.internal>… Deferred: Connection refused by
> suse1.dns.internal.
> Warning: message still undelivered after 4 hours
> Will keep trying until message is 5 days old
>
> – Attachment #2 --]
> – Type: message/delivery-status, Encoding: 7bit, Size: 0.3K --]
>
> Reporting-MTA: dns; centos.dns.internal
> Arrival-Date: Thu, 20 Aug 2009 18:15:26 +0530
>
> Final-Recipient: RFC822; root@suse1.dns.internal
> Action: delayed
> Status: 4.4.1
> Remote-MTA: DNS; suse1.dns.internal
> Last-Attempt-Date: Fri, 21 Aug 2009 12:35:14 +0530
> Will-Retry-Until: Tue, 25 Aug 2009 18:15:26 +0530
>
> – Attachment #3 --]
> – Type: message/rfc822, Encoding: 7bit, Size: 0.7K --]
>
> Date: Thu, 20 Aug 2009 18:15:26 +0530
> From: root <root@centos.dns.internal>
> To: root@suse1.dns.internal
> Subject: Testing
> User-Agent: Mutt/1.4.2.2i
>
> Hi testing
>
>
>
> Please help me in this regard…Thanks
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJKjpV/AAoJEF+XTK08PnB5sSAQAIeQDdvLpe5ClasLmtFfZbpZ
mpPc6fx7AWPHiraCLsy/nA/RIQ7UGJQzdttKCzSjgRvq9P1mmbbFeNZEBCuMbj95
IcLmQSEG5kOLPeWcsWGAuYPOJw9wNIxJkHTSxZSwdyvhcfhMDn7F6mcMX8jpS4bV
uCqOfH1r6padJGP4ZxVl6stT3DhRU2LZFP8EoMRtMG7i3Yu7DryVFV0uV7QqEkRx
zH5hMFa6sV5aJJxppVl7S42ANCV3i5X0kmCVnhbIPxL/CWKA3pNQVuL+VJNIrZ8H
B+dsKz9jL6dgsgmVNnT9yN0lKyCCJAB0klENtNRYJITWasmxBmreiAK87jB5ikp/
mh/pk/GyvWAD3eCeFf6sy8Lbg75dGWCAxdV6ESlrakMKEqCapJaDSNRLW9uSm+Wi
PpDu8Wm0/R2hs8C+lM7lhHnHVb1bSttHX7zEGOlKO7LGBYvwWRofeuYOZiBfevdV
RFrSNCDzGXEUZg/jLo1xtPgddwfSwerJqxB7miEr/21XDlEhRtkNTD4u6wcvfaTD
pJh6395yZqsc0EZaP4BA4l8QWunBWI6Slo9ASM/iU318R9vED22sQfokcSXjyR61
e3S2Ptq9W3IH5Sv6g3KbSGlq7yQn3gWWGVgqGVuF0+ebkVwSjcY9PH5ZvtqEst2D
wKHyUoT4AFVGE+KPRxzE
=D+ZO
-----END PGP SIGNATURE-----