PDA

View Full Version : Failed to send email: 451


Marcelo Collao
04-07-06, 05:54 AM
Hello.

I'm installing dotProject (THANK YOU for the software!!!)
I want to send email from dotProject, but it doesn't work.

The error message is:
Failed to send email: 451 See http://pobox.com/~djb/docs/smtplf.html.

dotProject 2.0.4
PHP 4.4.2
mySQL 4.1.20
Windows 2000 Pro SP4.

system configuration:
SMTP
SMTP Server: myserver.mydomain.com (it's correct!!!)
PORT: 25
Server requires auth: yes
user: xxx (it's correct)
passwd: yyy (it's correct)
queue: false
timeout: 30

Thanks in advance.
Marcelo.

MacOfTheEast
04-07-06, 06:19 AM
That URL discusses qmail's unwillingness to accept improperly formed
linefeeds (LF instead of the proper CR+LF). Can you try with a different outgoing server?

MOTE

Marcelo Collao
04-07-06, 12:33 PM
I tried with Microsoft SMTP server (6.0.2600.2180) on Windows XP.
It worked.

I'll try to use another qmail.

Marcelo.

Marcelo Collao
04-07-06, 01:41 PM
It's working now.
I had to change the source code.

It's my first time trying with PHP code, so

Can You tell me about the changes that were made?
The file is classes/libmail.class.php,v 1.14.8.6

350c350
< $sep = "\n";
---
> $sep = "\r\n";
358c358
< $this->headers .= "$hdr: $value\n";
---
> $this->headers .= "$hdr: $value\r\n";

Are they correct?

Thanks.
Marcelo.

pedroa
04-07-06, 07:12 PM
http://rfc.net/rfc821.html

If you read the standard you'll notice that everything is supposed to end with <CRLF>, but I guess that microsoft never was good at reading standards, so with some ms servers (if not all) <LF> is enough and <CR> may blow the emails.

Pedro A.

Marcelo Collao
04-07-06, 11:33 PM
but the standard *is not* the point

the point is:

my installation of dotproject v2.0.4 doesn't work with qmail server.
i changed some lines of code, and it's working now.

so, i want to know, is it a bug?, are the changes correct? did i make a mistake?

Thanks for your help.
Marcelo.

MacOfTheEast
05-07-06, 02:15 AM
but the standard *is not* the point

Maybe not for you but for others it is very much the point.

the point is: my installation of dotproject v2.0.4 doesn't work with qmail server. i changed some lines of code, and it's working now.

so, i want to know, is it a bug?, are the changes correct? did i make a mistake?


If it's working for you now, that's good and we're all very happy for you... and the fact that it is working for you means that your modification did not break the code. Is it a bug? No! When you "look around" and notice that it's only you that is having the problem, it's time to look in the mirror (something in your situation, not universally recognized) :)

MOTE

aielman
16-09-06, 07:39 AM
thanks for the help marcelo!!

I had the exact same problem and your fix worked like a charm!!

slillig
17-10-06, 05:31 PM
Thanks from me as well marcelo!!

I had the exact same problem and your fix also worked for me like a charm!!

Looks like you can put down that mirror now. ;)

pedroa
17-10-06, 07:41 PM
For you guys that love qmail, here goes a link for you to enjoy:
http://cr.yp.to/docs/smtplf.html

Believe it or not this is the domain of the qmail itself and I couldn't have said better. (Maybe it is not qmail after all, maybe is just misconfiguration?)
Also see:
http://www.lifewithqmail.org/lwq.html#cr

If you don't mind we'll stick to the standards, and those that use software out of the standards truly deserve to pay the price.
(anyway you just had to change 2 bytes of code :) )

Pedro A.

denisjtorresg
08-11-06, 06:09 AM
Again: Thanks Marcelo Collao!

I had the same problem in ticketsmith module.

kerbela
26-04-07, 06:45 AM
The file is classes/libmail.class.php,v 1.14.8.6

350c350
< $sep = "\n";
---
> $sep = "\r\n";
358c358
< $this->headers .= "$hdr: $value\n";
---
> $this->headers .= "$hdr: $value\r\n";



Thanks for the fix Marcelo, I had the same issue with qmail.

It is weird that some PHP scripts work with LF-only which is what was in the original code while it violates RFC 822bis section 2.3 :???:

Thanks for the program BTW guys. I just installed and it looks great.