[sldev] [LSL] [POSTFIX PROBLEMS] Object Email Receive from
external domain problems
Kamilion
kamilion at gmail.com
Mon Jun 11 02:35:54 PDT 2007
Holy crap. This is far worse than I expected.
I didn't want to use XMLRPC because I figured that a single point of
failure and lag of a couple minutes wasn't worth it.
>From what I knew, postfix ran on every simulator; so it was more
distributed and hopefully more robust.
Now it looks like something is SERIOUSLY wrong in email land.
Last I knew, Michael, James, and Charity Linden were messing with
postfix back in april's blog post.
Now -- What can we do about this? I'm glad I said something, otherwise
this might have been a quiet annoyance.
I know postfix can be blazingly fast, I used to use it on my own
domain before moving over to Google Apps for your Domain, So there's
obviously some kind of misconfiguration somewhere.
If you feel like sharing; I'd like a copy of that PHP and LSL you use;
because this is EXACTLY the sort of setup I'm trying to achieve (PHP
Mail to LSL).
So far, I've had to bash at PHP to even get it to talk to Google's AfyD server.
Google uses SSL/TLS *ONLY* for SMTP auth, so php's mail() function
doesn't work so well.
After doing exhaustive research, I came up with the following options:
http://www.bytewize.com/linux/BetterSMTPhelp.php
BetterSMTP, a phpbb2.x mod to use the SquirrelMail SMTP classes.
Looked to be broken and forum posts about it were awash with PLZ HELP.
No good.
http://www.vulgarisoip.com/?p=17
PHPGmailer, a Cut & Paste job on PHPMailer to kitbash it into using
TLSSTART. Also no good, PHPMailer isn't maintained anymore and this
kitbash comes up with SSL errors on connection close.
The winner:
Still poking along, I ran across this bug report for Wordpress:
http://trac.wordpress.org/ticket/4326 #4326 (WP can't use Google
Apps For Your Domain email accounts.)
Which linked me here:
http://www.shiftthis.net/wordpress-swift-smtp-plugin/
Which linked me here:
http://www.swiftmailer.org/
"Swift is a free feature-rich PHP Mailer -- Swift is a fully OOP
library for sending e-mails from PHP websites and applications. It
does not rely on PHP's native mail() function which is known for using
high server resources when sending multiple emails. Instead, Swift
communicates directly with an SMTP server or a MTA binary to send mail
quickly and efficiently."
Score!
One of the features it lists: "SSL & TLS Support - for Gmail servers"
So, here's how I hacked together a nice little test script:
<?php
require_once "swiftmailer/Swift.php";
require_once "swiftmailer/Swift/Connection/SMTP.php";
echo "Starting...\n<br>\n<br>\n";
// Create a SMTP connection handler (Google Apps for your Domain)
$smtp = new Swift_Connection_SMTP("smtp.googlemail.com",
Swift_Connection_SMTP::PORT_SECURE, Swift_Connection_SMTP::ENC_TLS);
$smtp->setUsername("phpsmtp at sllabs.com");
$smtp->setpassword("smtpmail");
// Create the Swift object interface
$swift =& new Swift($smtp);
$to = "513d65af-98e3-f2ef-db09-9a112eca5d28 at lsl.secondlife.com";
$subject = "Testing my subject";
$message = "A very long\n and drawn out\n message.\n\nRar!";
//Create the message
$swiftmessage =& new Swift_Message($subject, $message);
//Now check if Swift actually sends it
if ($swift->send($swiftmessage, $to, "phpsmtp at sllabs.com"))
{ echo "Sent"; } else { echo "Failed"; }
?>
Here's a sample result:
Delivered-To: kamilion at gmail.com
Received: by 10.100.165.16 with SMTP id n16cs242953ane;
Sun, 10 Jun 2007 20:14:00 -0700 (PDT)
Received: by 10.64.204.19 with SMTP id b19mr8395228qbg.1181531640038;
Sun, 10 Jun 2007 20:14:00 -0700 (PDT)
Return-Path: <phpsmtp at sllabs.com>
Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.225])
by mx.google.com with ESMTP id q14si5481907qbq.2007.06.10.20.13.59;
Sun, 10 Jun 2007 20:14:00 -0700 (PDT)
Received-SPF: neutral (google.com: 72.14.204.225 is neither permitted
nor denied by best guess record for domain of phpsmtp at sllabs.com)
Received: by qb-out-0506.google.com with SMTP id q12so1717954qba
for <Kamilion at gmail.com>; Sun, 10 Jun 2007 20:13:59 -0700 (PDT)
Received: by 10.115.110.6 with SMTP id n6mr5060449wam.1181531638487;
Sun, 10 Jun 2007 20:13:58 -0700 (PDT)
Return-Path: <phpsmtp at sllabs.com>
Received: from ?216.218.196.73? ( [216.218.196.73])
by mx.google.com with ESMTP id n38sm6862970wag.2007.06.10.20.13.57
(version=SSLv3 cipher=OTHER);
Sun, 10 Jun 2007 20:13:58 -0700 (PDT)
Return-Path: <phpsmtp at sllabs.com>
To: Kamilion at gmail.com
From: phpsmtp at sllabs.com
Reply-To: phpsmtp at sllabs.com
Subject: My subject
Date: Sun, 10 Jun 2007 20:15:09 -0700
X-LibVersion: 3.2.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Message-ID: <20070611031509.22850.1036293226.swift at vendor.sllabs.com>
My body
So, anyway.
External Domain Email's obviously broked somehow.
Included some data that could be useful for others.
Harold, I've got land in multiple mainland and private sims. If you
feel like it, I can set up some additional prims to take multiple
metrics, and see if there's a correlation.
sllabs.com is run from a Gentoo VPS hosted by atarack.com in Hurricane
Electric's Fremont-II datacenter, roughly 2ms from the main LL
datacenter in SF.
If you should decide to decline sharing your code, heck, I'll bash up
a similar PHP&LSL script and share it in this thread, just because I
wanna get to the bottom of this; and hopefully share as much data as I
can with the lindens so they can fix it properly.
-- Graham Cantin (Kamilion Schnook)
(sorry for the longwinded mails, but this stuff's archived, so it may
help out others in the future who are browsing the SLDev archives or
the Google Coop search :)
On 6/10/07, Harold Brown <labrat.hb at gmail.com> wrote:
> Welcome to the hell of trying to use external -> internal E-Mail with SL.
>
> For a nice history of the reliability of external -> internal E-Mail from
> May 2 -> current date, you can view my test log at this URL:
> http://www.rpgstats.com/SL/maillog.txt
>
> If you would like to review the history from February8 -> May2 it is
> available here:
> http://www.rpgstats.com/SL/maillog1.txt
>
> As of the time I'm replying there seems to be about 4 hour delay in e-mail
> processing for SL... There have been delays up to around 24 hours.
>
> For those interested in how the test works.
>
> I have an LSL script running on my sim that once every 30 minutes requests a
> PHP script on my webserver to send an e-mail. The PHP script generates a
> random string for the subject and logs the time that it sends to the
> maillog.txt file. The LSL script checks every 5 seconds for a new E-Mail,
> and upon receiving one it tells the PHP script on the server that it
> recieved an E-Mail and what the subject was. The PHP script then logs this
> information as well.
>
> On 6/10/07, Kamilion <kamilion at gmail.com> wrote:
> >
> > I'm having some problems with objects and receiving email from outside
> > of the secondlife.com domain -- They seem to be failing without an
> > error or bounce message, and the object never appears to receive the
> > email. I was hoping someone could look into this or point someone who
> > can at it. I submitted a ticket in the new support system, TicketID
> > 4051-4201708.
> >
> > Synopsis:
> > Object Sending Email (Working)
> > Object Receiving Email from another Object (Working)
> > Object Receiving Email from Google Apps for your Domain hosted system:
> > ( sllabs.com) (NOT WORKING)
> > Object Receiving Email from Google Mail (gmail.com) (NOT WORKING)
More information about the SLDev
mailing list