Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th September 2009, 07:29
cjsdfw cjsdfw is offline
Junior Member
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PostFix can receive but can not send emails

Hi everyone,

I spent all day trying to configure a system properly but still have some problems with Postfix configuration, at least I think so since I can not recive emails. My objective is to setup a virtual server under Virtualmin where the domain name is hosted by dyndns.org.

The website hosting is working fine so I move to the next step: configure Postfix.
  • Configure hostname in dyndns
  • Configure MX records in dyndns
  • configure port forwarding on my router
  • enabled SMTP port 587 in Postfix (Port 25 is blocked)

I can receive internal and external emails but I can only send emails internally. Whenever I send emails to an external address I get a connection timeout message (see log sample below).

System Info:
  • Ubuntu 8.04 TLS
  • Webmin 1.480
  • Virtualmin 3.73 GPL

By the way, can anyone tell me how a sending mail server know which port to send emails to? Like in my case I am using port 587 and hotmail seems to know what to use but as you can see from the mail.log below my system is sending to port 25 all the time and at least in my other server (cjsdfw.com) I am using port 587 as well and not 25.

Any suggestion would help!
Thanks

Quote:
Sep 28 23:49:38 cjsdfw postfix/smtp[7158]: 674A83D417A: to=<csanchez@cjsdfw.com>, relay=none, delay=1824, delays=1794/0.01/30/0, dsn=4.4.1, status=deferred (connect to mail.cjsdfw.com[69.199.29.26]:25: Connection timed out)
Sep 28 23:50:08 cjsdfw postfix/smtp[7159]: connect to mx1.hotmail.com[65.55.92.136]:25: Connection timed out
Sep 28 23:50:38 cjsdfw postfix/smtp[7159]: connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out
Sep 28 23:51:08 cjsdfw postfix/smtp[7159]: connect to mx1.hotmail.com[65.55.37.88]:25: Connection timed out
Sep 28 23:51:38 cjsdfw postfix/smtp[7159]: connect to mx3.hotmail.com[65.55.92.152]:25: Connection timed out
Sep 28 23:51:38 cjsdfw postfix/smtp[7159]: 674A83D417A: to=<cjsdfw@hotmail.com>, relay=none, delay=1944, delays=1794/0.01/150/0, dsn=4.4.1, status=deferred (connect to mx3.hotmail.com[65.55.92.152]:25: Connection timed out)
Sep 28 23:54:08 cjsdfw postfix/qmgr[5735]: 53E1B3D417E: from=<railsapps@cjsrails.dyndns.org>, size=683, nrcpt=1 (queue active)
Sep 28 23:54:38 cjsdfw postfix/smtp[7200]: connect to mail.cjsdfw.com[69.199.29.26]:25: Connection timed out
Sep 28 23:54:38 cjsdfw postfix/smtp[7200]: 53E1B3D417E: to=<csanchez@cjsdfw.com>, relay=none, delay=1099, delays=1069/0.01/30/0, dsn=4.4.1, status=deferred (connect to mail.cjsdfw.com[69.199.29.26]:25: Connection timed out)
Sep 29 00:14:08 cjsdfw postfix/qmgr[5735]: 53E1B3D417E: from=<railsapps@cjsrails.dyndns.org>, size=683, nrcpt=1 (queue active)
Sep 29 00:14:38 cjsdfw postfix/smtp[7471]: connect to mail.cjsdfw.com[69.199.29.26]:25: Connection timed out
Sep 29 00:14:38 cjsdfw postfix/smtp[7471]: 53E1B3D417E: to=<csanchez@cjsdfw.com>, relay=none, delay=2299, delays=2269/0.01/30/0, dsn=4.4.1, status=deferred (connect to mail.cjsdfw.com[69.199.29.26]:25: Connection timed out)
Reply With Quote
Sponsored Links
  #2  
Old 29th September 2009, 10:12
nellyneils nellyneils is offline
Junior Member
 
Join Date: Oct 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,
from your logs, my first guess would be a slow internet connection might be causing the trouble.
have you tried to check the servers Internet speed? for example try to ping external addresses like yahoo or hotmail and observer the RTT.
In your case i think your server tries to connect to the external servers receiving mail, but due to the slow connection, its timed out and the foreign server breaks the connection.
Also your delay in the logs is really magnificent, i think you should check the internet speeds of that server first.

Nelson.
Reply With Quote
  #3  
Old 30th September 2009, 13: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

Please check if your server's blacklisted: http://mxtoolbox.com/blacklists.aspx
__________________
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
  #4  
Old 3rd December 2009, 22:33
yukomato yukomato is offline
Junior Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default I have the same problem

I have the same problem. I do received mail from internal and external. But i cannot send external. I have 25Mbits fiber, so speed is not problem. I have also checked for blacklist .. but not in the list. I have an linux mail server that works fine. Change to ubuntu got that problem

I have ubuntu 9.10 with ispc 3

Any one have any idea??
Reply With Quote
  #5  
Old 4th December 2009, 13:47
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

Any errors in your mail log?
Do you have a dynamic IP address?
__________________
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 5th December 2009, 19:35
yukomato yukomato is offline
Junior Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default

dette er mail loggen.

Dec 5 19:21:57 server postfix/smtp[2197]: 2A2CD1DD5D2: to=, relay=none, delay=162859, delays=162708/0.2/150/0, dsn=4.4.1, status=deferred (connect to b.mx.mail.yahoo.com[74.6.136.65]:25: Connection timed out)
Dec 5 19:21:57 server postfix/smtp[2219]: connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out
Dec 5 19:21:57 server postfix/smtp[2196]: connect to mx4.hotmail.com[65.54.188.110]:25: Connection timed out
Dec 5 19:21:57 server postfix/smtp[2219]: 736A31DD5D3: to=, relay=none, delay=162568, delays=162418/0.04/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out)
Dec 5 19:21:57 server postfix/smtp[2196]: 2A2CD1DD5D2: to=, relay=none, delay=162859, delays=162708/0.17/150/0, dsn=4.4.1, status=deferred (connect to mx4.hotmail.com[65.54.188.110]:25: Connection timed out)
Dec 5 19:25:01 server imapd: Connection, ip=[::ffff:127.0.0.1]
Dec 5 19:25:01 server imapd: Disconnected, ip=[::ffff:127.0.0.1], time=0
Dec 5 19:25:01 server pop3d: Connection, ip=[::ffff:127.0.0.1]
Dec 5 19:25:01 server pop3d: Disconnected, ip=[::ffff:127.0.0.1]
Dec 5 19:25:01 server postfix/smtpd[2428]: connect from localhost[127.0.0.1]
Dec 5 19:25:01 server postfix/smtpd[2428]: lost connection after CONNECT from localhost[127.0.0.1]
Dec 5 19:25:01 server postfix/smtpd[2428]: disconnect from localhost[127.0.0.1]
Dec 5 19:30:01 server pop3d: Connection, ip=[::ffff:127.0.0.1]
Dec 5 19:30:01 server pop3d: Disconnected, ip=[::ffff:127.0.0.1]

I have static ip.
Reply With Quote
  #7  
Old 6th December 2009, 15:00
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

Does this happen only with Hotmail accounts, or also with other email providers?
__________________
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
  #8  
Old 6th December 2009, 16:27
yukomato yukomato is offline
Junior Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I have tried to send all emails account external ..

hotmail, yahoo google .. so on .. Real problem is: I cannot send any mail external. Internal is no problem ..

I do received mail from xternal accounts........

Last edited by yukomato; 6th December 2009 at 16:38.
Reply With Quote
  #9  
Old 7th December 2009, 14: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

Do you have PTR and SPF records?
__________________
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
  #10  
Old 7th December 2009, 15:08
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,138
Thanks: 4
Thanked 54 Times in 50 Posts
 
Default

Most email servers will not accept email coming from a server on a dynamic ip. They consider that as spam (well, I have configured my servers the same). So the only option I see is that you have to relay the outgoing email trhough your isp.

Edit: I didn't see that you have a static IP. However, if you still can't figure it out, you may give relaying a try anyway
__________________
"Common sense is not as common as commonly believed" by sjau

Auto-Install Script for ISPConfig and Horde on a Vanilla Debian Stable

Need more Repos for Ubuntu? Repository Generator
Need more Repos for Debian? Debian Repository Generator
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
Postfix not responding to telnet CarbonCopy Server Operation 6 8th May 2009 05:39
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36


All times are GMT +2. The time now is 01:22.


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