Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th August 2005, 10:45
nandhu nandhu is offline
Member
 
Join Date: Aug 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up [SOLVED] Sending mails to remote domains is not working.

Hi All,

I reinstalled my system again. Followed Falko's instruction close to every single letter.

I now have a kind of working system with ISP Config as well.

My problem now is as follows:

I can send emails to the domains I've created in ISP Config example.com and example1.com

Meaning I can send email from admin@example.com to admin@example1.com

But when I try to send emails to xyz@hotmail.com or xyz@yahoo.com I get the following message in my /var/log/maillog

Aug 09 18:45:39 myhostname postfix/smtp[2349]: 74FBF30501:
to=<recipient@gmail.com> relay=none, delay=10,
status=deferred (Name service error for name=gmail.com
type=MX: Host not found, try again)


But when I send an email from gmail.com to the domain I created in Postfix using ISP Config, I can receive the email successfully.

It only seems to be a problem while sending the email out of my LAN network.

I've an ADSL router and it is configured to allow connections on the following ports:

80,81,443,pop3,pop3s,imap,imaps

I did not install Firewall that comes in FC4 and I disabled SELINUX just as told to in Falko's instructions.

Is there anything else I need to do with regards to postconf configuration which would help my postfix send emails from AUthorised users like the ones created of ISP Config to send emails to others like @hotmail.com, yahoo.com, gmail.com etc etc.,

Thanks for your time and help. Much appreciated.

- Nanda.

Last edited by nandhu; 12th August 2005 at 17:38. Reason: SOLVED
Reply With Quote
Sponsored Links
  #2  
Old 10th August 2005, 11:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by nandhu
Aug 09 18:45:39 myhostname postfix/smtp[2349]: 74FBF30501:
to=<recipient@gmail.com> relay=none, delay=10,
status=deferred (Name service error for name=gmail.com
type=MX: Host not found, try again)
This looks as if your system cannot resolve domains. What does /etc/resolv.conf look like? Are there any DNS servers in it? If not, you could add the following lines to it:

Code:
nameserver 145.253.2.75
nameserver 193.174.32.18
You can as well use any other name server you know of (instead of 145.253.2.75 and 193.174.32.18).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 10th August 2005, 12:26
nandhu nandhu is offline
Member
 
Join Date: Aug 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
This looks as if your system cannot resolve domains. What does /etc/resolv.conf look like? Are there any DNS servers in it? If not, you could add the following lines to it:

Code:
nameserver 145.253.2.75
nameserver 193.174.32.18
You can as well use any other name server you know of (instead of 145.253.2.75 and 193.174.32.18).
Thanks Falko.

As of now before modifying my /etc/resolv.conf looks like the following:

search example.com
namerserver 192.168.0.1

The above IP address is also my Gateway/Router/ADSL Modem address

I'll change the /etc/resolv.conf just as you pointed out and will restart the named and network and see if that would help my cause.

Thanks for your time.

- Nanda.
Reply With Quote
  #4  
Old 10th August 2005, 23:22
nandhu nandhu is offline
Member
 
Join Date: Aug 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I modified the /etc/resolv.conf to the nameservers you had specified.
and restarted /etc/init.d/named restart and then /etc/init.d/network restart

and tried sending an email from webmail to mailuser@gmail.com as well as mailuser@hotmail.com

And also tailed the /var/log/maillog and got the following caputured in the log
Code:
Aug 10 22:05:11 aasai ipop3d[6449]: pop3 service init from 127.0.0.1
Aug 10 22:05:12 aasai ipop3d[6449]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:12 aasai ipop3d[6449]: Login user=web1_admin host=localhost.localdomain [127.0.0.1] nmsgs=1/1
Aug 10 22:05:12 aasai ipop3d[6449]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:12 aasai ipop3d[6449]: Logout user=web1_admin host=localhost.localdomain [127.0.0.1] nmsgs=1 ndele=0
Aug 10 22:05:55 aasai postfix/smtpd[6470]: connect from localhost.localdomain[127.0.0.1]
Aug 10 22:05:55 aasai postfix/smtpd[6470]: E253F10F014D: client=localhost.localdomain[127.0.0.1]
Aug 10 22:05:55 aasai postfix/cleanup[6473]: E253F10F014D: message-id=<20050810210555.E253F10F014D@aasai.grandize.com>
Aug 10 22:05:55 aasai postfix/qmgr[5416]: E253F10F014D: from=<mailuser@example.com>, size=827, nrcpt=2 (queue active)
Aug 10 22:05:55 aasai ipop3d[6476]: pop3 service init from 127.0.0.1
Aug 10 22:05:55 aasai postfix/smtpd[6470]: disconnect from localhost.localdomain[127.0.0.1]
Aug 10 22:05:56 aasai ipop3d[6476]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:56 aasai ipop3d[6476]: Login user=web1_mailuser host=localhost.localdomain [127.0.0.1] nmsgs=1/1
Aug 10 22:05:56 aasai ipop3d[6476]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:56 aasai ipop3d[6476]: Logout user=web1_mailuser host=localhost.localdomain [127.0.0.1] nmsgs=1 ndele=0
Aug 10 22:05:57 aasai postfix/smtp[6475]: E253F10F014D: to=<mailuser@hotmail.com>, relay=mx2.hotmail.com[65.54.166.230], delay=2, status=sent (250 ok 1123707952 qp 5918)
Aug 10 22:05:57 aasai postfix/smtp[6474]: E253F10F014D: to=<mailuser@gmail.com>, relay=gmail-smtp-in.l.google.com[64.233.185.27], delay=2, status=sent (250 ok 1123707952 qp 5929)
Aug 10 22:05:57 aasai postfix/qmgr[5416]: E253F10F014D: removed
And logged into my hotmail as well as gmail to check the emails and no luck

I modified the /etc/resolv.conf to the nameservers of my DNS provider zoneedit.com and then restarted named and network and then tried sending emails to @hotmail and @gmail and still no luck

I again modified the /etc/resolv.conf to the DNS of my ISP (Which i called and got from my ISP E7even.com) and then restarted named and network. And then tried sending emails to @hotmail.com as well as to @gmail.com but still no luck.

I can see that from the logs it looks like it has correctly detected @hotmail.com as well as @gmail.com but I could not understand why i still did not receive any emails into both hotmail and gmail. Or log does not show of any trace of bounce back (Mailerdaemon) message.

Any help is greatly appreciated.

Also if you know how I can suppress this following error shown in the above log /var/log/maillog

Code:
Aug 10 22:05:56 aasai ipop3d[6476]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
- Nanda.
Reply With Quote
  #5  
Old 10th August 2005, 23:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by nandhu
Hi,

I modified the /etc/resolv.conf to the nameservers you had specified.
and restarted /etc/init.d/named restart and then /etc/init.d/network restart

and tried sending an email from webmail to mailuser@gmail.com as well as mailuser@hotmail.com

And also tailed the /var/log/maillog and got the following caputured in the log
Code:
Aug 10 22:05:11 aasai ipop3d[6449]: pop3 service init from 127.0.0.1
Aug 10 22:05:12 aasai ipop3d[6449]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:12 aasai ipop3d[6449]: Login user=web1_admin host=localhost.localdomain [127.0.0.1] nmsgs=1/1
Aug 10 22:05:12 aasai ipop3d[6449]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:12 aasai ipop3d[6449]: Logout user=web1_admin host=localhost.localdomain [127.0.0.1] nmsgs=1 ndele=0
Aug 10 22:05:55 aasai postfix/smtpd[6470]: connect from localhost.localdomain[127.0.0.1]
Aug 10 22:05:55 aasai postfix/smtpd[6470]: E253F10F014D: client=localhost.localdomain[127.0.0.1]
Aug 10 22:05:55 aasai postfix/cleanup[6473]: E253F10F014D: message-id=<20050810210555.E253F10F014D@aasai.grandize.com>
Aug 10 22:05:55 aasai postfix/qmgr[5416]: E253F10F014D: from=<mailuser@example.com>, size=827, nrcpt=2 (queue active)
Aug 10 22:05:55 aasai ipop3d[6476]: pop3 service init from 127.0.0.1
Aug 10 22:05:55 aasai postfix/smtpd[6470]: disconnect from localhost.localdomain[127.0.0.1]
Aug 10 22:05:56 aasai ipop3d[6476]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:56 aasai ipop3d[6476]: Login user=web1_mailuser host=localhost.localdomain [127.0.0.1] nmsgs=1/1
Aug 10 22:05:56 aasai ipop3d[6476]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Aug 10 22:05:56 aasai ipop3d[6476]: Logout user=web1_mailuser host=localhost.localdomain [127.0.0.1] nmsgs=1 ndele=0
Aug 10 22:05:57 aasai postfix/smtp[6475]: E253F10F014D: to=<mailuser@hotmail.com>, relay=mx2.hotmail.com[65.54.166.230], delay=2, status=sent (250 ok 1123707952 qp 5918)
Aug 10 22:05:57 aasai postfix/smtp[6474]: E253F10F014D: to=<mailuser@gmail.com>, relay=gmail-smtp-in.l.google.com[64.233.185.27], delay=2, status=sent (250 ok 1123707952 qp 5929)
Aug 10 22:05:57 aasai postfix/qmgr[5416]: E253F10F014D: removed
And logged into my hotmail as well as gmail to check the emails and no luck

I modified the /etc/resolv.conf to the nameservers of my DNS provider zoneedit.com and then restarted named and network and then tried sending emails to @hotmail and @gmail and still no luck

I again modified the /etc/resolv.conf to the DNS of my ISP (Which i called and got from my ISP E7even.com) and then restarted named and network. And then tried sending emails to @hotmail.com as well as to @gmail.com but still no luck.

I can see that from the logs it looks like it has correctly detected @hotmail.com as well as @gmail.com but I could not understand why i still did not receive any emails into both hotmail and gmail. Or log does not show of any trace of bounce back (Mailerdaemon) message.

Any help is greatly appreciated.
Your domain name resolution is now ok. The mails seem to have been sent, but I can think of 2 reasons why they didn't arrive in your mailboxes:

1) You're sending from your home network, so you most probably have a dynamic IP address. Most freemail providers like Gmail and Hotmail block emails from dynamic IP addresses.
2) You're sending from the domain example.com, and it's possible that Gmail and Hotmail see that you aren't example.com and therefore block your emails.

Quote:
Originally Posted by nandhu
Also if you know how I can suppress this following error shown in the above log /var/log/maillog

Code:
Aug 10 22:05:56 aasai ipop3d[6476]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
- Nanda.
Try to

Code:
chmod 1777 /var/spool/mail
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 11th August 2005, 08:17
nandhu nandhu is offline
Member
 
Join Date: Aug 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Your domain name resolution is now ok. The mails seem to have been sent, but I can think of 2 reasons why they didn't arrive in your mailboxes:

1) You're sending from your home network, so you most probably have a dynamic IP address. Most freemail providers like Gmail and Hotmail block emails from dynamic IP addresses.
2) You're sending from the domain example.com, and it's possible that Gmail and Hotmail see that you aren't example.com and therefore block your emails.



Try to

Code:
chmod 1777 /var/spool/mail
Hi Falko,

1) About 6 months before I use to have qmailtoaster installed on my Redhat 9 and then I could send emails to just about any domain. I do not know whether recently gmail or hotmail have blocked messages coming from dynamic ip address!!!

2) In posting here only I'm using @example.com actually I'm using my real domain name.

3) I've tried chmod 1777 /var/spool/mail but I read in redhat bug tracking that it is an unsecure lock mechanism that Iumap is using and that they do not recommend it. so they are not accepting it as a bug but said try and fix your MTA. ??!!

Many thanks for all your help.

- Nanda.
Reply With Quote
  #7  
Old 11th August 2005, 17:30
nandhu nandhu is offline
Member
 
Join Date: Aug 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Question

Eventually I received my emails sent to my hotmail and gmail.

But I would like to know what has caused this delay which is easily more than 5 hours.

Why is there such a big delay? Is there anything I could do on my side to speed it up to like in few minutes rather than hours?

Thanks for all your help.

- Nanda.
Reply With Quote
  #8  
Old 12th August 2005, 17:34
nandhu nandhu is offline
Member
 
Join Date: Aug 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It was identified by Falko that my ISP's smtp server was interfering with my smtp servers connection to remote smtp server.

Thanks Falko. This is the reason why I'm experiencing delays in receiving the emails sent of my box.

Once again thanks to Falko and his team for such a wonderful step by step instructions so that even a no-vice like me can now install a perfect solution.

Cheers
Nanda.
Reply With Quote
  #9  
Old 8th February 2006, 23:24
Tekorei Tekorei is offline
Junior Member
 
Join Date: Feb 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey a got the same error when trying to send mails outgoing mi LAN:

Feb 8 22:12:19 myserver postfix/qmgr[25081]: 31E2DA8734: to=<recipient@gmail.com>, relay=none, delay=0, status=deferred (delivery temporarily suspended: Host or domain name not found. Name service error for name=gmail.com type=MX: Host not found, try again)

I think my /etc/resolv.conf is ok:

search e2k.com.py
nameserver 200.85.32.2 (ISP DNS Server)
nameserver 200.85.32.3 (ISP DNS Server)
nameserver 127.0.0.1

Something I noticed is when I stop the iptables service the mails are sent, but when I start the iptables service it doesnt work again..

ports 25 and 53 are enable in my firewall

what could be happening?
Reply With Quote
  #10  
Old 9th February 2006, 00:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Quote:
Originally Posted by Tekorei
Something I noticed is when I stop the iptables service the mails are sent, but when I start the iptables service it doesnt work again..
It seems as if your firewall is blocking access to the nameservers. Please post the output of
Code:
iptables -L
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 4 - The Perfect Setup nandhu HOWTO-Related Questions 27 10th January 2006 12:23


All times are GMT +2. The time now is 17:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.