6.0.0-alpha14
7/1/25

[#12614] smtp-package: mails are sent without body
Summary smtp-package: mails are sent without body
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 3. High
Owners slusarz (at) horde (dot) org
Requester skeller757 (at) gmx (dot) de
Created 08/25/2013 (4328 days ago)
Due
Updated 08/26/2013 (4327 days ago)
Assigned 08/25/2013 (4328 days ago)
Resolved 08/26/2013 (4327 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/26/2013 07:04:29 PM Michael Slusarz Comment #15
Assigned to Michael Slusarz
State ⇒ Resolved
Reply to this comment
Horde_Mail 2.1.1.

Another of Net_SMTP's issues: it requires the input body text to end 
with \r\n.  There is no SMTP requirement for this (a SMTP driver 
should be able to handle the necessary end-of-data conventions on its 
own).

This was recently removed from Horde_Mime since it is not needed for 
any other mail driver (and adds unwanted spaces to the end of the 
text).  Re-added to the proper place - the Net_SMTP 
Horde_Mail_Transport driver.
08/26/2013 06:58:30 PM Git Commit Comment #14 Reply to this comment
Changes have been made in Git (master):

commit c074f8e600991da505890b357f22f2de1cab28d9
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Mon Aug 26 12:58:03 2013 -0600

     [mms] Workaround broken Net_SMTP handling regarding the end of 
message data (Bug #12614).

  framework/Mail/lib/Horde/Mail/Transport/Smtp.php |   19 +++++++++++++++++++
  framework/Mail/package.xml                       |    4 ++--
  2 files changed, 21 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/c074f8e600991da505890b357f22f2de1cab28d9
08/26/2013 06:45:48 PM Michael Slusarz Comment #13 Reply to this comment
In short -
PHP has a published API.  We work off the published API.  This is not
being "aggressive".  This is a broken parser/interpreter.
Does this mean that PHP v. 5.4.9 should be considered obsolete as 
far as you're concerned?
Yes, IMHO.

Case in point: 5.4.19 was just released and contained a security fix 
for OpenSSL related activity.  I would argue running any program with 
a known security vulnerability is a Bad Idea.

What's worse with PHP is that it is REMOTELY ACCESSIBLE.  Unlike some 
command line program, issues in PHP code can potentially be triggered 
by a remote user that has no connection to the system.
08/26/2013 11:36:56 AM wolf (at) blazingangles (dot) com Comment #12 Reply to this comment
When I remove Net_SMTP, which has supposedly been discarded from the 
Horde framework, I get errors in my access log stating that Net_SMTP 
isn't found.

It appears that /usr/share/php/Horde/Mail/Transport/Smtp.php is full 
of references to Net_SMTP, but the file itself has the time and date 
as of the most recent forced update (pear install -f). There are also 
references to Net_SMTP in Smtpmx.php.

This could indicate that for some reason the file is not up to date.
08/26/2013 11:06:15 AM Jan Schneider Comment #11 Reply to this comment
In short -
PHP has a published API.  We work off the published API.  This is not
being "aggressive".  This is a broken parser/interpreter.
Does this mean that PHP v. 5.4.9 should be considered obsolete as 
far as you're concerned?
No, but unless someone who runs the buggy version of PHP can tell us 
where it fails, i.e. where the triggered bug manifests itself, there 
is no way for us to work around it.
08/26/2013 07:13:04 AM wolf (at) blazingangles (dot) com Comment #10 Reply to this comment
     Shot-in-the dark attempt to fix #12614

  framework/Smtp/lib/Horde/Smtp.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/c7fc064a2a22176ab1ac078a5a6cf908299ce136
This attempt doesn't seem to solve the problem.

08/26/2013 07:05:14 AM wolf (at) blazingangles (dot) com Comment #9 Reply to this comment
In short - PHP has a published API.  We work off the published API.   
This is not being "aggressive".  This is a broken parser/interpreter.
Does this mean that PHP v. 5.4.9 should be considered obsolete as far 
as you're concerned?

08/26/2013 04:04:47 AM Michael Slusarz Comment #8 Reply to this comment
What I meant is: it's kind of unlikely that vanilla distributions 
are using pristine PHP releases. If the current version of Horde IMP 
requires a version of PHP that is so recent that even the most 
popular Linux distributions haven't included it yet, then maybe the 
Horde code is a little too aggressive in terms of code engine 
requirements.
Incorrect.  There has been plenty of this discussion on the mailing 
lists so I'm not going to rehash the whole thread here.  In short - 
PHP has a published API.  We work off the published API.  This is not 
being "aggressive".  This is a broken parser/interpreter.  There is no 
way of knowing these bugs exist unless you hit one.
08/25/2013 11:06:46 PM wolf (at) blazingangles (dot) com Comment #7 Reply to this comment
Why does that argument not apply here?  I'm using the latest version 
of all code and it works fine.  Of course that is relevant.
What I meant is: it's kind of unlikely that vanilla distributions are 
using pristine PHP releases. If the current version of Horde IMP 
requires a version of PHP that is so recent that even the most popular 
Linux distributions haven't included it yet, then maybe the Horde code 
is a little too aggressive in terms of code engine requirements.
08/25/2013 08:23:13 PM Michael Slusarz Comment #6 Reply to this comment
Several users appear to be affected and are able to solve the 
problem by reverting Horde_Mime to the previous version, so the 
"works on my machine" argument doesn't quite apply here.
Why does that argument not apply here?  I'm using the latest version 
of all code and it works fine.  Of course that is relevant.

Reverting Horde_Mime is irrelevant - reverting to 2.2.4 uses the old 
Net_SMTP library, which is the whole reason why the change was made 
(Net_SMTP is old, unmaintained, and causes segfaults in certain 
situations).  So that gives us no information on what the issue is in 
the new code.

The question is why certain people are seeing this and others aren't.   
Because plenty of people can send messages just fine with the new 
code.  Which highly suggests there is nothing wrong with the logic of 
the code - but that certain environments don't work properly for 
whatever reason (i.e. PHP bugs).
08/25/2013 08:09:24 PM ole (at) naturloven (dot) dk Comment #5 Reply to this comment
Messages send fine for me and all unit tests pass.
Several users appear to be affected and are able to solve the problem 
by reverting Horde_Mime to the previous version, so the "works on my 
machine" argument doesn't quite apply here. You mention old PHP 
versions. Ubuntu 13.04 currently installes PHP 5.4.9. Is this version 
of PHP too old?
08/25/2013 06:51:43 PM Michael Slusarz Comment #4 Reply to this comment
Somewhere in the recesses in my mind, thinking that there may be an 
issue with the need to rewind the stream before adding filters on old 
broken PHP versions (I'm running 5.4.17)

But if that's the case, that just brings up the whole "you really need 
to keep your PHP up-to-date people" that is getting old by this time.
08/25/2013 06:48:50 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit c7fc064a2a22176ab1ac078a5a6cf908299ce136
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Aug 25 12:48:12 2013 -0600

     Shot-in-the dark attempt to fix #12614

  framework/Smtp/lib/Horde/Smtp.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/c7fc064a2a22176ab1ac078a5a6cf908299ce136
08/25/2013 06:40:57 PM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Can't reproduce.  Messages send fine for me and all unit tests pass.   
Someone will need to identify where the issue is on their installation.
08/25/2013 04:05:23 AM skeller757 (at) gmx (dot) de Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ smtp-package: mails are sent without body
Type ⇒ Bug
Queue ⇒ Horde Framework Packages
Reply to this comment
Hi,

since I updated the horde_smtp package to Version 1.1.0 outgoing email 
will be sent without the body part.
Using the sendmail binary for sending mails works fine for me.

Stephan

Saved Queries