LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 05-18-2008, 04:47 AM   #1
joeyadms
LQ Newbie
 
Registered: May 2008
Posts: 5

Rep: Reputation: 0
Postfix Connection Timeout, CentOs


Well, me and mail servers just don't work out. I have been working on and off for about 3 years fooling with sendmail,postfix,qmail on several different unix/linux installs.

I am a web developer, and trying to get php's mail() to work. I am using postfix, and getting connection timed out in logs.

I am very happy with my current CentOS install and would really like to get this working.

I will first say what all I have done, then post the logs and conf.

Today I decided to get this working, I started off with Sendmail still installed. I used yum to install postfix and system-switch-mail, then used
system-switch-mail to switch over to postfix and restarted the machine.

Whenever I try to send mails from telnet or from php, they get connection timed out in mailq and maillog. I am certain it is my configuration, I have never understood it much, and have tried following almost every guide out there. I don't want to botch this install, so I am putting myself into your hands haha.

mailq-----------------
Code:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
C9FD84500BF      332 Sun May 18 05:06:42  www@localdomain.localdomain
         (connect to gsmtp183.google.com[64.233.183.27]: Connection timed out)
                                         email@gmail.com

A45F34500B8      323 Sun May 18 04:54:32  www@localhost.localdomain
        (connect to gsmtp147.google.com[209.185.147.27]: Connection timed out)
                                         email@gmail.com

364B04500C6      366 Sun May 18 05:24:46  joey@joeyadams.net
         (connect to gsmtp183.google.com[64.233.183.27]: Connection timed out)
                                         email@gmail.com

E1DA84500B5      339 Sun May 18 05:21:01  www@localdomain.localdomain
         (connect to gsmtp183.google.com[64.233.183.27]: Connection timed out)
                                         email@gmail.com

maillog ----------------------------------------
Code:
May 18 05:40:58 localhost postfix/pickup[2537]: 015DF4500CB: uid=500 from=<www>
May 18 05:40:58 localhost postfix/cleanup[2879]: 015DF4500CB: message-id=<20080518094058.015DF4500CB@redhat.localhost.localdomain>
May 18 05:40:58 localhost postfix/qmgr[2538]: 015DF4500CB: from=<www@localdomain.localdomain>, size=339, nrcpt=1 (queue active)
main.cf -------------------------------------------------------
This is a long file, you can find it here
http://www.joeyadams.net/cf.txt



/etc/hosts ----------------------------------------------------
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
/etc/sysconfig/network -----------------------------------------
Code:
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=localhost.localdomain

Thanks ahead of time for any help.

Last edited by joeyadms; 05-18-2008 at 04:51 AM. Reason: Add URL
 
Old 05-18-2008, 07:24 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
it seems like your system can not outbound connections on port 25, double check that on the command line i suspect your ISP is blocking your port 25 out and want you to use their mail server to relay all outbound email, if that is the case configure postfix as a smart host of their system
 
Old 05-18-2008, 08:04 AM   #3
joeyadms
LQ Newbie
 
Registered: May 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Well I have another server, Win2k3, that is my actual mail server. It can send out/receive mail.
 
Old 05-18-2008, 10:21 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
did you even try to test that you can connect to port 25 from that machine ? These are simple troubleshooting steps that will help you fix the problem, if you find that you cannot connect on that machine but can connect from your win2k system then there are possible causes you can look at

1. do u have a correct default route out ? can you ping internet systems ?

2. Is a host firewall on the linux machine blocking out smtp traffic ?

3. Is your router blocking smtp traffic from the linux host ?

4. You could have 1 to 1 nat for the windows machine which allows only that ip out on port 25
 
Old 05-18-2008, 02:00 PM   #5
joeyadms
LQ Newbie
 
Registered: May 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Hey thanks for the response. I don't have any firewall running, and my router doesn't have any restrictive rules.

BUT! I tried to telnet from my dev machine to the linux server, and could not connect, same thing from my windows server to the linux server.

Netstat -an says its listening on 25, and I can telnet from the linux server to localhost. However from the linux server I cannot telnet to the local IP address, it says connection refused.

I think we found our problem. Sounds like it's not allowing outside connections.
 
Old 05-18-2008, 02:49 PM   #6
joeyadms
LQ Newbie
 
Registered: May 2008
Posts: 5

Original Poster
Rep: Reputation: 0
I'm an idiot, I forgot I was using iptables, I configured it to forward through, and now I can successfully connect from anywhere.

My Mails to sent to my win2k3 mail server /@joeyadams.net/ are sent fine, ones through google time out however.

I just tried other domains like yahoo, they won't send either.

Last edited by joeyadms; 05-18-2008 at 05:40 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix: mail status=deferred, read timeout svesch Linux - Server 1 01-11-2008 03:43 AM
timeout after CONNECT from xxxx.com (postfix mail server) marmen Linux - Newbie 0 11-13-2007 11:44 AM
Internet connection timeout on Fedora Core 5 using USB connection mike1111 Linux - Networking 0 07-23-2006 09:44 PM
Postfix timeout after data error cayers Linux - Networking 2 11-13-2003 12:48 PM
Connection Timeout Nezar Linux - Networking 1 07-01-2001 01:30 AM


All times are GMT -5. The time now is 06:16 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration