hellkvist.org Forum Index hellkvist.org
Discussions about the free software on hellkvist.org
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MMS from Siemens phone wrongly unpacked

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    hellkvist.org Forum Index -> Peffisaur
View previous topic :: View next topic  
Author Message
Flix



Joined: 19 Mar 2005
Posts: 3

PostPosted: Fri Apr 08, 2005 2:48 pm    Post subject: MMS from Siemens phone wrongly unpacked Reply with quote

First, thanks for sharing this great piece of software. I run Denmarks first open source newspaper on the web (all content delivered by the readers) called flix.dk, and I think there is a huge potential for photo-reporting from citizens.

I made an iframe block for showing the latest Peffisaur submissions on the frontpage of flix.dk and it's working fine.

However, one user has a Siemens SX1 and when he sends an MMS it is received and put in a folder in msgstore but doesn't show correctly on the site.

In the msgstore I find:

info.txt
containing:
part1 (image/jpeg)
EmailFooter.txt (application/octet-stream)

On Peffisaur there's a broken image and a note saying "click this link to view image"

The picture is on the server ok, I just need to add .jpg to make it show.

It is probably some problem with the headers but I can't make out what it is - any ideas?

Here is a copy of the MMS-source when the Siemens SX1 sends to my normal email address:


Return-Path: <9cb15542014e4b7fgh7b80000f4abb6a648c8c6c739c82b8606901c3f0c1c680e705f1d130876325f@mms.tdcmobil.dk>
Received: from appleton4.uni2.net (appleton4.uni2.net [129.142.244.16])
by ting.uni2.net (8.12.6/8.12.6) with ESMTP id j37MLXrf017928
for <erik@ting.uni2.net>; Fri, 8 Apr 2005 00:21:33 +0200
Received: from cph1snms2.mail.ascio.net (smtp1.mail.ascio.net [80.80.20.42])
by appleton4.uni2.net (8.12.11/SQL-8.12.11-8/8.12.11) with ESMTP id j37MLTA4001138
for <erik@inet.uni2.dk>; Fri, 8 Apr 2005 00:21:29 +0200
Received: from smtpsrv40.tdc.dk (smtpsrv40.tdc.dk [192.66.25.156])
by cph1snms2.mail.ascio.net (Postfix) with ESMTP id D0402EC311
for <erik@flix.dk>; Thu, 7 Apr 2005 22:21:28 +0000 (GMT)
Received: from conbr140.tdk.dk ([10.106.95.34]) by smtpsrv40.tdc.dk with Microsoft SMTPSVC(5.0.2195.6922);
Fri, 8 Apr 2005 00:45:31 +0200
Received: from mms.tdcmobil.dk ([192.168.241.121]) by conbr140.tdk.dk with InterScan Messaging Security Suite; Fri, 08 Apr 2005 00:21:27 +0200
Received: (qmail 27283 invoked from network); 7 Apr 2005 22:18:04 -0000
Received: from tgw01.tdctech.dk (HELO tgw01) (192.168.241.117)
by mms.tdcmobil.dk with SMTP; 7 Apr 2005 22:18:04 -0000
Message-ID: <1389875.1112912486921.JavaMail.wluser@tgw01>
Date: Fri, 8 Apr 2005 00:21:26 +0200 (CEST)
From: 45123123 <9cb15542014e4b7fb7bgd000f4abb6a648c8c6c739c82b8606901c3f0c1c680e705f1d130876325f@mms.tdcmobil.dk>
To: e-rik@flix.dk
Subject: Multimedia message
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_450940_8109291.1112912486920"
X-Mms-MMS-Version: 16
X-Mms-Priority: 1
X-Mms-Delivery-Report: 1
X-Nokia-Ag-Version: 2.0
X-Mms-Message-Class: 0
X-Mms-Message-Type: 0
X-Mms-Transaction-ID: 3913705009
X-Mms-Read-Reply: 1
X-Mms-Expiry: RELATIVE: 134672
X-OriginalArrivalTime: 07 Apr 2005 22:45:31.0546 (UTC) FILETIME=[80CC47A0:01C53BC3]
X-UNI2-MailScanner-Information: See www.mailscanner.info for information
X-UNI2-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details
X-UNI2-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.299,
required 5, BAYES_00 -2.60, FROM_STARTS_WITH_NUMS 0.30)

------=_Part_450940_8109291.1112912486920
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Location: Rent_a_w.jpg
Content-Disposition: inline

/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8

--GARBLE--

GmGEjoxqwSMcioyRTAqsk3ZxTf34q1jPfFIwA96BFYyTDqhxT
WuCOqn8qtHkdKYVHoPyosrBqAP/Z
------=_Part_450940_8109291.1112912486920
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
Content-Location: Dette_bi.txt
Content-Disposition: inline

RGV0dGUgYmlsbGVkZSBlciBmcmEgaSBzb21tZXJzIHDDpSBIQyBBbmRlcnNlbnMgQm91bGV2YXJk
LiBEZXIgc3TDpXIgIlJlbnQtYS1XcmVjayIgcMOlIGJpbGVu
------=_Part_450940_8109291.1112912486920
MIME-Version: 1.0
Content-Type: application/octet-stream; name="EmailFooter.txt"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Vigtig info.txt"

RHUgaGFyIGblZXQgZW4gQmlsbGVkYmVza2VkIHNlbmR0IHRpbCBkaWcgc29tIGUtbWFpbCBm
cmEgZW4gbW9iaWx0ZWxlZm9uLiANCg0KRHUgaGFyIG51IG11bGlnaGVkIGZvciBhdCBzdmFy
ZSwgb2cgbW9kdGFnZXJlbiB2aWwgZuUgZGl0IHN2YXIgc29tIGVuIEJpbGxlZGJlc2tlZCBw
5SBzaW4gbW9iaWx0ZWxlZm9uLg0KDQoNCkJlbeZyazoNCi0JRHUga2FuIGt1biBiZXN2YXJl
IGVuIGUtbWFpbCBzZW5kdCBmcmEgZW4gbW9iaWx0ZWxlZm9uIOluIGdhbmcuIA0KLQlEdSBr
YW4gdmVkaOZmdGUgZmxlcmUgZm9yc2tlbGxpZ2UgdHlwZXIgYWYgZmlsZXIgc29tIGYuZWtz
LiAuanBnLCAud2F2IG9nIC5naWYuIA0KLQlEaW4gc3Zhcm1haWwgbeUgaWtrZSBvdmVyc3Rp
Z2UgMTAwIEtieXRlLiANCi0JRHUga2FuIHN2YXJlIGluZGVuIDE0IGRhZ2UgZnJhIG1vZHRh
Z2Vsc2UgYWYgZGVubmUgZS1tYWlsLiAgDQoNCkdvZCBmb3Ju+GplbHNlIQ0KDQo=


------=_Part_450940_8109291.1112912486920--
Back to top
View user's profile Send private message
Peffis
Site Admin


Joined: 09 Sep 2003
Posts: 324
Location: Sweden

PostPosted: Sat Apr 09, 2005 11:38 am    Post subject: Reply with quote

Yes, many phones unfortunately don't put an extension on the image filenames when they send it off as emails. For instance, if I take an image with my K700i and send it immediately as an MMS it will get the extension .jpg and a proper filename but if I store it in the phone and later send it as an email it will get no extension at all - in fact, the phone will not put any name on the attachment in the email at all.

Unfortunately the receiving email script is not so advanced to be able to handle this which means that the file will be put on the server without extension and the web server will not know what content type to put on it later when it is accessed - thus it will appear broken on the page. One fix would be to implement something similar as in send.php where an extension is created and added from the content type field but this has not been done. The recmail.pl should really be rewritten in total as it's really a simple hack and not really a good implementation. But there is no time for it at the moment.
Back to top
View user's profile Send private message Visit poster's website
Peffis
Site Admin


Joined: 09 Sep 2003
Posts: 324
Location: Sweden

PostPosted: Sat Apr 09, 2005 11:49 am    Post subject: Reply with quote

...and even if the phone does send the file name it can still be the recmail.pl that is not handling it right I'm afraid. It relies on the munpack tool and I don't know if that's really so good all the time. A rewrite would be in order as I said. I did some tests before, rewriting it in PHP and that works pretty well actually. Some day I'll release that but I don't have time to work on anything like this at the moment.
Back to top
View user's profile Send private message Visit poster's website
Peffis
Site Admin


Joined: 09 Sep 2003
Posts: 324
Location: Sweden

PostPosted: Sat Apr 09, 2005 11:57 am    Post subject: Reply with quote

...AND (lots of 'ands' today)...usually the browsers are a bit smart when they don't get the correct content type from the web server. For instance, I've seen that having a filename without extension as the src of an image tag (<img src="part1">) works as I suppose the browser makes some image format detection in that context, but a direct link to part1 will not work as it has no context then.

Take a look for instance at the message here: http://peffis.com/message.php?mid=3634

It has part1 as filename but the browser can still display it because it's within the <img> context.
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Tue Apr 12, 2005 11:55 pm    Post subject: Reply with quote

hm... Confused
Back to top
NokiaGuy



Joined: 18 Nov 2005
Posts: 7

PostPosted: Wed Nov 23, 2005 6:38 pm    Post subject: Reply with quote

I'm receiving a similar kind of problem.

I can email to my Peffisaur from Outlook/Thunderbid/Squirrel. I create an email, put in my p-xxxxxx@mydomain.com and send. It works great. However, whenever I try to send from my mobile phone (Nokia 6600), all that appears is the subject line. This happens on my site and on peffis.com as well Confused

This also happens on my friends Samsung D500, my brothers Sony Ericsson K750i & my wifes Nokia 7600.

I have tried many things, but don't feel I have enough experience to start playing around with too much of the software because I don't want to break the bit that already works!

Stefan, if you ever find the time to work on this & can post the code, that would be fantastic! Do you have a paypal donation we can contribute to??? Wink
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    hellkvist.org Forum Index -> Peffisaur All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group