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 

Weird header error

 
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 Mar 25, 2005 9:16 pm    Post subject: Weird header error Reply with quote

I finally got Peffisaur to work on Mac Os X.

Turns out there is a bug in perl on mac which needs to be corrected before you can install DBI::Mysql and DBD::mysql properly (http://www.truerwords.net/articles/osx/install_dbd_mysql.html)

Now I can send emails with pictures attached to the peffisaur account and they get unpacked and stored in msgstore allright and the database entries look ok.

BUT (there is always a BUT isn't there):

When I send from my cellphone (Sony Ericsson k7001) I ge this error in recmail.log:

msisdn is and pwd is at recmail.pl line 188, <STDIN> line 18.

I've checked and doublechecked pwd and msisdn and they are okay.

By testing with cat I've found out that I can make things work if I change the headers in an MMS sent from my phone to my mailbox.

If I move this line down to the bottom of the headers: Content-Type: multipart/related; boundary="4244450c1b8aqwerty_0000"; type="multipart/alternative"

Things work - else I get the same msisdn is and pwd is at recmail.pl line 188, <STDIN> line 18.

I tried removing the STDIN check but the behaviour is the same - for some reason it seems recmail (or procmail or munpack?) is unable to grab the password if the Content-type is above the To: line.

What could be causing this and how could it be fixed?

Underneath you see the header that doesn't work and the one that does:

Doesn’t work:

Return-Path: <+45XXXXX2/TYPE=PLMN@mms.sonofon.dk>
Received: from appleton7.uni2.net (appleton7.uni2.net [129.142.244.22])
by ting.uni2.net (8.12.6/8.12.6) with ESMTP id j2PH6lrf005782
for <i31568@ting.uni2.net>; Fri, 25 Mar 2005 18:06:47 +0100
Received: from cph1snms2.mail.ascio.net (smtp3.mail.ascio.net [80.80.20.42])
by appleton7.uni2.net (8.12.11/SQL-8.12.11-8/8.12.11) with ESMTP id j2PH6goo012579
for <e-rik@inet.uni2.dk>; Fri, 25 Mar 2005 18:06:42 +0100
Received: from pcouxd23.pre-tel.net (unknown [194.242.50.99])
by cph1snms2.mail.ascio.net (Postfix) with ESMTP id 554E1EC99D
for <erik@flix.dk>; Fri, 25 Mar 2005 17:06:42 +0000 (GMT)
Received: from pcosod33.pre-tel.net (pcosod33.pre-tel.net [10.8.5.62])
by pcouxd23.pre-tel.net (8.9.3 (PHNE_18546)/8.9.3) with ESMTP id RAA25685
for <erik@flix.dk>; Fri, 25 Mar 2005 17:06:21 GMT
Received: from opwvsmtp ([10.8.5.62]) by pcosod33.pre-tel.net
(InterMail vM.6.01.03.02 201-2131-111-104-20040324) with SMTP
id <20050325170621.JZPX10960.pcosod33.pre-tel.net@opwvsmtp>
for <erik@flix.dk>; Fri, 25 Mar 2005 17:06:21 +0000
Date: Fri, 25 Mar 2005 17:06:20 GMT
From: +45XXXXX2@mms.sonofon.dk
MIME-Version: 1.0
Content-Type: multipart/related; boundary="4244450c1b8aqwerty_0000"; type="multipart/alternative"
Sender: +45XXXXX2@mms.sonofon.dk
Subject: Billede(1)
To: p-feb16845@eriklarsen.dynu.com
X-Priority: 3
Message-Id: <20050325170621.JZPX10960.pcosod33.pre-tel.net@opwvsmtp>
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=3.378,
required 5, AWL -1.03, HTML_IMAGE_ONLY_04 3.30, HTML_MESSAGE 0.00,
HTML_SHORT_CENTER 0.00, NO_REAL_NAME 0.01, PRIORITY_NO_NAME 1.10)
X-UNI2-MailScanner-SpamScore: sss

This is a multi-part message in MIME format.

Works:



Return-Path: <+45XXXXX2/TYPE=PLMN@mms.sonofon.dk>
Received: from appleton7.uni2.net (appleton7.uni2.net [129.142.244.22])
by ting.uni2.net (8.12.6/8.12.6) with ESMTP id j2PH6lrf005782
for <i31568@ting.uni2.net>; Fri, 25 Mar 2005 18:06:47 +0100
Received: from cph1snms2.mail.ascio.net (smtp3.mail.ascio.net [80.80.20.42])
by appleton7.uni2.net (8.12.11/SQL-8.12.11-8/8.12.11) with ESMTP id j2PH6goo012579
for <e-rik@inet.uni2.dk>; Fri, 25 Mar 2005 18:06:42 +0100
Received: from pcouxd23.pre-tel.net (unknown [194.242.50.99])
by cph1snms2.mail.ascio.net (Postfix) with ESMTP id 554E1EC99D
for <erik@flix.dk>; Fri, 25 Mar 2005 17:06:42 +0000 (GMT)
Received: from pcosod33.pre-tel.net (pcosod33.pre-tel.net [10.8.5.62])
by pcouxd23.pre-tel.net (8.9.3 (PHNE_18546)/8.9.3) with ESMTP id RAA25685
for <erik@flix.dk>; Fri, 25 Mar 2005 17:06:21 GMT
Received: from opwvsmtp ([10.8.5.62]) by pcosod33.pre-tel.net
(InterMail vM.6.01.03.02 201-2131-111-104-20040324) with SMTP
id <20050325170621.JZPX10960.pcosod33.pre-tel.net@opwvsmtp>
for <erik@flix.dk>; Fri, 25 Mar 2005 17:06:21 +0000
Date: Fri, 25 Mar 2005 17:06:20 GMT
From: +45XXXXX2@mms.sonofon.dk
MIME-Version: 1.0
Sender: +45XXXXX2@mms.sonofon.dk
Subject: Billede(1)
To: p-feb16845@eriklarsen.dynu.com
X-Priority: 3
Message-Id: <20050325170621.JZPX10960.pcosod33.pre-tel.net@opwvsmtp>
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=3.378,
required 5, AWL -1.03, HTML_IMAGE_ONLY_04 3.30, HTML_MESSAGE 0.00,
HTML_SHORT_CENTER 0.00, NO_REAL_NAME 0.01, PRIORITY_NO_NAME 1.10)
X-UNI2-MailScanner-SpamScore: sss

This is a multi-part message in MIME format.

Content-Type: multipart/related; boundary="4244450c1b8aqwerty_0000"; type="multipart/alternative"
Back to top
View user's profile Send private message
Flix



Joined: 19 Mar 2005
Posts: 3

PostPosted: Sat Mar 26, 2005 12:39 am    Post subject: Problem solved Reply with quote

A friend of mine fixed the code - it should be:

$stuff = 0 ;
while ( $line = <STDIN> )
{
@tmp = split( ": ", $line );

if ( lc($tmp[0]) eq "to" )
{
chop( $tmp[1] );
$to = $tmp[1];
$stuff = $stuff+1;
}
elsif ( lc($tmp[0]) eq 'from' )
{
chop( $tmp[1] );
$from = $tmp[1];
$stuff = $stuff+1; }
elsif ( lc($tmp[0]) eq 'subject' )
{
chop( $tmp[1] );
$subject = $tmp[1];
$stuff = $stuff+1;
}
if( 3 eq $stuff )
{
last;
}
}

This way recmail works even if content-type is above to, from & subject.
Back to top
View user's profile Send private message
Peffis
Site Admin


Joined: 09 Sep 2003
Posts: 324
Location: Sweden

PostPosted: Tue Mar 29, 2005 3:26 pm    Post subject: Reply with quote

Oh cool! Thanks for the information. I've not seen this error myself actually and I've been running it since 2003 with several users. But perhaps I've just been lucky. The email encoding is up to the operator's MMC so it can definitely vary quite a lot. The most rediculous things are when they make bloated HTML-messages out of them with lots of operator logos inside. Vodafone is one of them. In my installation I've added a blacklist of certain filenames that are removed each time before adding them to the database.
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