tracker issue : CF-3840754

select a category, or use search below
(searches all categories and all time range)
Title:

cfpop - duplicate attachments

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Roberto Anania / Roberto Anania (Roberto Anania)

Created: 10/17/2014

Components: Net Protocols

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win 2008 Web Server

Vote Count: 0

Duplicate ID:	CF-3969304

Problem Description: When generateUniqueFilenames attribute is set to "yes", all file attachments will be duplicated when stored on server. Regardless if they are all already unique.

Steps to Reproduce: set generateUniqueFilenames to "yes" and have cfpop get a full email (with attachments).

Actual Result: Duplicate of all attachments.

Expected Result: Only attachments that are not unique should be given a new name.

Any Workarounds: Set generateUniqueFilenames to "no", but that defeats the purpose.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3840754

External Customer Info:
External Company:  
External Customer Name: rob_cyberdyne
External Customer Email:  
External Test Config: My Hardware and Environment details: ColdFusion 11 - Update 2

Attachments:

Comments:

I can repeat this. Send an email with attachments to a mailbox. Use cfpop to retrieve the message. When "generateUniqueFilenames" is yes, all the files get duplicated. When "generateUniqueFilenames" is "no" everything works as expected. This worked fine on ColdFusion 10. The problem only started on ColdFusion 11.
Comment by External U.
10566 | November 19, 2014 03:58:42 PM GMT
Hi Rob, I'm trying to reproduce this, but haven't been able to reproduce this on CF11 Final or CF11 Update 3 using the following steps: 1) I run this to create 2 emails w/ attachments: <cfmail server="mail.domain.com" from="user@domain.com" to="user@domain.com" subject="testing CF-3840754 - 1"> <cfmailparam file="a.txt" content="a" /> </cfmail> <cfmail server="mail.domain.com" from="user@domain.com" to="user@domain.com" subject="testing CF-3840754 - 2"> <cfmailparam file="a.txt" content="a" /> <cfmailparam file="b.txt" content="b" /> </cfmail> 2) I run this to get the attachments: <cfpop action="getall" server="mail.domain.com" username="user@domain.com" password="password" name="q" attachmentpath="#expandPath('./')#" generateuniquefilenames="yes" /> 3) I see attachment directory contains: a.txt, a1.txt, b.txt 4) I run the above cfpop again 5) I see attachment directory contains: a.txt, a1.txt, a2.txt, a3.txt, b.txt, b1.txt I also tried using cfimap instead of cfpop and see same results. Would you be able to try the above and see if you get different results? Thanks!, -Aaron
Comment by External U.
10567 | November 25, 2014 03:16:13 AM GMT
Bingo, i was about to comment with a code snippet, then i have seen your comment. Thanks Aaron :)
Comment by S V.
10568 | November 25, 2014 03:26:48 AM GMT
Hi Pavan, You're very welcome! When I added the comment, I thought I saw the ticket's status change to CannotReproduce. I thought: wow, someone at Adobe must be working on this ticket at the same time :) Awesome haha. Thanks!, -Aaron
Comment by External U.
10569 | November 25, 2014 03:56:33 AM GMT
Hello Aaron and Pavan, Instead of generating the content of the files using cfmailparam, can you please try attaching 2 files that already exist on the server? If you are unable to reproduce, you can go ahead and close the bug. I will just keep the feature off. Thanks, Robert
Comment by External U.
10570 | November 25, 2014 08:59:59 AM GMT
Has anybody found a fix for this? I am experiencing the same issue.
Comment by External U.
10571 | August 18, 2015 08:01:56 AM GMT
I did not. I set generateUniqueFilenames to "no".
Comment by External U.
10572 | August 18, 2015 08:54:32 AM GMT
I did the same for now, but like you said that kind of defeats the purpose.
Comment by External U.
10573 | August 18, 2015 08:56:11 AM GMT
It looks to me like the cfimap and cfpop are using the attachment directory as the initial temp space then going back and making them unique, leaving the original as well.
Comment by External U.
10574 | October 05, 2015 01:23:50 PM GMT
Hi all, Please be sure the duplication is not being caused by the browser. I ran the test script again (from my comment below) and saw the duplication issue. Then I realized the duplication was b/c I'd left the tab open wherein I was running the test script. If I put focus on another tab, and then put focus back to my test script tab, then shortly after (sometimes seconds later; sometimes a few minutes later) Firefox would send a HEAD request and cause my cfmail or cfpop code to be ran again. Thanks!, -Aaron
Comment by External U.
10575 | October 05, 2015 11:37:41 PM GMT
Thanks, but I do not manually use a browser to run this. I use Outlook to send the messages and then have a scheduled task that runs the CF page.
Comment by External U.
10576 | October 06, 2015 08:53:17 AM GMT
Aaron the script in question moves the mails so even if it was run twice this would not happen. We are moving in the direction of a 2 step script. Such as seen here... http://shemy-coldfusion.blogspot.com/2013/03/coldfusion-code-to-get-multiple-mail.html It looks like CF is using the attachmentpath directory like a temp area before it renames, but then leaves the original file in place. So you end up with the the original and then the newly renamed file.
Comment by External U.
10577 | October 06, 2015 09:03:48 AM GMT
Hi Mike and Roberto, Thank you very much for clarifying. Adobe, I see this ticket is now Open/ToTest/Fixed. Could you please post a standalone repro here, so I can try testing it? I'd like to see the issue before it is fixed, so that I can test it again after its fixed. Thanks!, -Aaron
Comment by External U.
10578 | October 06, 2015 01:18:09 PM GMT
Adobe, I se you just marked this ticket a duplicate of CF-3969304. However, CF-3969304 is not visible to us. Can you please make "Duplicate ID" CF-3969304 visible to us? Thanks!, -Aaron
Comment by External U.
10579 | October 18, 2015 09:23:37 PM GMT
Aaron, Made #CF-3969304 external.
Comment by HariKrishna K.
10580 | October 18, 2015 09:33:14 PM GMT