|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14292 Bare LF Issue - This time with DETAIL!
Submitted: 2001-11-29 18:29 UTC Modified: 2002-01-10 02:07 UTC
From: eric at 3dhavoc dot net Assigned:
Status: Closed Package: *Mail Related
PHP Version: 4.0.6 OS: Windows 2000 Server/XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
13 + 41 = ?
Subscribe to this entry?

 [2001-11-29 18:29 UTC] eric at 3dhavoc dot net
I am running an apache web server using PHP 4.06 on Windows 2000 Server and Windows XP (so we know it doesn't matter the OS as long as it's MS and PHP). Now here's my delima.

I can send emails through MS Outlook to my specified mail address just fine. There's no problems and it gets delivered right away. But when I try sending an email through a web form, the unix mail server running QMail rejects it with an error 451 Bare LF.

Here's an example: 

This email was sent from my Outlook Client through Postcast Email Server Succesfully (I have XXXX out server names for my protection):

Thread 1: 23:51:23 [<---] : HELO
Thread 1: 23:51:23 [--->] : 220 ESMTP
Thread 1: 23:51:23 [<---] : MAIL FROM: <>
Thread 1: 23:51:23 [--->] : 250
Thread 1: 23:51:23 [<---] : RCPT TO: <>
Thread 1: 23:51:23 [--->] : 250 ok
Thread 1: 23:51:23 [<---] : DATA
Thread 1: 23:51:23 [--->] : 250 ok
Thread 1: 23:51:23 [--->] : 354 go ahead
Thread 1: 23:51:23 [<---] : QUIT
Thread 1: 23:51:24 [--->] : 250 ok 1007074661 qp 3355

Now, this email was sent via a php script form through Postcast (I have XXXX out server names for my protection):

Thread 1: 23:37:55 [<---] : HELO
Thread 1: 23:37:55 [--->] : 220 ESMTP
Thread 1: 23:37:55 [<---] : MAIL FROM: <>
Thread 1: 23:37:55 [--->] : 250
Thread 1: 23:37:55 [<---] : RCPT TO: <>
Thread 1: 23:37:55 [--->] : 250 ok
Thread 1: 23:37:55 [<---] : DATA
Thread 1: 23:37:55 [--->] : 250 ok
Thread 1: 23:37:56 [--->] : 354 go ahead
Thread 1: 23:37:56 [<---] : QUIT
Thread 1: 23:37:56 [--->] : 451 See 

So what's the problem here? Do you think it could be that PHP 4.06 is spitting out these bare LF or what? I mean it's obvious that Postmaster Email Server is sending the mails just fine from Outlook and Outlook is the source of the mail that sent succesfully, and the PHP script is the one that sent Unsuccessfully.

I have tried at least 6 different SMTP servers for the win32 operating systems. They all do the same thing. This is very bad for me because I am having extreme difficulties running my site if every member signs up that has a unix email account running on Qmail, pukes on me and I have to send the emails directly to them. It's strange.

I hope we can figure this one out. I have researched the net but not any information on this particular configuration.

Eric Rosebrock


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-29 19:12 UTC] eric at 3dhavoc dot net
I would like to add that I have tried a perl script to send emails and it works fine. No bare LF. However, I tried to install Sendmail for Windows and I could not get that to run from php. So... we are back to square 1. Trying to get the Bare LF out of SMTP.
 [2001-12-02 02:22 UTC]
The code that handles sending messages for Win32 uses 
proper CRLF sequences.

Do the most basic test email messages fail? Have you tried 
sending something like?

    mail ('', 'test', 'test');

If so, does it get rejected as well?

 [2001-12-20 09:45 UTC]
Any feedback of this?

 [2002-01-10 02:07 UTC]
No feedback. Closing.
 [2002-03-06 17:40 UTC] surak at surak dot eti dot br
I'm running the infamous PHPTriad ( ), which is Apache 1.3.14 and PHP 4.0.5. Every time I try to mail someone using that simplest test "mail ('nono@nononono', 'test', 'test');"
and my smtp server is running qmail, this function returns a "server error". When I switch the server to any other mail exchanger, like one running sendmail or any other, everyting works fine. It was not just one qmail server I tried; Every qmail server I can post mails fails with mail() function when used remotely (as in this case, when you specify a SMTP in php.ini). These same qmail servers works fine when php is running locally and it doesn't need to make a SMTP connection.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 09:01:27 2024 UTC