CFPOP fails to populate cfpop variables with multiparts of Content-Type: message/rfc822 (attachments)

Description

Because of taking part of Microsofts/Hotmail "Junk Mail Reporting Program" and also "Yahoo Complaint Feedback Loop Service" we receive recipients email complaints as inline "Content-Type: message/rfc822" attachments.

Because of a new MTA we had to switch to retrieve those emails with CFPOP for further processeing. Before we did it just by reading the emails as pure textfiles.

What I've found is that when Emails are attached as Content-type: Multipart/Mixed in the email with the boundary Content-Type: message/rfc822 (which is how MSN and Yahoo are sending us the messages), CFPOP fails to populate any of the CFPOP-variables for that section (body, textBody HTMLBody) . The multipart is silently discarded and you are not able to get that attached content in any means.

Because Yahoo! and MSN are the creators of those emails and attachments, I can't reproduce them perfectly. I also wasn't able to reproduce those emails with JAVA Mail nor CFML nor CDO.Message. IF nobody from the Lucee core dev Team is able to reproduce that mulitpart content of "Content-Type: message/rfc822", I was able to reproduce it with the email client Pegasus Email. To do so, do the the following steps:

 

UPDATE: I was finally able to recreate the emails with CFMAIL. Please use the attached templates createEmailsAsOfMSN.cfm and createEmailsAsOfYahoo.cfm and read my comments added to this issue!

 

1. Download "Pegasus Mail v4.73 for Windows [Current offical version]" from http://www.pmail.com/downloads_s3_t.htm
2. Setup a SMTP configuration to be able to send SMTP Emails
3. Create a simple text file named attachment.eml with some content that will later serve as the attachment
4. Type CTRL+n to start a new message
5. Enter the "to" address. That needs to be the final email address that will later be requested/retrieved with CFPOP
6. Enter a subject of your choice e.g "CFPOP Testcase"
7. Click on the tab "Attachments"
8. For "file type" select "RFC822"
9. For encoding set "no encoding"
10. Click "add attachment" and select the file created in step 3
11. Click on the tab "Message" and "send"
12. Retrieve the created email CFPOP by retrieving the emails of the user of the to-address of step5 and dump it:

You will see that the created multipart won’t be retrieved.

Note: If you retrieve the Emails with the POP3 client of Pegasus, you will see the attachments correctly.

The pure generated raw email content message gathered from the file system (not CFPOP) of that email (file type .eml) will look as follows (pleae note that I had to anonymize the email because of EU GDPR). I'm adding the raw emails as text here and as attachment to this LDEV as well :

The email above the content of the part between line 25 and 29 is not retrieved by cfpop.

The original mail genereated by the MSN/hotmail-staff that caused the issue looks as follows (also anonymized):

The email above the content of the part between line 41 and 137 is not retrieved by cfpop.

Environment

Servlet Container Apache Tomcat/9.0.35
Java 11.0.11 (AdoptOpenJDK) 64bit
Betriebssystem Windows Server 2019 (10.0) 64bit

Attachments

8

Activity

Show:

Pothys - MitrahSoft 19 July 2022 at 15:06

I've checked this ticket with the lucee latest build 6.0.0.202-SNAPSHOT and now the issue was solved. cfpop retrieves the message content type of message/rfc822 and returns that contents in the body column of the result query.

Zac Spitzer 17 July 2022 at 16:08

Pothys - MitrahSoft 27 June 2022 at 14:28

I’ve added a testcase in the above PR

Pothys - MitrahSoft 14 June 2021 at 09:48

I added a fix to this ticket

Pull Request:

Pothys - MitrahSoft 4 June 2021 at 15:31

I added

Fixed

Details

Assignee

Reporter

Priority

Labels

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 3 June 2021 at 17:14
Updated 19 July 2022 at 15:06
Resolved 19 July 2022 at 15:06