LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-19-2009, 11:44 AM   #1
branislav.zvarik
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Sending mails thru Sendmail - Deferred: Connection refused by [any_host]


I'm sending emails thru sendmail and i'm getting error messages like(not a single email is being delivered):

Deferred: Connection refused by alt4.gmail-smtp-in.l.google.com.

Here is the header of my email:
Code:
Return-Path: 	<g>
Received: 	from www.example.com (www.example.com [127.0.0.1])by www.example.com (8.14.1/8.14.1) with ESMTP id n1JHVPt3002351for <my.eamil.address@gmail.com>; Thu, 19 Feb 2009 12:31:25 -0500
Full-Name: 	root
Received: 	(from root@localhost)by www.example.com (8.14.1/8.14.1/Submit) id n1JHVPdg002350;Thu, 19 Feb 2009 12:31:25 -0500
Date: 	Thu, 19 Feb 2009 12:31:25 -0500
Message-Id: 	<200902191731.n1JHVPdg002350@www.example.com>
To: 	my.eamil.address@gmail.com
Subject: 	the subject
From: 	branislavz@example.com
Reply-To: 	branislavz@example.com
X-Mailer: 	PHP/5.2.4
Instead of my.email.address@gmail.com there is my real gmail address, and instead of example.com there is a real domain name.




Output of sendmail -bp
Code:
n1JHVPt3002351        6 Thu Feb 19 12:31 <root@www.example.com>
                 (Deferred: Connection refused by alt4.gmail-smtp-in.l.google.)
                                         <my.eamil.address@gmail.com>


output of /etc/sysconfig/network :
Code:
NETWORKING=yes
#HOSTNAME=localhost.localdomain
HOSTNAME=www.example.com
Output of /etc/hosts :
Code:
127.0.0.1       www.example.com
127.0.0.1               localhost.localdomain localhost localhost
::1             localhost6.localdomain6 localhost6
Related part of /etc/mail/sendmail.cf
Code:
# "Smart" relay host (may be null)
DS


C{E}root
C{w}localhost.localdomain
(i have tried to change it to other values, didn't help)


Basically, I assume that problem is:
Received: (from root@localhost)
in the header of outgoing email. Any idea how to change that value? Or if something else could be problem as well? I'm running Sendmail 8.14.1 on Fedora 8.
I went thru this http://forums13.itrc.hp.com/service/...hreadId=943908 and this post : http://forums13.itrc.hp.com/service/...23091+28353475 - but neither of them helped me.

Thanks in advance!
 
Old 02-19-2009, 05:53 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by branislav.zvarik View Post
Or if something else could be problem as well?
Google doesn't much like domestic IP ranges. So unless you own a domain you can set up SPF records for, try using your ISP's MTA as Smart host and see if that works?
 
Old 05-08-2009, 05:40 AM   #3
liko2k
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Google doesn't much like domestic IP ranges. So unless you own a domain you can set up SPF records for, try using your ISP's MTA as Smart host and see if that works?
Well I have similar problem. I own a domain though. What do I have to do in order to have sendmail working correctly?

thanks.
 
Old 05-08-2009, 05:44 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Well I have similar problem. I own a domain though. What do I have to do in order to have sendmail working correctly?
If your mail server has a dynamic IP, most SMTP servers will deny access.
Look in the logfiles, they will give the exact errormessage.
 
Old 05-08-2009, 05:47 AM   #5
liko2k
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
If your mail server has a dynamic IP, most SMTP servers will deny access.
Look in the logfiles, they will give the exact errormessage.
It is a server on a private IP, solid as a rock
 
Old 05-08-2009, 06:00 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
It is a server on a private IP, solid as a rock
you mean fixed public IP, right?
 
Old 05-08-2009, 06:11 AM   #7
liko2k
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
you mean fixed public IP, right?
Yes. This is my server and I have total controll over it.

I have exacly the sam problems as it was described above but I can add SPF entry for my domain. I did this:

v=spf1 a mx ptr include:smtp.secureserver.net ~all

What should be the sendmail server config to take advantage of this?

maybe I have to do something in order to my server was identified by other mail servers (smtp) as a sever using my domain...

example error from logs:

May 8 12:27:36 UTS sendmail[23120]: n45JUemL016426: to=<xxx@xx.xx>, delay=2+15:56:56, xdelay=00:00:00, mailer=esmtp, pri=35319380, relay=mx4.xxx.xx., dsn=4.0.0, stat=Deferred: Connection refused by mx4.xxx.xx.


I have also this set up in my DNS control panel :

MX (Mail Exchange)
Priority Host Goes To TTL Actions
10 @ aspmx.l.google.com 1 Hour

20 @ alt1.aspmx.l.google.com 1 Hour

20 @ alt2.aspmx.l.google.com 1 Hour

30 @ aspmx2.googlemail.com 1 Hour

30 @ aspmx3.googlemail.com 1 Hour

30 @ aspmx4.googlemail.com 1 Hour

30 @ aspmx5.googlemail.com 1 Hour

Last edited by liko2k; 05-08-2009 at 06:30 AM.
 
Old 05-08-2009, 09:47 AM   #8
liko2k
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Hmmm similar thing happens using postfix....any ideas?
 
Old 05-21-2009, 02:45 AM   #9
liko2k
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Bump
 
Old 05-21-2009, 03:32 AM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I just sent you an email via LQ with an email address for you to try sending to. Let me know if you didn't get it, otherwise, post here with the time you tried to connect.
 
  


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
sendmail - deferred: localhost connection timeout yukinK Linux - Newbie 2 05-18-2007 12:56 PM
sendmail deferred: Connection refused kginige Linux - Server 2 05-04-2007 05:34 AM
SendMail Not Sending, Messages Stuck In Queue As: Deferred: Connection JustinK101 Linux - Software 43 03-30-2007 12:21 AM
sendmail Deferred: Connection refused by localhost.localdomain. 360 Linux - Software 6 03-31-2003 01:07 PM
Pine: Deferred: Connection refused .... katana Linux - General 4 08-09-2001 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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