LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-04-2010, 12:41 AM   #106
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled

You do not have DNS set correctly. Make sure you are onto internet and all your network settings are fine.
 
Old 08-04-2010, 12:44 AM   #107
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
I'm onto internet.

I'm lost.):
 
Old 08-04-2010, 12:46 AM   #108
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Can you nslookup or ping any other domain from your Ubuntu machine? I doubt your network settings.
 
Old 08-04-2010, 12:50 AM   #109
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
I tried to ping another windows server machine, it works.

Code:
xanios@ubuntu:~$ ping 192.168.142.149
PING 192.168.142.149 (192.168.142.149) 56(84) bytes of data.
64 bytes from 192.168.142.149: icmp_seq=1 ttl=128 time=0.325 ms
64 bytes from 192.168.142.149: icmp_seq=2 ttl=128 time=0.316 ms
64 bytes from 192.168.142.149: icmp_seq=3 ttl=128 time=0.357 ms
^C
--- 192.168.142.149 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.316/0.332/0.357/0.027 ms

i tried to nslookup the same windows server:

Code:
xanios@ubuntu:~$ nslookup 192.168.142.149
;; connection timed out; no servers could be reached

Last edited by Xanios; 08-04-2010 at 12:52 AM.
 
Old 08-04-2010, 12:54 AM   #110
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
That is the issue of your DNS server. You are not able to resolve the domains. What does pinging to google.com say?
 
Old 08-04-2010, 12:58 AM   #111
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Is it this:

Code:
xanios@ubuntu:~$ ping google.com
ping: unknown host google.com
 
Old 08-04-2010, 01:00 AM   #112
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

@linuxlover.chaitanya: can you elaborate why relayhost needs to be set to the smtp.gmail.com:587 value? My Postfix is sending out (and has been doing so for over a year without problems) and that parameter is empty in my configuration.

@Xanios: What have you changed (trace back your steps) so that you go from: 1. connecting to GMail but being refused connection
to
2. not being able to even pinging google.com?

Kind regards,

Eric
 
Old 08-04-2010, 01:03 AM   #113
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi Eric,

I only changed to relayhost=smtp.gmail.com:587 in main.cf, but after that i changed back i still got the error posted on yesterday.
 
Old 08-04-2010, 01:14 AM   #114
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Quote:
Originally Posted by Xanios View Post
Hi Eric,

I only changed to relayhost=smtp.gmail.com:587 in main.cf, but after that i changed back i still got the error posted on yesterday.
Hello,

I'm not at all a Postfix guru but in my opinion the relayhost parameter doesn't need to be set since you refer to it in the mydestination parameter. On the other hand it might be necessary if you need to authenticate.

But if you set it, you need to set the domain name in brackets like this:
Code:
relayhost=[smtp.gmail.com]:587
Can you change that, restart/reload postfix and try again?

Kind regards,

Eric
 
Old 08-04-2010, 01:18 AM   #115
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hello,

i changed that, restarted postfix and still get the same result:

Code:
xanios@ubuntu:~$ tail -n 20 /var/log/mail.log
Aug  3 23:18:17 ubuntu postfix/smtp[14949]: warning: relayhost configuration problem
Aug  3 23:18:17 ubuntu postfix/smtp[14950]: warning: relayhost configuration problem
Aug  3 23:18:17 ubuntu postfix/smtp[14951]: warning: relayhost configuration problem
Aug  3 23:18:17 ubuntu postfix/smtp[14952]: warning: relayhost configuration problem
Aug  3 23:18:17 ubuntu postfix/smtp[14947]: 538D841484: to=<xanios@gmail.com>, relay=none, delay=1252, delays=1232/0.1/20/0, dsn=4.3.5, status=deferred (unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/smtp[14952]: 28CF540ADD: to=<xanios@gmail.com>, relay=none, delay=1263, delays=1242/0.13/20/0, dsn=4.3.5, status=deferred (unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/smtp[14950]: 4A96941474: to=<xanios@gmail.com>, relay=none, delay=1282, delays=1262/0.11/20/0, dsn=4.3.5, status=deferred (unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/smtp[14951]: 48BDD41482: to=<xanios@gmail.com>, relay=none, delay=1252, delays=1232/0.12/20/0, dsn=4.3.5, status=deferred (unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/smtp[14949]: 43DF540B3C: to=<xanios@gmail.com>, relay=none, delay=1262, delays=1242/0.1/20/0, dsn=4.3.5, status=deferred (unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15158]: 2CD6340A86: to=<xanios@gmail.com>, relay=none, delay=1273, delays=1252/20/0/0.03, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15160]: 32ADD40B2E: to=<xanios@gmail.com>, relay=none, delay=1263, delays=1242/20/0/0.02, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15159]: 3B80041480: to=<xanios@gmail.com>, relay=none, delay=1253, delays=1232/20/0/0.03, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15162]: 1FE1C40AAB: to=<xanios@gmail.com>, relay=none, delay=1273, delays=1252/20/0/0.01, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15158]: B3A3B40BEB: to=<xanios@gmail.com>, relay=none, delay=7.2, delays=0.55/6.6/0/0.01, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15161]: 618F041486: to=<xanios@gmail.com>, relay=none, delay=1252, delays=1232/20/0/0.02, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/error[15163]: 94CED40C13: to=<xanios@gmail.com>, relay=none, delay=2.6, delays=0.61/2/0/0.01, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)
Aug  3 23:18:17 ubuntu postfix/cleanup[15073]: B8CD9414B0: message-id=<20100804061817.B8CD9414B0@ubuntu>
Aug  3 23:18:17 ubuntu postfix/bounce[15164]: B3A3B40BEB: sender delivery status notification: B8CD9414B0
Aug  3 23:18:17 ubuntu postfix/qmgr[14943]: B8CD9414B0: from=<>, size=1832, nrcpt=1 (queue active)
Aug  3 23:18:17 ubuntu postfix/error[15160]: B8CD9414B0: to=<xanios@server.com>, relay=none, delay=0.03, delays=0.02/0/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)

Last edited by Xanios; 08-04-2010 at 01:19 AM.
 
Old 08-04-2010, 01:33 AM   #116
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi again,

Sorry. I forgot i have a backup of yesterday's work, so i shall use that.

this is the output i've got from the backup:

Code:
xanios@ubuntu:~$ tail -n 20 /var/log/mail.log
Aug  3 03:04:51 ubuntu postfix/qmgr[5060]: 1FC1940BED: from=<>, size=1746, nrcpt=1 (queue active)
Aug  3 03:05:12 ubuntu postfix/smtp[5076]: connect to smtp.gmail.com[74.125.127.109]:25: Connection refused
Aug  3 03:05:12 ubuntu postfix/smtp[5076]: 1FC1940BED: to=<xanios@server.com>, relay=none, delay=21, delays=0.02/0/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.127.109]:25: Connection refused)
Aug  3 03:12:47 ubuntu postfix/qmgr[5060]: 1FC1940BED: from=<>, size=1746, nrcpt=1 (queue active)
Aug  3 03:12:47 ubuntu postfix/qmgr[5060]: 031DA40BEB: from=<xanios@server.com>, size=289, nrcpt=1 (queue active)
Aug  3 03:13:08 ubuntu postfix/smtp[5174]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug  3 03:13:08 ubuntu postfix/smtp[5175]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug  3 03:13:08 ubuntu postfix/smtp[5174]: 1FC1940BED: to=<xanios@server.com>, relay=none, delay=497, delays=476/0.02/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug  3 03:13:08 ubuntu postfix/smtp[5175]: 031DA40BEB: to=<xanios@gmail.com>, relay=none, delay=520, delays=499/0.02/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug  3 03:14:07 ubuntu postfix/pickup[5057]: 1A0D140BEF: uid=1000 from=<layleng>
Aug  3 03:14:07 ubuntu postfix/cleanup[5211]: 1A0D140BEF: message-id=<20100803101407.1A0D140BEF@ubuntu>
Aug  3 03:14:07 ubuntu postfix/qmgr[5060]: 1A0D140BEF: from=<xanios@server.com>, size=292, nrcpt=1 (queue active)
Aug  3 03:14:28 ubuntu postfix/smtp[5174]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug  3 03:14:28 ubuntu postfix/smtp[5174]: 1A0D140BEF: to=<xanios@gmail.com>, relay=none, delay=21, delays=0.02/0/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug  3 03:14:28 ubuntu postfix/cleanup[5211]: 13C3F40BF1: message-id=<20100803101428.13C3F40BF1@ubuntu>
Aug  3 03:14:28 ubuntu postfix/bounce[5215]: 1A0D140BEF: sender delivery status notification: 13C3F40BF1
Aug  3 03:14:28 ubuntu postfix/qmgr[5060]: 13C3F40BF1: from=<>, size=1746, nrcpt=1 (queue active)
Aug  3 03:14:49 ubuntu postfix/smtp[5175]: connect to smtp.gmail.com[74.125.53.109]:25: Connection refused
Aug  3 03:14:49 ubuntu postfix/smtp[5175]: 13C3F40BF1: to=<xanios@server.com>, relay=none, delay=21, delays=0.01/0/21/0, dsn=4.4.1, status=deferred (connect to smtp.gmail.com[74.125.53.109]:25: Connection refused)
Aug  3 03:17:22 ubuntu postfix/postmap[5258]: fatal: open 587: No such file or directory
it's always good to have a backup

So how shall we continue from here?

thanks

edit:

it's totally crazy lol.
for this file i didn't change anything at all...
i just sent a mail just now and viewed the log mail again and i got:

Code:
Aug  3 23:39:31 ubuntu postfix/error[2566]: 95C2A40BFA: to=<xanios@server.com>, relay=none, delay=0.01, delays=0/0/0/0, dsn=4.3.5, status=deferred (delivery temporarily suspended: unable to look up host smtp.gmail.com: No address associated with hostname)

Last edited by Xanios; 08-04-2010 at 01:49 AM.
 
Old 08-04-2010, 01:36 AM   #117
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Since he is using an external SMTP server to send mails, and also need to authenticate to that SMTP that is owned by google, he needs to tell postfix which SMTP he needs to use to relay mails and authenticate to. Setting up a relayhost will allow OP to send emails from his internal mail server to any server on the internet. I have a zimbra installation with similar purpose for sending and receiving mails from outside using my Go daddy hosted SMTP server with authentication and it works fine. Free relay servers can also be used in this sense but using a trusted relay will not mark his messages as spam.

@OP,

You need to look into the network settings you have. You do not have correct DNS settings and that is why you are not able to resolve domains. Try to use global dns 4.2.2.2 and see if that solves your problem. But a better solution is to ask your ISP to provide DNS server settings for you.
 
Old 08-04-2010, 01:51 AM   #118
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi,

How to use global dns server 4.2.2.2 ?

By the way, i guess you know i'm using nagios to send email notifications to gmail when the services go down, right?
 
Old 08-04-2010, 02:05 AM   #119
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Yes. Nagios and postfix should both probably use the system network settings as far as I can guess. What are the contents of /etc/resolv.conf file?
 
Old 08-04-2010, 02:08 AM   #120
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hi,

i typed

Code:
sudo vi /etc/resolv.conf
and this is the output i got:

Code:
# Generated by NetworkManager
domain localdomain
search localdomain
nameserver 192.168.142.2
 
  


Reply



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
LXer: Migration Assistant In Ubuntu 9.04 LXer Syndicated Linux News 0 01-08-2009 01:40 PM
not throws evolution setup assistant dissident_goodchild Linux - Software 0 11-16-2007 09:00 PM
Evolution pppoe setup in Ubuntu won't work with dsl Thane Ubuntu 1 08-16-2006 01:11 PM
evolution mail setup hariiyer Linux - Networking 1 03-03-2006 07:41 AM
Evolution - problems after first setup jburford Linux - Software 2 09-08-2002 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:29 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