LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sending mails thru Sendmail - Deferred: Connection refused by [any_host] (https://www.linuxquestions.org/questions/linux-software-2/sending-mails-thru-sendmail-deferred-connection-refused-by-%5Bany_host%5D-705951/)

branislav.zvarik 02-19-2009 11:44 AM

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!

unSpawn 02-19-2009 05:53 PM

Quote:

Originally Posted by branislav.zvarik (Post 3449888)
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?

liko2k 05-08-2009 05:40 AM

Quote:

Originally Posted by unSpawn (Post 3450321)
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.

repo 05-08-2009 05:44 AM

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.

liko2k 05-08-2009 05:47 AM

Quote:

Originally Posted by repo (Post 3534391)
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 :)

repo 05-08-2009 06:00 AM

Quote:

It is a server on a private IP, solid as a rock
you mean fixed public IP, right?

liko2k 05-08-2009 06:11 AM

Quote:

Originally Posted by repo (Post 3534403)
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

liko2k 05-08-2009 09:47 AM

Hmmm similar thing happens using postfix....any ideas?

liko2k 05-21-2009 02:45 AM

Bump

billymayday 05-21-2009 03:32 AM

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.


All times are GMT -5. The time now is 11:27 AM.