1
TechNick
Mail sent by XOOPS 2.0.13.1 rejected due wrong line-ends
  • 2005/9/29 19:38

  • TechNick

  • Just popping in

  • Posts: 11

  • Since: 2005/9/29


I have a website running on XOOPS 2.0.13.1 and every time when it sends a mail some receiving mailhosts (running i.e. qmail) will reject it.

It happens with all XOOPS applications like the system function 'Mail User' and modules like 'Liaise'.

My hosting provider saids that XOOPS is sending mail with an incorrect line-end for a receiving UNIX-system with qmail.
'\n' instead of '\r\n'

I wrote two small scripts:
this one works:
<?php
mail("example@example.com", "Test bericht", "Regel 1\r\nRegel 2\r\nRegel 3\r\n");
?>

this one fials and is reproducing the problem:
<?php
mail("example@example.com", "Test bericht", "Regel 1\nRegel 2\nRegel 3\n");
?>

When I enable PHP logging in XOOPS I a get no errors or warnings.

Is XOOPS doing something wrong?

My website runs on:
XOOPS 2.0.13.1
PHP Version 5.0.5
Windows NT net3-nl-iis-30 5.0 build 2195
Zend Engine v2.0.5
Zend Extension Manager v1.0.6
Zend Optimizer v2.5.7

2
pegasus00321
Re: Mail sent by XOOPS 2.0.13.1 rejected due wrong line-ends

Well, have you tried adding /r/n. You use a Windows Server and Windows uses CR+LF line endings, but generally it shouldnt be a problem.

Its not an PHP Error of using /n vs. /r/n, it has to do with their Mail Server Setup.
Pegasus00321


I would appricate it if you click this link
TuFat.com PHP Scripts and etc

3
Mithrandir
Re: Mail sent by XOOPS 2.0.13.1 rejected due wrong line-ends

Actually, XOOPS (or rather - the third party phpmailer class that we use for mailing) changes all line endings to a defined character, which is by default set to /n.

Could you try adding this line to the XoopsMultiMailer constructor (function XoopsMultiMailer() ) in class/mail/xoopsmultimailer.php:
$this->LE "rn";


Then "all" we have to do is figure out why your mail server wants \r\n and not \n as line ending.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

4
TechNick
Re: Mail sent by XOOPS 2.0.13.1 rejected due wrong line-ends
  • 2005/9/30 13:43

  • TechNick

  • Just popping in

  • Posts: 11

  • Since: 2005/9/29


First of all thanks for the feedback.

When I'm home this evening I will try the option to modify xoopsmultimailer.php and post here the outcome.

The story starts at the sending mailserver, which logs:
....
212.xxxxxxxx - OutboundConnectionResponse [31/Aug/2005:03:41:47 +0100] "- -?451+See+http://pobox.com/~djb/docs/smtplf.html. SMTP" 0 47
212.xxxxxxxx - OutboundConnectionResponse [31/Aug/2005:03:41:47 +0100] "- -?
.....

So, when I send a mail from mailserver A to mailserver B the receiving mailserver B rejects the mail.
But it can happen that when I send a mail from mailserver A to mailserver C it works.

On http://cr.yp.to/docs/smtplf.html a detailed explanation is given regarding the Bare LFs in SMTP.

Finally it means that some receiving mailservers (like qmail) will reject the mail and for the enduser of the website it looks always like there is no problem (but there is because the mail will never be delivered in some cases).

Will be continued.....

5
TechNick
Re: Mail sent by XOOPS 2.0.13.1 rejected due wrong line-ends
  • 2005/9/30 15:02

  • TechNick

  • Just popping in

  • Posts: 11

  • Since: 2005/9/29


Thanks guys, it works! You made me very happy.

I added the line '$this->LE = "\r\n";' and problem is gone!

Maybe a 'bug' in XOOPS or is qmail to strict?

Let me know if I have to submit an official bugreport.

Login

Who's Online

172 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 172


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits