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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
08-04-2010, 12:41 AM
#106
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
You do not have DNS set correctly. Make sure you are onto internet and all your network settings are fine.
08-04-2010, 12:44 AM
#107
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
I'm onto internet.
I'm lost.):
08-04-2010, 12:46 AM
#108
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
Can you nslookup or ping any other domain from your Ubuntu machine? I doubt your network settings.
08-04-2010, 12:50 AM
#109
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
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 .
08-04-2010, 12:54 AM
#110
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
That is the issue of your DNS server. You are not able to resolve the domains. What does pinging to google.com say?
08-04-2010, 12:58 AM
#111
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Is it this:
Code:
xanios@ubuntu:~$ ping google.com
ping: unknown host google.com
08-04-2010, 01:00 AM
#112
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
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
08-04-2010, 01:03 AM
#113
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
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.
08-04-2010, 01:14 AM
#114
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Quote:
Originally Posted by
Xanios
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
08-04-2010, 01:18 AM
#115
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
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 .
08-04-2010, 01:33 AM
#116
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
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 .
08-04-2010, 01:36 AM
#117
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
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.
08-04-2010, 01:51 AM
#118
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
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?
08-04-2010, 02:05 AM
#119
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
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?
08-04-2010, 02:08 AM
#120
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
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
All times are GMT -5. The time now is 07:29 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News