URL: http://www.uburst.com/cgi-bin/dcforum/dcboard.cgi
Forum: uReserve_config
Thread Number: 14
[ Go back to previous page ]

Original Message
"Sockets - NT Server, but Unix mailserver"

Posted by Jason Sheldon [jason@digital-solutions.co.uk] on at 12:36 PM
While testing this combination on an internal webserver running IIS, I've tried using 'SOCKETS' to connect to a mailserver running on Unix.

Nothing arrives at the destination.

The mailserver uses Qmail, and looking through the packets, it seems to respond with a message :
"See http://pobox.com/~djb/docs/smtplf.html"
which contains information on 'bare linefeeds'.
I see the script sends "\r\n" so things look ok.

Are there any known problems using Qmail?

I've also tried swapping the Unix #'s and NT #s for the different socket commands, to no avail.

Any ideas why mails aren't being received? They DO seem to be heading out to the mailserver, but are not being processed, which leads me to think that there is a problem with the formatting of the message that I can't debug.

Jason


Table of contents

Messages in this discussion
"More information!! Confirmed Linefeed problem"
Posted by Jason Sheldon [jason@digital-solutions.co.uk] on at 12:59 PM
At the end of the script file, go up a few lines until you see the line:

print S "$message";

I commented that line out and underneath added:

print S "testing\r\nTesting";

saved, then tested it.

The emails came through fine, so it does appear to be a problem with the bare linefeeds in the $Message text.
This should be a straightforward fix I would have thought, to ensure that the $message string has CR/LF instead of LF.

Regards,

Jason.


"RE: More information!! Confirmed Linefeed problem"
Posted by Bill Weiner on at 08:36 AM
Hmmm... That's interesting. It must be a function of going from an NT server (which I think just needs \n) to a UNIX server (which needs the \r\n). We'll look into it. But in the meantime, if you just want to make sure the $message has carriage returns and line feeds, then you could try adding this line to the top of the "send_mail_sockets" subroutine:

$message ~= s/\n/\r\n/g;

By the way, if uReserve was just running on a Unix server... I believe you could just use the the QMail program directly by just configuring uReserve's SENDMAIL email option with your Qmail path.