Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: emails are delayed
PostPosted: Mon Apr 04, 2011 8:09 pm 
Offline
Senior Newbie

Joined: Wed Oct 27, 2010 8:50 pm
Posts: 8
Hello.
I did search for a long time before posting this, but I could not find anything related to my problem (or if it was, then it was too complex for me to understand).
I am setting up a simple website where users register to events; Upon registering, an email is sent to confirm registration has been received and yaddah yaddah.
Thing is, emails take a very long time to get to destination. Sometimes 2 hours, sometimes more. Is this normal?
I am simply using PHP's mail() function, as I am reluctant to install a PEAR package or a command-line app for such a simple task (but I will if it is the solution to my problem)...I like my apps to be as independent as possible.

For all means and purposes, here is a sample header:
Code:
                                                                                                                                                             
Delivered-To: jad@y---o.com
Received: by 10.147.40.6 with SMTP id s6cs40117yaj;
        Mon, 4 Apr 2011 04:11:50 -0700 (PDT)
Received: by 10.14.22.13 with SMTP id s13mr3224501ees.89.1301915509244;
        Mon, 04 Apr 2011 04:11:49 -0700 (PDT)
Return-Path: <www-data@xannax-rv408-rv508>
Received: from xannax-RV408-RV508 ([80.83.25.142])
        by mx.google.com with ESMTP id q47si13002090eeh.0.2011.04.04.04.11.46;
        Mon, 04 Apr 2011 04:11:48 -0700 (PDT)
Received-SPF: neutral (google.com: 80.83.25.142 is neither permitted nor denied by best guess record for domain of www-data@xannax-rv408-rv508) client-ip=80.83.25.142;
Authentication-Results: mx.google.com; spf=neutral (google.com: 80.83.25.142 is neither permitted nor denied by best guess record for domain of www-data@xannax-rv408-rv508) smtp.mail=www-data@xannax-rv408-rv508
Received: by xannax-RV408-RV508 (Postfix, from userid 33)
   id 086FF3463; Mon,  4 Apr 2011 02:55:25 +0300 (EEST)
To: jad@y---o.com
Subject: PASTEUR: Your guest list was refused, Jad Sarout for the event My First Time!
X-PHP-Originating-Script: 1000:pasteur_functions.php
From: pasteur@p---s.com
Reply-To: pasteur@p---s.com
MIME-Version: 1.0
Content-Type: text/html; charset=ISO-8859-1
Message-Id: <20110403235526.086FF3463@xannax-RV408-RV508>
Date: Mon,  4 Apr 2011 02:55:25 +0300 (EEST)

<html><body>Dear Jad Sarout, you have been refused. Sorry!<br />
</body></html>

p---s.com being the domain (email are google apps based, but of course in this case I go through my own server and I am not using gmail's SMTP).
jad@y---o.com is my address (works on google apps too)

I have no problem in posting the actual domain and email, but I am just weary of spam collectors.

Just some background so if you decide to help me, you know how much you have to explain:
I code websites for a living, I use PHP/JS/actionscript/Java daily, and I am under ubuntu, at home and at work, and I use to command line for most of my management. I can set up an apache server no problem, etc.
I just never had to deal with sending emails from a website until now. In other words simple guidelines will do the trick, I can google more info, I just need to know how to go from here, because I am frankly a bit lost right now.


Any suggestions?


Top
   
 Post subject:
PostPosted: Mon Apr 04, 2011 8:26 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Looks like the e-mail was received by 80.83.25.142 on Apr 3 at 23:55:25 UTC and received by Google at Apr 4 at 11:11:48 UTC. Whatever 80.83.25.142 is, you seem to be routing outgoing mail through there, which is strange.

In any case, the mail logs on 80.83.25.142 may be able to tell you what it was doing with that message for 11 hours.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject: WHAT?!
PostPosted: Mon Apr 04, 2011 8:34 pm 
Offline
Senior Newbie

Joined: Wed Oct 27, 2010 8:50 pm
Posts: 8
I am sorry. This is making less and less sense to me.
I mean it really doesn't.

VISP (the domain this IP address points to), is our office's internet provider here, in Lebanon.

But my server is on Linode, in the UK, and sends email through it's internal sendmail function to an address using google apps, on google's servers. The email is filled through a simple form, submit through POST, then handled by my script.

Where does my ISP, which operates only in Lebanon, fit in all this?! How is it even possible that it is an actor in that transaction?

I am missing a piece here. This seems like dark voodoo to me. Pointers please!


Top
   
 Post subject:
PostPosted: Mon Apr 04, 2011 8:37 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
What information do you have in your mail log for that queue entry? It should show you any attempts, reasons for deferring, and give you a more detailed time line than just the headers. In this case it looks like arrival at Google was almost 12 hours later, so there should have been multiple attempts logged on your side.

I will note that your mail host is announcing itself to the receiver (Google in this case) as host xannax-RV408-RV508 which neither is a fully qualified name, nor shares domain information with the addresses being used (which are .com domains). So maybe it's getting hung up or throttled since it appears spam-like.

Also, oddly, I can't reverse resolve your 80.83.25.142 address - is this a Linode? Typically they resolve at least to a members.linode.com address. Or is that some external host you are using as a "smart" gateway? In that case, I'd definitely suggest just putting postfix (or equivalent) on your Linode, pointing php's mail at localhost and letting it handle the queueing/delivery.

-- David


Top
   
 Post subject: Re: WHAT?!
PostPosted: Mon Apr 04, 2011 8:42 pm 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
xananax wrote:
But my server is on Linode, in the UK, and sends email through it's internal sendmail function to an address using google apps, on google's servers. The email is filled through a simple form, submit through POST, then handled by my script.

And then what does your script do with it?

Quote:
Where does my ISP, which operates only in Lebanon, fit in all this?! How is it even possible that it is an actor in that transaction?

Best guess is that you've explicitly configured part of your mail delivery chain to use your ISP's mail gateway to deliver mail. You just need to figure out what part. Does the the ISP host address or name show up in any configuration file beneath /etc or anywhere in your applications code/configs?

Given that the first Received line in your posted headers use the ISP host, my first bet would be your own application configuration (or some general configuration for php internal mail transmission) is pointing there.

-- David


Top
   
 Post subject:
PostPosted: Mon Apr 04, 2011 9:06 pm 
Offline
Senior Newbie

Joined: Wed Oct 27, 2010 8:50 pm
Posts: 8
Thank you both for your help (sorry I haven't thanked you before, hoopycat, but I was just too confused).

This is just my stupidity: Those are the emails I sent while testing the website on my test server!
For my defense, I was never able to send emails through my test server before, it seems like something in my ISP's config changed. Always had to upload on a production server to use the mail() function...So I really wasn't expecting those emails to ever arrive.

Thank you for your time and sorry to have wasted it!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group