MozillaZine

How to change the attachment directory of a single email?

User Help for Mozilla Thunderbird
reevuur
 
Posts: 362
Joined: September 13th, 2004, 2:02 pm

Post Posted January 1st, 2019, 1:51 pm

I do detach my attachments manually to a specific folder.
Unfortunately, I saved a few attachments in the wrong folder.

I want to move these attachments in the default "attachment folder" and change the wrongly specified attachment directory link in this email.
How can I do this?

tanstaafl
Moderator

User avatar
 
Posts: 45495
Joined: July 30th, 2003, 5:06 pm

Post Posted January 1st, 2019, 9:12 pm

The ability to save attachments in a separate directory is really buggy. That feature has never worked for me. Occasionally I read about somebody able to save them to the desktop.

If you really "detached" a attachment that is something different. That saves the attachment in the specified directory as a file (i.e. exports it) and then deletes the original. If you look at the raw message source using view -> message source or Control-U you will see the attachment no longer contains the file and has headers specifying what happened. For example:

------=_Part_370769_481956083.1542203034855
Content-Type: application/pdf
Content-Disposition: attachment; filename="Itinerary.pdf"
X-Mozilla-External-Attachment-URL: file:///D:/Downloads/Itinerary.pdf
X-Mozilla-Altered: AttachmentDetached; date="Tue Jan 01 22:52:45 2019"

You deleted an attachment from this message. The original MIME headers for the attachment were:
Content-Type: application/pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Itinerary.pdf"
Content-ID: <6681353c-62da-6d79-b445-ffedd06c47ff@yahoo.com>


The reason you can't easily reverse the process is that the detached file is no longer base64 encoded (a way to store a binary attachment in a message that only supports 7bit ASCII characters), so you can't just open it with a text editor and copy and paste its contents back into the mail message.

Notice the X-Mozilla-External-Attachment-URL: file:///D:/Downloads/Itinerary.pdf . If you double click on the attachment it appears to use the URL in that header to find and open the attachment. If you want to store the detached attachment elsewhere move it and then edit that header accordingly using the the Header Tools Lite add-on.

reevuur
 
Posts: 362
Joined: September 13th, 2004, 2:02 pm

Post Posted January 2nd, 2019, 2:27 am

Thanks a lot for your detailed explanation. Works excellent.
Thanks again!

Great Add-on!

reevuur
 
Posts: 362
Joined: September 13th, 2004, 2:02 pm

Post Posted January 2nd, 2019, 7:43 am

Hope you don't mind if I ask you one more question.

How can you find a message with an attachment p.e. "my attachment.zip"?

(I'm using TB for many years now and still like it but in my opinion the search function could be much improved.
Very often I can not find things. Have tried all kinds of different add-ons without success.
A simple global search that returns a list. I have been using the add-on "search as a list"
for a long time, but even this one often does not show all matches.)

tanstaafl
Moderator

User avatar
 
Posts: 45495
Joined: July 30th, 2003, 5:06 pm

Post Posted January 2nd, 2019, 8:24 am

http://kb.mozillazine.org/Custom_headers

If you are using a IMAP account there is no built-in support for searching the body. You can use the "customize..." option at the bottom of the leftmost list box in searches and message filters to add a custom header (it updates mailnews.customHeaders). The Content-Disposition: header usually contains a filename= string. Last time I checked searching the body actually let you search the headers preceding the message and any attachments too.

Personally I find using the Quick Filter Bar a better search tool since I usually know what folder the message I'm looking for is in, and its less brittle functionality. "I find that some global searches that return messages with attachments disables the attachment filter while others work as expected. The filtering based on attachment types is broken though, when I select PDF files it doesn't find any though there are plenty in the search results."

viewtopic.php?f=39&t=3043963&hilit=+global

reevuur
 
Posts: 362
Joined: September 13th, 2004, 2:02 pm

Post Posted January 2nd, 2019, 9:48 am

I do use IMAP for a few of my email accounts, the rest Pop3. When I don't use the emails in IMAP folders anymore I move them to NON-IMAP folders.

I've found a few attachments. I did a search in my mail folder (using File Locator) and tried to find out the email connected to the attachment.
I've used also MailStore to find a few attachment. I haven't found all but I'll go on.

Me too, I often use the Quick Filter Bar (but this time I didn't remember me the folders of my attachments with wrong connection).
Hope there will be one day a global search function (including attachment name search) with Regex and filters like the one in File Locator or other Grep software.

Btw. thank you again for you help. =D>

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 4 guests