Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

import-email: a bug?

 [1/6] from: mario::cassani::icl::com at: 17-Oct-2001 14:09


Hi all, experimenting mail filters and talking to Phil Bevan some problems with email headers faced us: 1) Missing colon
> I had a problem when writting my email client sometimes the > incoming message started
<<quoted lines omitted: 3>>
> (ie no colon ...) > which caused import-mail to fail.
2) Huge "To:" or "Cc:" fields
> Havent had any problems with multiple recipients though ....
3) Splitted lines
> looks like import email doesnt like the first line which has been split up
with = signs.
> Received: from x400.icl.co.uk (umg1.x400.icl.co.uk [145.227.248.89]) by > wwmessd045.man23.icl.local with SMTP (Microsoft Exchange Internet Mail > Service Version 5.5.2653.13) > > If the equals signs are removed then import-email will work.
I want to report it via feedback but the proxy still isolates me, so I hope someone at RT (Holger, Jeff, Carl!?) takes a look here. Has anyone out there a patch/rewrote of import-email or some hint to handle strange headers? No parse-ability, here... :( 8<----------------------------------------------------------
>> ? import-email
USAGE: IMPORT-EMAIL data DESCRIPTION: Constructs an email object from an email message. IMPORT-EMAIL is a function value. ARGUMENTS: data -- The email message (Type: string)
>> source import-email
import-email: func [ "Constructs an email object from an email message." data [string!] "The email message" /local content ][ data: parse-header system/standard/email copy/part data content: any [find/tail data "^/^/" tail data] data/date: parse-header-date data/date data/from: parse-email-addrs data/from data/to: parse-email-addrs data/to data/reply-to: parse-email-addrs data/reply-to data/content: content data ]
>>
---------------------------------------------------------->8 In import-email I really miss something to import "real names" from addresses, like: [...] From: "Gino Pilotino" <[gino--pilotino--it]> [...] msgheader/from-real == "Gino Pilotino" actually "only": msgheader/from == [gino--pilotino--it] Xie-xie Ni-men Mario Cassani

 [2/6] from: ingo:2b1 at: 17-Oct-2001 17:29


Hi Mario, Once upon a time Cassani Mario spoketh thus:
> Hi all, > experimenting mail filters and talking to Phil Bevan > some problems with email headers faced us:
<...>
> In import-email I really miss something to import "real names" > from addresses, like:
<<quoted lines omitted: 6>>
> msgheader/from > == [gino--pilotino--it]
There are some patches to import email avaible, which at least handle this problem (I don't know about the other problems you mentioned, would have to try ...). One of them can be downloaded at: http://www.h-o-h.org/patches.r (but you'll have to dig into the file to find it). I don't know about the others, sorry.

 [3/6] from: g:santilli:tiscalinet:it at: 18-Oct-2001 12:01


Cassani Mario wrote:
> 1) Missing colon
This is actually a strange behaviour of some mail servers. That line is part of the file format of the unix mail spool file, and should not reported to you by the mail server. However, they seem to report it sometimes... The patch is easy, anyway.
> 2) Huge "To:" or "Cc:" fields
I have this working with a non-recursive PARSE rule.
> 3) Splitted lines > > looks like import email doesnt like the first line which has been split up > with = signs.
They should not be splitted up by an = sign!! The header cannot be encoded with quoted-printable... The conformant way of splitting a line is simply putting a space or a tabe at the start of the second (and subsequent) lines. My version of import-email handles this (as well as repeated headers, such as Received:).
> Has anyone out there a patch/rewrote of import-email or some hint > to handle strange headers? No parse-ability, here... :(
I think that I sent my version to you? If not, let me know and I'll send it to you. (It's not perfect nor finished, but well...).
> In import-email I really miss something to import "real names" > from addresses, like:
I did this too (was my main concern...). Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [4/6] from: philb:upnaway at: 18-Oct-2001 19:04


Hi Gabrielle, I would also be interested in this bug fix. Althoigh the email I recieve arent as varied as the one Mario seems to recieve. Cheers Phil -- original message -- Cassani Mario wrote:
> 1) Missing colon
This is actually a strange behaviour of some mail servers. That line is part of the file format of the unix mail spool file, and should not reported to you by the mail server. However, they seem to report it sometimes... The patch is easy, anyway.
> 2) Huge "To:" or "Cc:" fields
I have this working with a non-recursive PARSE rule.
> 3) Splitted lines > > looks like import email doesnt like the first line which has been split up > with = signs.
They should not be splitted up by an = sign!! The header cannot be encoded with quoted-printable... The conformant way of splitting a line is simply putting a space or a tabe at the start of the second (and subsequent) lines. My version of import-email handles this (as well as repeated headers, such as Received:).
> Has anyone out there a patch/rewrote of import-email or some hint > to handle strange headers? No parse-ability, here... :(
I think that I sent my version to you? If not, let me know and I'll send it to you. (It's not perfect nor finished, but well...).
> In import-email I really miss something to import "real names" > from addresses, like:
I did this too (was my main concern...). Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [5/6] from: mario:cassani:icl at: 18-Oct-2001 12:12


Ciao Gabriele,
> > 1) Missing colon > > This is actually a strange behaviour of some mail servers. That
[...]
> They should not be splitted up by an = sign!! The header cannot be
[...] They *shuold* not but *it* is M$ Exchange...
> I think that I sent my version to you? If not, let me know and > I'll send it to you. (It's not perfect nor finished, but well...).
Cannot find it, maybe I lost it?!? May you send it again, please? Grazie mille Mario

 [6/6] from: deadzaphod:flyingparty at: 18-Oct-2001 4:14


I'd like to get a copy too..

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted