Pegasus Mail & Mercury

Welcome to the Community for Pegasus Mail and
The Mercury Mail Transport System, the Internet's longest-serving PC e-mail system!
Welcome to Pegasus Mail & Mercury Sign in | Join | Help
in
Home Blogs Forums Downloads Pegasus Mail Overview Mercury Overview Wiki

Attachment not saveable / problem with special characters in attached file names?

Last post 03-23-2020, 18:36 by idw. 20 replies.
Page 1 of 2 (21 items)   1 2 Next >
Sort Posts: Previous Next
  •  03-13-2020, 8:27

    • Joerg is not online. Last active: 04-08-2020, 20:06 Joerg
    • Top 25 Contributor
    • Joined on 03-25-2008
    • German Baltic Sea Coast
    • Star
    • Points 9,155

    Attachment not saveable / problem with special characters in attached file names?

    Since a few days one of our customers is regularly sending pdf attachments to us with following file name pattern "L2000877_PB-15-04421 - Project M_V Name123, Company ABCD.pdf".

    Unfortunately it seems Pmail is not able to process this file name correctly. When opening the mail and switching to the attachment section, Pmail is showing only  " - " as file name, and the real file name is added to "description".

    When trying to save the attachment at harddisk, Pmail is only creating a file called " - " without any name or file extension. In that case we have to manually rename the file into its original "name.pdf". Then we are able to open it by a pdf viewer, means the file is not corrupt but only the name is wrong.

    Here is the attachment header, taken from the raw view of Pmail:

    -----=_Part_28_248831067.1583941918156
    Content-Type: application/pdf;
    name*0="L2000877_PB-15-04421 - Projekt M_V Name123, Company ABC"; name*1=n.pdf
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
    filename*0="L2000877_PB-15-04421 - Projekt M_V Name123, Company ABC"; filename*1=n.pdf
    Content-Description: L2000877_PB-15-04421 - Projekt Name123, Company ABCD.pdf

    Worth to mention that the "name" and "filename" section above in the header are showing a shortened filename, while the content-description is showing the correct name.

    In contrast to the above said Thunderbird has no problem with this mail and the attachment (opened from the same local Mercury/Pmail user mailbox), showing and saving it correctly. Maybe the long file name, especially with the "comma" inside is not in accordance with any internet standards. Has anybody an idea?


    Mercury 4.81.187 @Windows Server 2016, with 16-100 user licence
    Pegasus 4.73.639, network installation
  •  03-13-2020, 17:14

    • idw is online. Last active: Wed, Apr 08 2020, 22:45 idw
    • Top 10 Contributor
    • Joined on 03-25-2007
    • Germany
    • SuperStar
    • Points 49,020
    • BetaTeam

    Re: Attachment not saveable / problem with special characters in attached file names?

    Joerg:
    Maybe the long file name, especially with the "comma" inside is not in accordance with any internet standards.

    That's what the quotes are for, but you can easily test this by omitting the blanks and commas in the respective CNM file after copying the message to the new mail folder. But I guess it's rather an issue with the special kind of splitting long header content into two parts (starting with an asterisk) used here according to RFC 2231, called Parameter Value Continuations (Section 3): "a continuation mechanism for long parameter values to avoid problems with header line wrapping". Looks like it's still not supported by Pegasus Mail, we need to ask David Harris here, once again ...


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail: <http://www.pmpgp.de/pmpgp/>
    S/MIME Certificate Fingerprint: 94 c6 b4 71 0c 62 30 88 a5 b2 77 01 74 2b 86 66 3b 7e 65 7c
  •  03-16-2020, 9:27

    • Joerg is not online. Last active: 04-08-2020, 20:06 Joerg
    • Top 25 Contributor
    • Joined on 03-25-2008
    • German Baltic Sea Coast
    • Star
    • Points 9,155

    Re: Attachment not saveable / problem with special characters in attached file names?

    Thanks Michael, I already suspected that there would be another RFC for Smile. Will see if David answers. Nevertheless it's an unpleasant thing where my users claim Pmail again for.

    Take care of you and stay healthy.


    Mercury 4.81.187 @Windows Server 2016, with 16-100 user licence
    Pegasus 4.73.639, network installation
  •  03-16-2020, 22:57

    • idw is online. Last active: Wed, Apr 08 2020, 22:45 idw
    • Top 10 Contributor
    • Joined on 03-25-2007
    • Germany
    • SuperStar
    • Points 49,020
    • BetaTeam

    Re: Attachment not saveable / problem with special characters in attached file names?

    Joerg:
    Will see if David answers.

    It would help to have a sample message for him. I might have one somewhere since I remember having dealt with it for some reason in the past already, but I'm not too sure about it. Could you provide one for us maybe?


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail: <http://www.pmpgp.de/pmpgp/>
    S/MIME Certificate Fingerprint: 94 c6 b4 71 0c 62 30 88 a5 b2 77 01 74 2b 86 66 3b 7e 65 7c
  •  03-17-2020, 13:38

    • Joerg is not online. Last active: 04-08-2020, 20:06 Joerg
    • Top 25 Contributor
    • Joined on 03-25-2008
    • German Baltic Sea Coast
    • Star
    • Points 9,155

    Re: Attachment not saveable / problem with special characters in attached file names?

    idw:
    It would help to have a sample message for him. I might have one somewhere since I remember having dealt with it for some reason in the past already, but I'm not too sure about it. Could you provide one for us maybe?

    Just checked the problematic attachment. Unfortunately it has content which I must not share.

    Sending any other attachments with such long file name or name pattern doesn't reproduce the issue. I'm gonna wait until the next problematic attachment from that client is reaching us. Maybe it has less important content that I can provide you with.

    Thanks for your offer.


    Mercury 4.81.187 @Windows Server 2016, with 16-100 user licence
    Pegasus 4.73.639, network installation
  •  03-17-2020, 17:06

    Re: Attachment not saveable / problem with special characters in attached file names?

    Joerg:

    idw:
    It would help to have a sample message for him. I might have one somewhere since I remember having dealt with it for some reason in the past already, but I'm not too sure about it. Could you provide one for us maybe?

    Just checked the problematic attachment. Unfortunately it has content which I must not share.

    Sending any other attachments with such long file name or name pattern doesn't reproduce the issue. I'm gonna wait until the next problematic attachment from that client is reaching us. Maybe it has less important content that I can provide you with.

    Thanks for your offer.

    How about your client late messages?


    Best,

    euler f german
    sete lagoas, mg, brazil
    Pegasus Mail 4.73.639 Standalone - Windows 7 Ultimate
    BearHTML 4.9.9.6 IERenderer 2.6.3.4
    Binaries: C:\PMAIL\Programs
    Mailboxes: C:\PMAIL\MAIL

    InsPMDic — Dictionary Handler Add-on (link on profile)
  •  03-17-2020, 17:16

    • Joerg is not online. Last active: 04-08-2020, 20:06 Joerg
    • Top 25 Contributor
    • Joined on 03-25-2008
    • German Baltic Sea Coast
    • Star
    • Points 9,155

    Re: Attachment not saveable / problem with special characters in attached file names?

    Euler GERMAN:

    How about your client late messages?

    Hi Euler,

    What do you mean? Making no sense for me sending the last client e-mail without the attachment. How do you want to test the saving of attachment if the attachment is missing?


    Mercury 4.81.187 @Windows Server 2016, with 16-100 user licence
    Pegasus 4.73.639, network installation
  •  03-17-2020, 18:56

    Re: Attachment not saveable / problem with special characters in attached file names?

    Joerg:
    Euler GERMAN:

    How about your client late messages?

    Hi Euler,

    What do you mean? Making no sense for me sending the last client e-mail without the attachment. How do you want to test the saving of attachment if the attachment is missing?

    Joerg,

    What I meant is that a late message (with attachments, of course), which doesn't carry any sensitive data, would be entitled to use.

    Sorry if I wasn't clear at first.


    Best,

    euler f german
    sete lagoas, mg, brazil
    Pegasus Mail 4.73.639 Standalone - Windows 7 Ultimate
    BearHTML 4.9.9.6 IERenderer 2.6.3.4
    Binaries: C:\PMAIL\Programs
    Mailboxes: C:\PMAIL\MAIL

    InsPMDic — Dictionary Handler Add-on (link on profile)
  •  03-18-2020, 18:00

    • irelam is not online. Last active: 04-08-2020, 22:15 irelam
    • Top 10 Contributor
    • Joined on 03-23-2007
    • Edmonton, Alberta, Canada
    • SuperStar
    • Points 22,735
    • BetaTeam Moderator

    Re: Attachment not saveable / problem with special characters in attached file names?

    Reading of RFC  it seems that the protocol for the Mime header folding is not being followed. The filename*1=n.pdf should be on a following line with one blank at the start of the line (following folding rules). Both file* and name* are breaking the rules of the RFC.  As-is, the filename is the whole string on one line, and contains illegal characters, and thus there is no folding of multiple lines.

    Somewhere the rules are being broken. The content-description above shows the actual filename and doesn't need folding, as the length must exceed 78 bytes to need folding.

    Martin

  •  03-18-2020, 20:12

    • idw is online. Last active: Wed, Apr 08 2020, 22:45 idw
    • Top 10 Contributor
    • Joined on 03-25-2007
    • Germany
    • SuperStar
    • Points 49,020
    • BetaTeam

    Re: Attachment not saveable / problem with special characters in attached file names?

    irelam:
    Somewhere the rules are being broken. The content-description above shows the actual filename and doesn't need folding, as the length must exceed 78 bytes to need folding.

    ... supposed Joerg didn't modify the headers when posting them here which I'm sure he did ... and the RFC doesn't say you're not allowed to use it's rules when it's not strictly required, its samples actually wouldn't require using them either ...

    And, BTW, all of the filname is actually legal: "L2000877_PB-15-04421 - Projekt M_V Name123, Company ABCD.pdf" is a valid filename on Windows systems.


    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail: <http://www.pmpgp.de/pmpgp/>
    S/MIME Certificate Fingerprint: 94 c6 b4 71 0c 62 30 88 a5 b2 77 01 74 2b 86 66 3b 7e 65 7c
  •  03-18-2020, 23:43

    • idw is online. Last active: Wed, Apr 08 2020, 22:45 idw
    • Top 10 Contributor
    • Joined on 03-25-2007
    • Germany
    • SuperStar
    • Points 49,020
    • BetaTeam

    Re: Attachment not saveable / problem with special characters in attached file names?

    Joerg:

    idw:
    It would help to have a sample message for him. I might have one somewhere since I remember having dealt with it for some reason in the past already, but I'm not too sure about it. Could you provide one for us maybe?

    Just checked the problematic attachment. Unfortunately it has content which I must not share.

    Well, I found the sample message I once got (and re-submitted to David Harris now), looks like it's a "Joerg only" issue, see here Wink.

    Michael

    --
    PGP Key ID (RSA 2048): 0xC45D831B
    PGP Plugin for Pegasus Mail: <http://www.pmpgp.de/pmpgp/>
    S/MIME Certificate Fingerprint: 94 c6 b4 71 0c 62 30 88 a5 b2 77 01 74 2b 86 66 3b 7e 65 7c
  •  03-19-2020, 8:26

    • Joerg is not online. Last active: 04-08-2020, 20:06 Joerg
    • Top 25 Contributor
    • Joined on 03-25-2008
    • German Baltic Sea Coast
    • Star
    • Points 9,155

    Re: Attachment not saveable / problem with special characters in attached file names?

    idw:
    Danke! Es ist aber definitiv ein RFC-Standard, daher muß es irgendwann sowieso umgesetzt werden.

    Thanks for the link to a former discussion in this regard from 2018. Seems it's not a "Joerg only" issue.  :-)

    But what does your (german) message mean? Are the folded long file names RFC standard, but have yet to be implemented by Pmail? Or is it a fault behaviour of the sender's e-mail client, which is transforming long attachment file names in the wrong way?

    I have to tell something to my 20 local users, whether they have to live with or whether they should notify the sender don't using such long file names beause of a faulty mail client on its side (sender)?


    Mercury 4.81.187 @Windows Server 2016, with 16-100 user licence
    Pegasus 4.73.639, network installation
  •  03-19-2020, 16:38

    Re: Attachment not saveable / problem with special characters in attached file names?

    Joerg:
    Thanks for the link to a former discussion in this regard from 2018. Seems it's not a "Joerg only" issue.  :-)

    Far from that! Smile I just found an interesting discussion on the matter at GitHub: https://github.com/PHPMailer/PHPMailer/issues/1469

    Can you identify the Sender's mailer? (e.g. X-mailer:)


    Best,

    euler f german
    sete lagoas, mg, brazil
    Pegasus Mail 4.73.639 Standalone - Windows 7 Ultimate
    BearHTML 4.9.9.6 IERenderer 2.6.3.4
    Binaries: C:\PMAIL\Programs
    Mailboxes: C:\PMAIL\MAIL

    InsPMDic — Dictionary Handler Add-on (link on profile)
  •  03-19-2020, 19:56

    Re: Attachment not saveable / problem with special characters in attached file names?

    Folks,

    Sending a message to myself containing a very long filename produced this section header:

    --Message-Boundary-1102
    Content-type: Application/Octet-stream; name="0________1_________2_________3_________4_________5_________6_________7_________8_________9________10________11________12________13________14________15________16________17________18________19________20.pdf"; type=Adobe-PDF
    Content-disposition: attachment; filename="0________1_________2_________3_________4_________5_________6_________7_________8_________9________10________11________12________13________14________15________16________17________18________19________20.pdf"
    Content-transfer-encoding: BASE64

    JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9TdWJ0eXBlL1hNTC9UeXBlL01ldGFkYXRhL0xl
    bmd0aCAzMzM4Pj5zdHJlYW0KqXNAqbcx8vTXd6gXB3/c+IumabTYU/IuuUYkDkz5oRi5/…

    File is correctly recognized as "Adobe-PDF", opened and saved.

    I edited the .CNM file to the following format (and to meet Joerg's description):

    --Message-Boundary-1102
    Content-type: Application/Octet-stream;
    name*0="0________1_________2_________3_________4_________5_________6";
    name*1="_________7_________8_________9________10________11________12";
    name*2="________13________14________15________16________17________18";
    name*3="________19________20.pdf"; type=Adobe-PDF
    Content-disposition: attachment;
    name*0="0________1_________2_________3_________4_________5_________6";
    name*1="_________7_________8_________9________10________11________12";
    name*2="________13________14________15________16________17________18";
    name*3="________19________20.pdf"
    Content-transfer-encoding: BASE64

    JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9TdWJ0eXBlL1hNTC9UeXBlL01ldGFkYXRhL0xl
    bmd0aCAzMzM4Pj5zdHJlYW0KqXNAqbcx8vTXd6gXB3/c+IumabTYU/IuuUYkDkz5oRi5/mjh
    mI1DEUH4etVJQydB7CS6ZsysFCMOkMZ59w2yjk4BmQjUUbigxCa7fXzkW4EjDeEC+36Z3…

    File is recognized as "Type unknown", and if saved it appears as a single hyphen. OTOH both files are identical in content if saved.

    Anyway, and if I got things right, editing multiple name*#="... to a single line filename="..., keeping only first open and last close double quotes, should do the trick.

    Hope it helps.


    Best,

    euler f german
    sete lagoas, mg, brazil
    Pegasus Mail 4.73.639 Standalone - Windows 7 Ultimate
    BearHTML 4.9.9.6 IERenderer 2.6.3.4
    Binaries: C:\PMAIL\Programs
    Mailboxes: C:\PMAIL\MAIL

    InsPMDic — Dictionary Handler Add-on (link on profile)
  •  03-19-2020, 20:59

    Re: Attachment not saveable / problem with special characters in attached file names?

    Attachment: 2020-03-19_165800.gif

    Euler GERMAN:
    , and if I got things right, editing multiple name*#="... to a single line filename="..., keeping only first open and last close double quotes, should do the trick.

    Playing a bit more I found the filename=" … " must NOT have CR-LF in between to work. More below.



    Best,

    euler f german
    sete lagoas, mg, brazil
    Pegasus Mail 4.73.639 Standalone - Windows 7 Ultimate
    BearHTML 4.9.9.6 IERenderer 2.6.3.4
    Binaries: C:\PMAIL\Programs
    Mailboxes: C:\PMAIL\MAIL

    InsPMDic — Dictionary Handler Add-on (link on profile)
Page 1 of 2 (21 items)   1 2 Next >
View as RSS news feed in XML

Contact | Advertise | Host provider: PraktIT | Terms of Use | Privacy Statement
Copyright © 2007-2011 David Harris / Peter Strömblad. | Pegasus Mail Home Page