LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-21-2009, 03:19 AM   #1
fizeelinux
Member
 
Registered: Nov 2008
Posts: 91

Rep: Reputation: 15
Not able to send mails between Open suse to Centos


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#######

Code:
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 #####
Code:
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
 
Old 08-21-2009, 07:25 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
As you see running 'mailq' doesn't reveal much. A quick win in terms of troubleshooting is always looking at (both sides) daemon logs (where applicable) or error output:
Quote:
Originally Posted by fizeelinux View Post
Code:
[-- 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
A delivery status notification (DSN) of 4.4.1 ("Did not receive the expected protocol response") suggests there might be something blocking the port (firewall rule?) or the port being only bound to the loopback interface (which would be default for a Sendmail install on Centos). You can easily check that by looking at the MTA's configuration file. For Sendmail 'grep "^[A-Z].*Port=" /etc/mail/sendmail.mc' then would return "Port=smtp,Addr=127.0.0.1", running 'lsof -P -w -n -i:25' on the host itself (showing "127.0.0.1:25 (LISTEN)") or telnetting from one machine to TCP/25 on the other (which should fail).


Quote:
Originally Posted by fizeelinux View Post
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. (..) I tried checking for dig nslookup frm both the machines.No problems in name resolution.Should i do anything with the confguration files?
BTW, MTA protocol not only expects any FQDN to be resolvable but also expects the hosts PTR to return a valid result as in '( IFS=.; set -- $(echo "1"); echo "$4.$3.$2.$1.in-addr.arpa"; )'. For DNSMasq a PTR may look like
Code:
address=/centos.dns.internal/192.168.1.40
ptr-record=40.1.168.192.in-addr.arpa,centos.dns.internal
, while Pdnsd will just create PTR records on the fly.
 
Old 08-22-2009, 03:09 AM   #3
fizeelinux
Member
 
Registered: Nov 2008
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
As you see running 'mailq' doesn't reveal much. A quick win in terms of troubleshooting is always looking at (both sides) daemon logs (where applicable) or error output:

A delivery status notification (DSN) of 4.4.1 ("Did not receive the expected protocol response") suggests there might be something blocking the port (firewall rule?) or the port being only bound to the loopback interface (which would be default for a Sendmail install on Centos). You can easily check that by looking at the MTA's configuration file. For Sendmail 'grep "^[A-Z].*Port=" /etc/mail/sendmail.mc' then would return "Port=smtp,Addr=127.0.0.1", running 'lsof -P -w -n -i:25' on the host itself (showing "127.0.0.1:25 (LISTEN)") or telnetting from one machine to TCP/25 on the other (which should fail).



BTW, MTA protocol not only expects any FQDN to be resolvable but also expects the hosts PTR to return a valid result as in '( IFS=.; set -- $(echo "1"); echo "$4.$3.$2.$1.in-addr.arpa"; )'. For DNSMasq a PTR may look like
Code:
address=/centos.dns.internal/192.168.1.40
ptr-record=40.1.168.192.in-addr.arpa,centos.dns.internal
, while Pdnsd will just create PTR records on the fly.


Thanks for the reply.Sorry to say that i don't have much knowledge on mail server.I started this configuration by following some documents and some surveys posted on internet and started to focus on configuring postfix.I read that postfix is a MTA(like qmail,sendmail).Does MTA and email server mean the same?

Code:
A delivery status notification (DSN) of 4.4.1 ("Did not receive the expected protocol response") suggests there might be something blocking the port (firewall rule?) or the port being only bound to the loopback interface (which would be default for a Sendmail install on Centos). You can easily check that by looking at the MTA's configuration file. For Sendmail 'grep "^[A-Z].*Port=" /etc/mail/sendmail.mc' then would return "Port=smtp,Addr=127.0.0.1", running 'lsof -P -w -n -i:25' on the host itself (showing "127.0.0.1:25 (LISTEN)") or telnetting from one machine to TCP/25 on the other (which should fail).

Should i make changes to my sendmail file of centos machine.(will this problem be avoided if i use postfix in centos machine?Whats the case if i need to send mails from a windows machine(in case) to this suse box

Code:
root@centos#lsof -P -w -n -i:25

COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAME
sendmail 2208 root    4u  IPv4   5773       TCP 127.0.0.1:25 (LISTEN)

Code:
root@centos#telnet suse1.dns.internal 25
Trying 192.168.1.20...
telnet: connect to address 192.168.1.20: Connection refused
telnet: Unable to connect to remote host: Connection refused
Code:
suse1:~ # lsof -P -w -n -i:25
 
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME 
master  3182 root   12u  IPv4   8820      0t0  TCP 127.0.0.1:25 (LISTEN)
Does master in the output is a MTA corresponding to postfix?

Code:
suse1:~ # telnet centos.dns.internal 25 
Trying 192.168.1.40... 
telnet: connect to address 192.168.1.40: Connection refused

My questions may be silly but your answers for these will be of much use to me.

I disabled the firewalls and SELinux in both the machines.
FYI i have connected both the systems using a cross cable with IP settings manually set without gateway.Will this be the problem since they dont have gateway.But i am to ping as well as to access the machine via ssh.Any ideas?


Thanks in advance.

Last edited by fizeelinux; 08-22-2009 at 03:12 AM.
 
Old 08-22-2009, 06:52 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by fizeelinux View Post
Thanks for the reply. Sorry to say that i don't have much knowledge on mail server. I started this configuration by following some documents and some surveys posted on internet and started to focus on configuring postfix. I read that postfix is a MTA(like qmail,sendmail).Does MTA and email server mean the same?
Well, if those documents helped you configure postfix and make it run OK then you shouldn't say that you don't have much knowledge about mail servers. At least you got it to run and accept email, right? That's good. And MTA means "Mail Transfer Agent" and yes that means Sendmail, Qmail, Exim, Courier, Zimbra, Postfix, Lotus Domino, Kerio, Mercury, hell even mcrsft Exchange is an MTA of sorts...


Quote:
Originally Posted by fizeelinux View Post
Should i make changes to my sendmail file of centos machine.
Yes, in /etc/mail/sendmail.mc change "DAEMON_OPTIONS" to read:
Code:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=lo')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=192.168.1.40, Name=eth')dnl
the regenerate your /etc/mail/sendmail.cf configuration and restart Sendmail.


Quote:
Originally Posted by fizeelinux View Post
(will this problem be avoided if i use postfix in centos machine?
You are free to run your MTA of choice. So if you find it easier to admin Postfix then by all means use Postfix.


Quote:
Originally Posted by fizeelinux View Post
Whats the case if i need to send mails from a windows machine(in case) to this suse box
Sending email should not be a problem (as long as the loopback versus ethernet listening address is fixed), however receiving email depends on the Mail User Agent (MUA). For instance Thunderbird can "read" email using POP and IMAP protocols. Than means you'll need to add a POP and a IMAP daemon.


Quote:
Originally Posted by fizeelinux View Post
Code:
root@centos#lsof -P -w -n -i:25
COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAME
sendmail 2208 root    4u  IPv4   5773       TCP 127.0.0.1:25 (LISTEN)
Code:
suse1:~ # lsof -P -w -n -i:25
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME 
master  3182 root   12u  IPv4   8820      0t0  TCP 127.0.0.1:25 (LISTEN)
On both machines the MTA is listening only on the loopback address. This means it can not see incoming mail traffic coming in over the ethernet device. The fix for Sendmail you've already read, for Postfix you probably know better then I what to do (change "inet_interfaces" to read "inet_interfaces = all" in /etc/postfix/main.cf?).


Quote:
Originally Posted by fizeelinux View Post
Does master in the output is a MTA corresponding to postfix?
Yes. (I'll skip discussing privileges and spoofing argv[0].)


Quote:
Originally Posted by fizeelinux View Post
My questions may be silly but your answers for these will be of much use to me.
There are no silly questions. Not asking, that's silly.


Quote:
Originally Posted by fizeelinux View Post
I disabled the firewalls and SELinux in both the machines.
Even though you apparently run on a LAN (meaning these machines might not be exposed to Internet traffic) that should not be necessary. Instead of avoiding features you should choose to learn about them. OK, OK, that makes for a bit of a learning curve ;-p


Quote:
Originally Posted by fizeelinux View Post
FYI i have connected both the systems using a cross cable with IP settings manually set without gateway. Will this be the problem since they dont have gateway. But i am to ping as well as to access the machine via ssh. Any ideas?
Since there's no routing necessary between the two, only setting the netmask (255.255.255.0) and broadcast address (192.168.1.255) on both should work for crossover cable connections as far as I know. Since you can SSH and ping both your networking settings are not the problem: correct the address the MTA is listening on, restart it and then test again.

That said using crossover cable severely limits what you can do with networking so I would suggest you rething your "network design". Especially if you plan on adding physical hosts to your "network". If on the other hand you're just "playing networking", then if your machine is powerful enough you could run virtualization to mimick networking 10 or more hosts, routers, et cetera... But that's a topic for another thread I think.
 
Old 08-25-2009, 12:44 AM   #5
fizeelinux
Member
 
Registered: Nov 2008
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
Well, if those documents helped you configure postfix and make it run OK then you shouldn't say that you don't have much knowledge about mail servers. At least you got it to run and accept email, right? That's good. And MTA means "Mail Transfer Agent" and yes that means Sendmail, Qmail, Exim, Courier, Zimbra, Postfix, Lotus Domino, Kerio, Mercury, hell even mcrsft Exchange is an MTA of sorts...



Yes, in /etc/mail/sendmail.mc change "DAEMON_OPTIONS" to read:
Code:
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=lo')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=192.168.1.40, Name=eth')dnl
the regenerate your /etc/mail/sendmail.cf configuration and restart Sendmail.



You are free to run your MTA of choice. So if you find it easier to admin Postfix then by all means use Postfix.



Sending email should not be a problem (as long as the loopback versus ethernet listening address is fixed), however receiving email depends on the Mail User Agent (MUA). For instance Thunderbird can "read" email using POP and IMAP protocols. Than means you'll need to add a POP and a IMAP daemon.



On both machines the MTA is listening only on the loopback address. This means it can not see incoming mail traffic coming in over the ethernet device. The fix for Sendmail you've already read, for Postfix you probably know better then I what to do (change "inet_interfaces" to read "inet_interfaces = all" in /etc/postfix/main.cf?).



Yes. (I'll skip discussing privileges and spoofing argv[0].)



There are no silly questions. Not asking, that's silly.



Even though you apparently run on a LAN (meaning these machines might not be exposed to Internet traffic) that should not be necessary. Instead of avoiding features you should choose to learn about them. OK, OK, that makes for a bit of a learning curve ;-p



Since there's no routing necessary between the two, only setting the netmask (255.255.255.0) and broadcast address (192.168.1.255) on both should work for crossover cable connections as far as I know. Since you can SSH and ping both your networking settings are not the problem: correct the address the MTA is listening on, restart it and then test again.

That said using crossover cable severely limits what you can do with networking so I would suggest you rething your "network design". Especially if you plan on adding physical hosts to your "network". If on the other hand you're just "playing networking", then if your machine is powerful enough you could run virtualization to mimick networking 10 or more hosts, routers, et cetera... But that's a topic for another thread I think.
Thanks for your encouraging words man and also for your answers to all of my questions.Sorry unSpawn I formatted the system and reconfigured both the machines with postfix configuration with changes to my private IP addresses.

Code:
At suse box(192.168.1.100)

/etc/postfix/main.cf
...............................
myhostname = suse1
....................
......................
mydomain = dns.internal
..................................
........................................

myorigin = $myhostname

myorigin = $mydomain
.......................................
..........................................
inet_interfaces = all
...................................................
..................................................
mydestination = $myhostname, localhost.$mydomain, localhost


At centos box(192.168.1.200)
(postfix configuration)
/etc/postfix/main.cf

I gave the same configuration as above in suse1 box.
I restarted the named daemon and postfix service .When I run mutt utility I get the following error in suse1 box.I even commented the parts which i inserted in the main.cf file but errors keeps un changed.Any ideas?This error is only in the suse box.In centos i can get into my mailbox.

ERROR at suse box
Code:
suse1#mutt
...........
..............

---Mutt: (no mailbox) [Msgs:0]---(reverse-date/date)--------------------(all)--- 
/var/spool/mail/root: No such file or directory (errno = 2)
 
Old 08-26-2009, 08:58 AM   #6
fizeelinux
Member
 
Registered: Nov 2008
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by fizeelinux View Post
Thanks for your encouraging words man and also for your answers to all of my questions.Sorry unSpawn I formatted the system and reconfigured both the machines with postfix configuration with changes to my private IP addresses.

Code:
At suse box(192.168.1.100)

/etc/postfix/main.cf
...............................
myhostname = suse1
....................
......................
mydomain = dns.internal
..................................
........................................

myorigin = $myhostname

myorigin = $mydomain
.......................................
..........................................
inet_interfaces = all
...................................................
..................................................
mydestination = $myhostname, localhost.$mydomain, localhost


At centos box(192.168.1.200)
(postfix configuration)
/etc/postfix/main.cf

I gave the same configuration as above in suse1 box.
I restarted the named daemon and postfix service .When I run mutt utility I get the following error in suse1 box.I even commented the parts which i inserted in the main.cf file but errors keeps un changed.Any ideas?This error is only in the suse box.In centos i can get into my mailbox.

ERROR at suse box
Code:
suse1#mutt
...........
..............

---Mutt: (no mailbox) [Msgs:0]---(reverse-date/date)--------------------(all)--- 
/var/spool/mail/root: No such file or directory (errno = 2)
Any ideas?????
 
Old 08-26-2009, 09:17 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by fizeelinux View Post
TI formatted the system and reconfigured both the machines with postfix configuration with changes to my private IP addresses.
To change MTA's you can just uninstall the package(s) and install others. No need to reformat or reinstall an OS from scratch.


Quote:
Originally Posted by fizeelinux View Post
I restarted the named daemon and postfix service .When I run mutt utility I get the following error in suse1 box.I even commented the parts which i inserted in the main.cf file but errors keeps un changed.Any ideas?This error is only in the suse box.In centos i can get into my mailbox.
Code:
/var/spool/mail/root: No such file or directory (errno = 2)
Reading 'man 8 local' (the "mailbox delivery" part) shows how you can check your Postfix configuration for the right mail spool directory ("mail_spool_directory = /var/spool/mail"). If the directory exists and ownership and access rights have not changed then try sending the user an email from the same or another account and only start worrying if the users mailspool doesn't get created then. If indeed it doesn't then the first thing to check (after rereading your config just to make sure) would be the logfile (/var/log/maillog or /var/log/mail).


Quote:
Originally Posted by fizeelinux View Post
Any ideas?????
Please don't quote whole replies and please don't quote huge slabs of text where quoting oneline would suffice. Next to that you should understand that LQ is a volunteer and supply-driven community. I periodically check threads I reply in so a wee bit more patience would look better, OK?
 
Old 09-07-2009, 03:28 AM   #8
fizeelinux
Member
 
Registered: Nov 2008
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
To change MTA's you can just uninstall the package(s) and install others. No need to reformat or reinstall an OS from scratch.



Reading 'man 8 local' (the "mailbox delivery" part) shows how you can check your Postfix configuration for the right mail spool directory ("mail_spool_directory = /var/spool/mail"). If the directory exists and ownership and access rights have not changed then try sending the user an email from the same or another account and only start worrying if the users mailspool doesn't get created then. If indeed it doesn't then the first thing to check (after rereading your config just to make sure) would be the logfile (/var/log/maillog or /var/log/mail).



Please don't quote whole replies and please don't quote huge slabs of text where quoting oneline would suffice. Next to that you should understand that LQ is a volunteer and supply-driven community. I periodically check threads I reply in so a wee bit more patience would look better, OK?

Sorry i was out of station for week so couldn't post my thread.In the suse1 box i started dns service and checked whether i am able to resolve for box of my machines(suse and centos).It resolves for both of my machines.

I tried to send a mail from suse1 box
I sent a mail to root@centos.dns.internal
I checked mailq whether it is in queue but it showed me.
Code:
suse1#mailq

Mailbox is empty
At the centos machine

After sending mails i checked the status by typing mailq.

Code:
centos#mailq
(delivery temoparily suspended:Host or domain name not found.Name service error or for name=dns.internal type MX:Host not found,try again)
                                                   root@dns.internal
I doubted whether name service could be a problem for this so i ensured that postfix is started and nameservice is started.
When i try for resolving centos machine (both IP as well as name) in suse1 box works perfectly.In centos i have included the ip name of suse box in /etc/resolv.conf but shows me

AT CENTOS MACHINE
Code:
#dig centos.dns.internal
;<<>>DiG 9.3.4-P1<<>>centos.dns.internal
;;global options:printcmd
;;connection timed out;no servers could be reached
AT suse machine i run

Code:
tail /var/log/mail and i got the following messages
tail /var/log/mail 
Sep  7 15:15:02 suse1 postfix/pickup[5250]: 397FA5D4106: uid=0 from=<root> 
Sep  7 15:15:02 suse1 postfix/cleanup[5283]: 397FA5D4106: message-id=<20090907094501.GA5258@suse1.dns.internal> 
Sep  7 15:15:02 suse1 postfix/qmgr[5252]: 397FA5D4106: from=<root@dns.internal>, size=448, nrcpt=1 (queue active) 
Sep  7 15:15:02 suse1 postfix/smtp[5285]: 397FA5D4106: to=<root@centos.dns.internal>, relay=centos.dns.internal[192.168.1.200]:25, delay=0.8, delays=0.25/0.05/0.44/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as E8D9A4183DE) 
Sep  7 15:15:02 suse1 postfix/qmgr[5252]: 397FA5D4106: removed 
Sep  7 15:19:20 suse1 postfix/pickup[5250]: CA4F95D4106: uid=0 from=<root> 
Sep  7 15:19:20 suse1 postfix/cleanup[5293]: CA4F95D4106: message-id=<20090907094920.GA5288@suse1.dns.internal> 
Sep  7 15:19:20 suse1 postfix/qmgr[5252]: CA4F95D4106: from=<root@dns.internal>, size=448, nrcpt=1 (queue active) 
Sep  7 15:19:21 suse1 postfix/smtp[5295]: CA4F95D4106: to=<root@centos.dns.internal>, relay=centos.dns.internal[192.168.1.200]:25, delay=0.28, delays=0.16/0.01/0.04/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 2257A4183DF) 
Sep  7 15:19:21 suse1 postfix/qmgr[5252]: CA4F95D4106: removed
.Any ideas??

I was trying to workaround this problem.Thing is the inet_interfaces parameter was not set to 'all' in /etc/postfix/main.conf..I have now changed.Now root@suse1.dns.internal is able to receive mails from root@centos.dns.internal..But reverse is not happening that is the user root@centos.dns.internal is not able to receive mails from root@suse1.dns.internal..I am sure that i am going towards the goal with your suggestions.

Mail Logs are as follows

@suse

Code:
#tail /var/log/mail 
Sep 10 18:50:57 suse1 postfix/smtp[7341]: B36865D4118: to=<root@centos.dns.internal>, relay=centos.dns.internal[192.168.1.200]:25, delay=0.29, delays=0.17/0.01/0.04/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as DBA034183DD) 
Sep 10 18:50:57 suse1 postfix/qmgr[7232]: B36865D4118: removed 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: warning: database /etc/aliases.db is older than source file /etc/aliases 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: connect from centos.dns.internal[192.168.1.200] 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: 096BC5D410B: client=centos.dns.internal[192.168.1.200] 
Sep 10 18:50:58 suse1 postfix/cleanup[7337]: 096BC5D410B: message-id=<20090910133345.EEC444183DF@centos> 
Sep 10 18:50:58 suse1 postfix/qmgr[7232]: 096BC5D410B: from=<>, size=2551, nrcpt=1 (queue active) 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: disconnect from centos.dns.internal[192.168.1.200] 
Sep 10 18:50:58 suse1 postfix/smtp[7341]: 096BC5D410B: to=<guest@dns.internal>, relay=none, delay=0.05, delays=0.05/0/0/0, dsn=5.4.6, status=bounced (mail for dns.internal loops back to myself) 
Sep 10 18:50:58 suse1 postfix/qmgr[7232]: 096BC5D410B: removed
@centos

Code:
#tail /var/log/maillog 
Sep 10 19:03:45 centos postfix/cleanup[3637]: DBA034183DD: message-id=<20090910132057.GA7332@suse1.dns.internal> 
Sep 10 19:03:45 centos postfix/qmgr[2989]: DBA034183DD: from=<guest@dns.internal>, size=646, nrcpt=1 (queue active) 
Sep 10 19:03:45 centos postfix/smtpd[3634]: disconnect from suse1.dns.internal[192.168.1.100] 
Sep 10 19:03:45 centos postfix/smtp[3638]: DBA034183DD: to=<root@centos.dns.internal>, relay=none, delay=0.06, delays=0.04/0.02/0/0, dsn=5.4.6, status=bounced (mail for centos.dns.internal loops back to myself) 
Sep 10 19:03:45 centos postfix/cleanup[3637]: EEC444183DF: message-id=<20090910133345.EEC444183DF@centos> 
Sep 10 19:03:45 centos postfix/qmgr[2989]: EEC444183DF: from=<>, size=2364, nrcpt=1 (queue active) 
Sep 10 19:03:45 centos postfix/bounce[3640]: DBA034183DD: sender non-delivery notification: EEC444183DF 
Sep 10 19:03:45 centos postfix/qmgr[2989]: DBA034183DD: removed 
Sep 10 19:03:46 centos postfix/smtp[3638]: EEC444183DF: to=<guest@dns.internal>, relay=suse1.dns.internal[192.168.1.100]:25, delay=0.12, delays=0.01/0/0.04/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 096BC5D410B) 
Sep 10 19:03:46 centos postfix/qmgr[2989]: EEC444183DF: removed
Any ideas will be appreciated.Thanks

Last edited by fizeelinux; 09-10-2009 at 10:03 AM. Reason: updation in my progress
 
Old 09-14-2009, 02:40 AM   #9
fizeelinux
Member
 
Registered: Nov 2008
Posts: 91

Original Poster
Rep: Reputation: 15
Thumbs down

Quote:
Originally Posted by fizeelinux View Post
Sorry i was out of station for week so couldn't post my thread.In the suse1 box i started dns service and checked whether i am able to resolve for box of my machines(suse and centos).It resolves for both of my machines.

I tried to send a mail from suse1 box
I sent a mail to root@centos.dns.internal
I checked mailq whether it is in queue but it showed me.
Code:
suse1#mailq

Mailbox is empty
At the centos machine

After sending mails i checked the status by typing mailq.

Code:
centos#mailq
(delivery temoparily suspended:Host or domain name not found.Name service error or for name=dns.internal type MX:Host not found,try again)
                                                   root@dns.internal
I doubted whether name service could be a problem for this so i ensured that postfix is started and nameservice is started.
When i try for resolving centos machine (both IP as well as name) in suse1 box works perfectly.In centos i have included the ip name of suse box in /etc/resolv.conf but shows me

AT CENTOS MACHINE
Code:
#dig centos.dns.internal
;<<>>DiG 9.3.4-P1<<>>centos.dns.internal
;;global options:printcmd
;;connection timed out;no servers could be reached
AT suse machine i run

Code:
tail /var/log/mail and i got the following messages
tail /var/log/mail 
Sep  7 15:15:02 suse1 postfix/pickup[5250]: 397FA5D4106: uid=0 from=<root> 
Sep  7 15:15:02 suse1 postfix/cleanup[5283]: 397FA5D4106: message-id=<20090907094501.GA5258@suse1.dns.internal> 
Sep  7 15:15:02 suse1 postfix/qmgr[5252]: 397FA5D4106: from=<root@dns.internal>, size=448, nrcpt=1 (queue active) 
Sep  7 15:15:02 suse1 postfix/smtp[5285]: 397FA5D4106: to=<root@centos.dns.internal>, relay=centos.dns.internal[192.168.1.200]:25, delay=0.8, delays=0.25/0.05/0.44/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as E8D9A4183DE) 
Sep  7 15:15:02 suse1 postfix/qmgr[5252]: 397FA5D4106: removed 
Sep  7 15:19:20 suse1 postfix/pickup[5250]: CA4F95D4106: uid=0 from=<root> 
Sep  7 15:19:20 suse1 postfix/cleanup[5293]: CA4F95D4106: message-id=<20090907094920.GA5288@suse1.dns.internal> 
Sep  7 15:19:20 suse1 postfix/qmgr[5252]: CA4F95D4106: from=<root@dns.internal>, size=448, nrcpt=1 (queue active) 
Sep  7 15:19:21 suse1 postfix/smtp[5295]: CA4F95D4106: to=<root@centos.dns.internal>, relay=centos.dns.internal[192.168.1.200]:25, delay=0.28, delays=0.16/0.01/0.04/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 2257A4183DF) 
Sep  7 15:19:21 suse1 postfix/qmgr[5252]: CA4F95D4106: removed
.Any ideas??

I was trying to workaround this problem.Thing is the inet_interfaces parameter was not set to 'all' in /etc/postfix/main.conf..I have now changed.Now root@suse1.dns.internal is able to receive mails from root@centos.dns.internal..But reverse is not happening that is the user root@centos.dns.internal is not able to receive mails from root@suse1.dns.internal..I am sure that i am going towards the goal with your suggestions.

Mail Logs are as follows

@suse

Code:
#tail /var/log/mail 
Sep 10 18:50:57 suse1 postfix/smtp[7341]: B36865D4118: to=<root@centos.dns.internal>, relay=centos.dns.internal[192.168.1.200]:25, delay=0.29, delays=0.17/0.01/0.04/0.07, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as DBA034183DD) 
Sep 10 18:50:57 suse1 postfix/qmgr[7232]: B36865D4118: removed 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: warning: database /etc/aliases.db is older than source file /etc/aliases 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: connect from centos.dns.internal[192.168.1.200] 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: 096BC5D410B: client=centos.dns.internal[192.168.1.200] 
Sep 10 18:50:58 suse1 postfix/cleanup[7337]: 096BC5D410B: message-id=<20090910133345.EEC444183DF@centos> 
Sep 10 18:50:58 suse1 postfix/qmgr[7232]: 096BC5D410B: from=<>, size=2551, nrcpt=1 (queue active) 
Sep 10 18:50:58 suse1 postfix/smtpd[7344]: disconnect from centos.dns.internal[192.168.1.200] 
Sep 10 18:50:58 suse1 postfix/smtp[7341]: 096BC5D410B: to=<guest@dns.internal>, relay=none, delay=0.05, delays=0.05/0/0/0, dsn=5.4.6, status=bounced (mail for dns.internal loops back to myself) 
Sep 10 18:50:58 suse1 postfix/qmgr[7232]: 096BC5D410B: removed
@centos

Code:
#tail /var/log/maillog 
Sep 10 19:03:45 centos postfix/cleanup[3637]: DBA034183DD: message-id=<20090910132057.GA7332@suse1.dns.internal> 
Sep 10 19:03:45 centos postfix/qmgr[2989]: DBA034183DD: from=<guest@dns.internal>, size=646, nrcpt=1 (queue active) 
Sep 10 19:03:45 centos postfix/smtpd[3634]: disconnect from suse1.dns.internal[192.168.1.100] 
Sep 10 19:03:45 centos postfix/smtp[3638]: DBA034183DD: to=<root@centos.dns.internal>, relay=none, delay=0.06, delays=0.04/0.02/0/0, dsn=5.4.6, status=bounced (mail for centos.dns.internal loops back to myself) 
Sep 10 19:03:45 centos postfix/cleanup[3637]: EEC444183DF: message-id=<20090910133345.EEC444183DF@centos> 
Sep 10 19:03:45 centos postfix/qmgr[2989]: EEC444183DF: from=<>, size=2364, nrcpt=1 (queue active) 
Sep 10 19:03:45 centos postfix/bounce[3640]: DBA034183DD: sender non-delivery notification: EEC444183DF 
Sep 10 19:03:45 centos postfix/qmgr[2989]: DBA034183DD: removed 
Sep 10 19:03:46 centos postfix/smtp[3638]: EEC444183DF: to=<guest@dns.internal>, relay=suse1.dns.internal[192.168.1.100]:25, delay=0.12, delays=0.01/0/0.04/0.06, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 096BC5D410B) 
Sep 10 19:03:46 centos postfix/qmgr[2989]: EEC444183DF: removed
Any ideas will be appreciated.Thanks
I am not at all getting any replies from anyone in the forum.Please help me in this.Thanks
 
  


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
To restrict a user to send mails only to 3 e-mails IDs using postfix mail server sharath41 Linux - Newbie 2 07-21-2008 08:38 PM
STRANGE:mailserver receives mails but is not able to send mails outside nics Linux - Server 1 05-04-2007 01:44 AM
Sendmai can send mails but unable to receive mails satimis Linux - Server 2 02-15-2007 10:22 AM
Open tcp port & mails that i do not send. jrfly Linux - General 1 02-02-2005 10:02 PM


All times are GMT -5. The time now is 04:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration