Make WordPress Core

Opened 17 years ago

Closed 9 years ago

#4337 closed defect (bug) (wontfix)

Blog by Email: No content is assumed

Reported by: jottlieb's profile jottlieb Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.2
Component: Mail Keywords:
Focuses: Cc:

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 (3)

class-pop3.php.patch (896 bytes) - added by cfactor 17 years ago.
This version adds to the trailing period function to strip all leading periods added by the POP3 server.
4337.diff (618 bytes) - added by Nazgul 17 years ago.
4337.2.diff (13.1 KB) - added by westi 17 years ago.
Diff to update to current class-pop3.php from squirrelmail

Download all attachments as: .zip

Change History (42)

#1 @rob1n
17 years ago

  • Milestone set to 2.4

#2 @cfactor
17 years ago

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.

@cfactor
17 years ago

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

#3 follow-ups: @cfactor
17 years ago

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.

#4 @cfactor
17 years ago

  • Cc cfactor added

#5 @drmike
17 years ago

  • Keywords has-patch added; blog by email removed

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

#6 @dmd
17 years ago

  • Cc rob1n added
  • 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.

#7 @dmd
17 years ago

  • Milestone changed from 2.3 (trunk) to 2.2.2

#8 @dmd
17 years ago

  • 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.

#9 in reply to: ↑ 3 @Nazgul
17 years ago

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.

#10 @Nazgul
17 years ago

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.

@Nazgul
17 years ago

#11 @Nazgul
17 years ago

Cleaner patch.

#12 @foolswisdom
17 years ago

  • Milestone changed from 2.2.2 to 2.2.3

#13 in reply to: ↑ 3 @sfmobius
17 years ago

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.

#14 follow-up: @cfactor
17 years ago

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.

#15 @foolswisdom
17 years ago

  • Milestone changed from 2.2.3 to 2.3

#16 @westi
17 years ago

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

@westi
17 years ago

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

#17 in reply to: ↑ 14 ; follow-up: @shadowdad
17 years ago

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@…) i will be happy to test and report back

#18 in reply to: ↑ 17 @cfactor
17 years ago

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@…) 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.

#19 @ryan
17 years ago

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

#20 @ryan
17 years ago

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

#21 @Nazgul
17 years ago

Closed #4318 as a duplicate of this one.

#22 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Haven't heard anything. Assuming fixed.

#23 @hawkwing3141
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

#24 @lloydbudd
17 years ago

  • Milestone changed from 2.3 to 2.6

#25 @lozzd
16 years ago

  • Cc lozzd added
  • 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?

#26 @westi
16 years ago

  • Keywords has-patch removed
  • 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.

#27 @Denis-de-Bernardy
15 years ago

is this still current?

#28 @Denis-de-Bernardy
15 years ago

  • Component changed from General to Mail

#29 @hakre
15 years ago

  • Keywords reporter-feedback added

Do we have a testcase for this? Can the reporter please confirm that this is still current? Are there others doing mail blogging?

#30 @dd32
15 years ago

I'd assume its still current, nothing has changed around here.

Test case: Send an email to WordPress through as many mail servers as you can until you find one that fails.

Include a full email (including headers) received by WordPress which fails. Until that happens, Its going to be hit-and-miss sorting it out.

#31 @westi
15 years ago

  • Component changed from Mail to Blog by Email
  • Status changed from reopened to accepted

Moving all blog-by-email bugs to a seperate component and out of 2.9.

This will all be address by a new canonical blog-by-email plugin which is under development and will hopefully be available by the time 2.9 is released.

#32 @westi
15 years ago

  • Milestone changed from 2.9 to Future Release

#33 follow-up: @RyanMurphy
14 years ago

Since blog-by-email is/has moved to a plugin, and since there hasn't been anything on here for 11 months, should the ticket be wontfix'd?

#34 in reply to: ↑ 33 @westi
14 years ago

Replying to RyanMurphy:

Since blog-by-email is/has moved to a plugin, and since there hasn't been anything on here for 11 months, should the ticket be wontfix'd?

Once the plugin is released and we have confirmed this bug is resolved the ticket will be closed.

#35 @BjornW
13 years ago

In version 3.2 'Post via email' is still part of WordPress I presume this is still an issue? Or are there still plans to develop a canonical blog-by-email plugin? Would be great if someone could tell more about this.

#36 @wonderboymusic
12 years ago

  • Keywords reporter-feedback removed

Any takers / closers?

#37 @codebykat
11 years ago

Confirmed that this functionality is being moved to a standalone plugin, which is currently under active development (it's my summer project). I'll update and close this ticket once the initial version is done. I have also verified the bug reported here and will make sure it gets fixed. :)

#38 @nacin
11 years ago

  • Component changed from Blog by Email to Mail

#39 @chriscct7
9 years ago

  • Milestone Future Release deleted
  • Priority changed from high to normal
  • Resolution set to wontfix
  • Severity changed from major to normal
  • Status changed from accepted to closed

This feature is getting removed by #22942. Closing as wontfix

Note: See TracTickets for help on using tickets.