Ticket #4337 (reopened defect)

Opened 1 year ago

Last modified 3 weeks ago

Blog by Email: No content is assumed

Reported by: jottlieb Assigned to: westi
Priority: high Milestone: 2.9
Component: General Version: 2.2
Severity: major Keywords:
Cc: cfactor, rob1n, lozzd

Description

It seems, the Blog by Email functions is broken in WP 2.2. Mails are recognized, but only the title/subject is assumed - no content. Content is empty :( No matter if text email or html email.

Author = bla@example.org 
 
Content-type: text/plain, Content-Transfer-Encoding: 8bit, boundary: 
 
Raw content:
 
Author: 1
 
Posted title: Test
Posted content:
 
Mission complete, message 1 deleted.

Attachments

class-pop3.php.patch (0.9 kB) - added by cfactor on 06/15/07 08:39:42.
This version adds to the trailing period function to strip all leading periods added by the POP3 server.
4337.diff (0.6 kB) - added by Nazgul on 07/21/07 15:49:43.
4337.2.diff (13.1 kB) - added by westi on 08/31/07 20:44:24.
Diff to update to current class-pop3.php from squirrelmail

Change History

05/25/07 19:06:55 changed by rob1n

  • milestone set to 2.4.

06/15/07 07:52:56 changed by cfactor

jottlieb: I ran into this myself when I was setting up email blogging. I'm using dovecot as my pop3 server, if that could mean anything. I'm attaching a patch that solves it for me. I have not tested it with other POP3 servers can test it, it would be great.

The first change is what really fixes the problem. For some reason the blank line between the headers and the body was matching the original /\s+/, so I changed it to /\s+\S+/ so it can be used to only match the overrun header lines.

The second change is for something different. Since the $line doesn't get called until after the while check is done, by the time the message ending period hits the while check, it had already been added by the previous iteration. I tried adding the fgets line before the while loop and moving the existing one to after the current line is added to existing MsgArray?, but for some reason, this times out. And yet, the script does exactly what I tried in function uidl (though it appears that wordpress never calls it.) So I just added the check where it checks for end of buffer.

06/15/07 08:39:42 changed by cfactor

  • attachment class-pop3.php.patch added.

This version adds to the trailing period function to strip all leading periods added by the POP3 server.

(follow-ups: ↓ 9 ↓ 13 ) 06/15/07 08:50:11 changed by cfactor

I'm guessing no one saw the original patch, but I updated my patch to strip the extra periods added by the POP3 server according to RFC 1939.

06/15/07 09:10:53 changed by cfactor

  • cc set to cfactor.

06/21/07 12:30:34 changed by drmike

  • keywords changed from blog by email to has-patch.

Maybe adding in 'has-patch' will get someone's attention. ;)

06/24/07 18:13:19 changed by dmd

  • cc changed from cfactor to cfactor, rob1n.
  • milestone changed from 2.4 (future) to 2.3 (trunk).

This patch fixes the problem. This should be incorporated into 2.2.2 rather than waiting for 2.4.

This patch:

makes core functionality that used to work and is now broken start working again

and, importantly, can have NO possible effect on any other part of WordPress.

06/24/07 18:13:31 changed by dmd

  • milestone changed from 2.3 (trunk) to 2.2.2.

06/24/07 18:18:52 changed by dmd

  • priority changed from normal to high.
  • severity changed from normal to major.

Considering this bug causes posts to be thrown out by WordPress - user's data is irretrievably lost - I'm upping the priority/severity.

(in reply to: ↑ 3 ) 07/21/07 15:21:03 changed by Nazgul

Replying to cfactor:

I'm guessing no one saw the original patch, but I updated my patch to strip the extra periods added by the POP3 server according to RFC 1939.

This is also fixed upstream, but in a different way: http://squirrelmail.svn.sourceforge.net/viewvc/squirrelmail/branches/SM-1_4-STABLE/squirrelmail/plugins/mail_fetch/class.POP3.php?r1=12391&r2=12426

As for the other part. It should be reported upstream, so they can fix it at their end as well.

07/21/07 15:29:47 changed by Nazgul

Scratch my remark about it being fixed upstream. That fix was for a similar issue in another part of the code. Their fix seems cleaner though, by not using ereg's.

07/21/07 15:49:43 changed by Nazgul

  • attachment 4337.diff added.

07/21/07 15:50:04 changed by Nazgul

Cleaner patch.

08/09/07 19:17:58 changed by foolswisdom

  • milestone changed from 2.2.2 to 2.2.3.

(in reply to: ↑ 3 ) 08/13/07 05:59:45 changed by sfmobius

Replying to cfactor:

I couldn't get either attached patch to function correctly w/v2.2. I did find a work around that works beautifully for those who aren't as technically minded. Use the "Postie" plug-in and then add

<iframe src="http://www.yoursite.com/blogdir/wp-content/plugins/postie/get_mail.php" name="mailiframe" width="0" height="0" frameborder="0" scrolling="no" title=""></iframe>

to your footer. It causes the postie mail.php file to run every time you get a visitor to your blog. Unless you need instant posting, it is a great work around in my humble opinion.

(follow-up: ↓ 17 ) 08/17/07 18:38:55 changed by cfactor

Sorry for being out of touch. My mail server this account was sending mail to had a catastrophic hardware failure that caused it to go foom, and I've been too busy to fix it. Change the email setting to point to a webmail account for now.

Nazgul: your patch method of handling period is definitely cleaner and smarter, but it will add an extra blank line to the body of the message where the end of body period was, as that line would become "\r\n" and will not break on the empty($line) check. It probably won't matter to most people, but it's also not "proper."

sfmobius: I'd like to hear more about what happened when you tried either of our patches. When I was first setting up post-by-email, I thought about using Postie instead, but decided that I wanted to keep the installation simple and didn't want to add extra plugins I won't use. So yes, from what I've heard, Postie works well for a lot of people and is certainly more feature-rich. This fix is for those who want to stick with basic WordPress.

08/29/07 17:45:46 changed by foolswisdom

  • milestone changed from 2.2.3 to 2.3.

08/31/07 20:43:22 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

08/31/07 20:44:24 changed by westi

  • attachment 4337.2.diff added.

Diff to update to current class-pop3.php from squirrelmail

(in reply to: ↑ 14 ; follow-up: ↓ 18 ) 09/01/07 15:15:51 changed by shadowdad

Replying to cfactor:

Sorry for being out of touch. My mail server this account was sending mail to had a catastrophic hardware failure that caused it to go foom, and I've been too busy to fix it. Change the email setting to point to a webmail account for now. Nazgul: your patch method of handling period is definitely cleaner and smarter, but it will add an extra blank line to the body of the message where the end of body period was, as that line would become "\r\n" and will not break on the empty($line) check. It probably won't matter to most people, but it's also not "proper." sfmobius: I'd like to hear more about what happened when you tried either of our patches. When I was first setting up post-by-email, I thought about using Postie instead, but decided that I wanted to keep the installation simple and didn't want to add extra plugins I won't use. So yes, from what I've heard, Postie works well for a lot of people and is certainly more feature-rich. This fix is for those who want to stick with basic WordPress.

cfactor: followed here from your post on 4318. i am happy to reverify this fix. i have just been swapping in and out the wp-mail.php files to get post-by-mail to function. so i don't screw it up, if you could send a detailed list of how and where to apply patch (rob.shurtleff@gmail.com) i will be happy to test and report back

(in reply to: ↑ 17 ) 09/04/07 21:47:38 changed by cfactor

Replying to shadowdad:

cfactor: followed here from your post on 4318. i am happy to reverify this fix. i have just been swapping in and out the wp-mail.php files to get post-by-mail to function. so i don't screw it up, if you could send a detailed list of how and where to apply patch (rob.shurtleff@gmail.com) i will be happy to test and report back

I don't have a working install right now to test, but here's what you do:

Download *one* of the files above in Attachments. (you'll want to click on the link to the file and then click on the "Original Format" link at the bottom of the page.) The first one is the one I tested and "works-for-me." I see no reason 4337.diff will break anything more than what is already broken, and aside from the extra line issue, I don't see any reason not to use that over mine. But I have not tested it. I have not had a chance to read through or test 4337.2.diff.

Then assuming you have shell access to a unix-based system, cd into the wp-includes directory of the wordpress install, and run "patch --dry-run -P1 < patchfile" Replace "patchfile" with location and filename of the patch you downloaded. This will test the patch to see if it'll apply cleanly to your installation. If it you see no errors, run it again with out the "--dry-run" to actually apply the patch, and you're done.

09/05/07 22:55:38 changed by ryan

(In [6044]) Update pop3 class to latest from squirrelmail. Props westi. see #4337

09/05/07 22:57:02 changed by ryan

I committed the upstream updates to the pop3 class. Does that help this issue?

09/07/07 12:10:01 changed by Nazgul

Closed #4318 as a duplicate of this one.

09/20/07 18:40:44 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

Haven't heard anything. Assuming fixed.

03/03/08 08:21:27 changed by hawkwing3141

  • status changed from closed to reopened.
  • resolution deleted.

I don't know if I should open a new ticket but this problem is back, see

http://wordpress.org/support/topic/152039?replies=3

I have verified exactly the same problem as the poster in WP 2.3.3

03/03/08 16:34:31 changed by lloydbudd

  • milestone changed from 2.3 to 2.6.

07/30/08 17:05:06 changed by lozzd

  • cc changed from cfactor, rob1n to cfactor, rob1n, lozzd.
  • milestone changed from 2.9 to 2.6.1.

Upgraded to 2.6 and this is still happening from my Blackberry. Am using Postie for now, but any ideas when this will be fixed?

08/16/08 20:52:51 changed by westi

  • keywords deleted.
  • milestone changed from 2.6.1 to 2.9.

2.6.1 has been released, moving to 2.9 milestone.

Post-by-email needs a fair chunk of work.