FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » HTML stripped from posted email
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
HTML stripped from posted email [message #28948] Mon, 21 November 2005 07:03 Go to next message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
I've probably made a configuration error, but I can't see one...

Fedora Core 4, with FUDforum 2.7.3 just installed. Apache 2.0.54, MySql 4.1.14, postfix 2.2.2

I've set up a simple alias 'post(at)domain(dot)com' that does:
post: "|/var/www/FUDforum/scripts/maillist.php 1"

The email is posted correctly, in the right forum. But it's been converted to plain text. Or possibly maillist.php prefers the plain text part over the HTML part of the email, despite 'Accept HTML emails' being enabled.

BTW, I understand that accepting HTML email has its risks, but this forum & mail sources won't be visible to the public, and most of the emails will be generated from RSS feeds using 'newspipe'.
Re: HTML stripped from posted email [message #28962 is a reply to message #28948] Tue, 22 November 2005 02:00 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Try this patch, I suspect it will do the trick
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7440


FUDforum Core Developer
Re: HTML stripped from posted email [message #28966 is a reply to message #28962] Tue, 22 November 2005 03:03 Go to previous messageGo to next message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
Yes, that's a big improvement. Thanks, Ilia.

I'm still not getting pictures through, though. When I look at the source for the generated page, the 'img' tag's attributes are correct except for the 'src' attribute, which seems to be a couple of large hex numbers, not a URL at all. For example:

<P><IMG height=74 alt="Xbox 360 Fanboy" hspace=4 
src="8b6732ae5268edd673d40c0f936389b2.811512381588292" width=425 align=top 
vspace=4 border=1> </P>


Could this be caused by a reference to an image embedded as another MIME part in the email?

Paul
Re: HTML stripped from posted email [message #28967 is a reply to message #28966] Tue, 22 November 2005 03:12 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I cannot say for certain without seeing the full text of the message, but I suspect your assumption about those being mime references are correct. Although usually they are in the cid:identifier form.

FUDforum Core Developer
Re: HTML stripped from posted email [message #28970 is a reply to message #28967] Tue, 22 November 2005 03:23 Go to previous messageGo to next message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
Here's the email. It is an inline JPEG part.
  • Attachment: testmail.txt
    (Size: 39.58KB, Downloaded 1269 times)
Re: HTML stripped from posted email [message #28981 is a reply to message #28970] Tue, 22 November 2005 21:29 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I wrote a patch that adds handling for inlined attachments, you can find it here:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=7443


FUDforum Core Developer
Re: HTML stripped from posted email [message #28988 is a reply to message #28981] Wed, 23 November 2005 08:20 Go to previous messageGo to next message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
Thanks Ilia - that's a very useful patch, an unexpected bonus!

It seems to work well. I did a few tests and only found one quirk - an attached email was dropped (I forwarded a bounce message, out of curiosity). Not that useful in the real world anyhow.

It doesn't help with fixing up references to inline 'image/jpeg' parts though. Is that something you'll be able to address?

We're looking at using FUDforum as an archive for RSS feeds, being fed by newspipe (http://newspipe.sourceforge.net/) with the added benefit of being able to discuss news items within the team, and have those discussions cross-posted to internal mailing lists. Not getting the images through from the original RSS article would be a show-stopper for us.

I'd been looking at mashing up something with INN, but FUDforum seems like a much better fit for our needs.
Re: HTML stripped from posted email [message #28993 is a reply to message #28988] Thu, 24 November 2005 00:40 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
PaulC wrote on Wed, 23 November 2005 03:20


It doesn't help with fixing up references to inline 'image/jpeg' parts though. Is that something you'll be able to address?



Do you have attachment support enabled? I tried you sample e-mail on my development machine and the embed xbox image was showing up properly inside the message.


FUDforum Core Developer
Re: HTML stripped from posted email [message #29000 is a reply to message #28993] Thu, 24 November 2005 05:23 Go to previous messageGo to next message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
Hmmm... if I do it manually as root, i.e.
$ /var/www/FUDforum/script/maillist.php 1 < ~/testmail.txt

then I do get inline images. If I forward the same email using Outlook, which is being delivered to the same script via Postfix, the topic's images are broken.

So it looks like my problem is related to which user the script is executing as, or some similar permissions issue. I need to dig a little further to understand the details.

BTW, the 'testmail.txt' file was pulled directly from an IMAP maildir, so should be a good match for what Postfix is feeding into stdin.
Re: HTML stripped from posted email [message #29004 is a reply to message #29000] Thu, 24 November 2005 16:26 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
To add an attachment the user running the script must have the permission to create new files inside files/ and the tmp/ directories. If it does not, then attachments will not be imported.

FUDforum Core Developer
Re: HTML stripped from posted email [message #29006 is a reply to message #29004] Thu, 24 November 2005 16:52 Go to previous messageGo to next message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
Hmm... both are chmod 777 currently, so don't think that's the issue.
Re: HTML stripped from posted email [message #29008 is a reply to message #29006] Thu, 24 November 2005 16:59 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, all I can tell you that it works perfectly on my system here... so it is not a forum bug. If it works with one user account and not another it has to be a permissions issue somewhere down the line.

FUDforum Core Developer
Re: HTML stripped from posted email [message #29025 is a reply to message #29008] Fri, 25 November 2005 07:08 Go to previous message
PaulC is currently offline  PaulC   United States
Messages: 13
Registered: November 2005
Location: Silicon Valley
Karma: 0
Junior Member
Yes, I agree, it looks like a permissions issue, not a forum bug. It works fine for me from the command line. I haven't had time to diagnose what's up with Postfix delivery (it's Thanksgiving in the US).

I really appreciated the suggestion on a good place to look, I was just letting you know I'd checked, and that wasn't it.

Paul
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 'Locking' files from admin panel causes issues
Next Topic: CVS directories strewn about randomly - can I delete them?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 21 11:46:07 GMT 2024

Total time taken to generate the page: 0.02569 seconds