Remove Apple (iPhone/iMac) Inserted Images?

User Help for Mozilla Thunderbird
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Remove Apple (iPhone/iMac) Inserted Images?

Post by CBA »

Whereas it's (normally) easy to remove/delete images inserted in a message received from a Window OS-based device (by changing to plain text via "View - Message Body As - Plain Text" and then delete the attachment), that's not (normally) the case in a message sent from an Apple iOS device.

Is there a simple way to handle this? To easily delete images inserted in a message received from an iPhone or iMac computer? So far I haven't found a good solution how to deal with this in Thunderbird. Thanks.
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by DanRaisch »

Do you have TB set to display attachments inline?
Are you forwarding that message or maybe replying to it when you delete the image(s)?
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

DanRaisch wrote:Do you have TB set to display attachments inline?
No.
Are you forwarding that message or maybe replying to it when you delete the image(s)?
Not sure I understand what you mean? Please clarify.

The original posting states the problem: I can't delete inserted images in message received from iOS devices .. even after I change "View - Message Body As - Plain Text" before trying to delete the images (now showing as attachments). Delete doesn't work.
User avatar
DanRaisch
Moderator
Posts: 127231
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by DanRaisch »

I was trying to understand what you are doing when you try to delete the image. You didn't say whether you were trying to delete the image from the received message or from that message when being forwarded or replied to.

See if setting TB to display the images inline offers any benefit when trying to delete the image.
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

DanRaisch wrote:I was trying to understand what you are doing when you try to delete the image. You didn't say whether you were trying to delete the image from the received message or from that message when being forwarded or replied to.
Directly received messages from the original sender. Not forwarded.
See if setting TB to display the images inline offers any benefit when trying to delete the image.
No difference .. and I'm not sure why it would make a difference.

The only way I have found to handle this is a "not-so-good" workaround (not recommended) using the "Header Tools Lite" add-on to edit the image out of the message body. It works okay for small images, but when I get 2-3 pictures in original, each 4+ MB in size, not a useful way to go.
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

Let me add this: I have around 50,000 messages in my POP mailbox (most of them archived, using my own archive system and folders). Assuming that 5% of them had images of some sort .. keeping the image as part of the message (assuming 1MB image size each) would add 2,500MB to my mailbox storage. Not a trivial amount .. and thus my query. TIA. :?
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by tanstaafl »

If its a real attachment I don't understand why you can't delete them under OS X.

Could you choose one of the smaller messages that has this problem, look at the raw message source using Control-U (this shows all of the headers and the actual HTML code, not the interpreted HTML), copy and paste it into a text editor and replace any email addresses with something generic such as bogus@nop.com and then paste that modified source on https://pastebin.com . Then post a link to it. You might want to sign up for a free account with them in order to be able to edit/delete it afterwards.

The reason I'm asking you to do this is I want to understand whether these are embedded images (Content-Disposition: inline;), remote images (<img src=.....>, attachments (Content-Disposition: attachment;) etc.

There is a comment at https://addons.mozilla.org/en-US/thunde ... or/?src=ss that the attachment extractor add-on doesn't have full functionality with Thunderbird 52.7 but can still be used to remove embedded images. Have you tried using it?
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

tanstaafl wrote:If its a real attachment I don't understand why you can't delete them under OS X.
To clarify: I run Thunderbird under Windows whereas the messages with the images I can't delete are from senders using Apple iOS (iPhone or iMac).
...look at the raw message source...I want to understand whether these are embedded images (Content-Disposition: inline;), remote images (<img src=.....>, attachments (Content-Disposition: attachment;) etc.
I checked and it's "Content-Disposition: inline;" as you can see from the below snippet taken from the body of a message with an image I can't delete using the method mentioned earlier:

--Apple-Mail-5B9FEBA8-892B-4C7D-AF45-BD15BA58AF8D
Content-Type: image/jpeg;
name=IMG_1985.JPG;
x-apple-part-url=8A28A4E4-7784-4F48-84BC-EAD5A60ED357
Content-Disposition: inline;
filename=IMG_1985.JPG
Content-Transfer-Encoding: base64
Content-Id: <8A28A4E4-7784-4F48-84BC-EAD5A60ED357>

There is a comment at https://addons.mozilla.org/en-US/thunde ... or/?src=ss that the attachment extractor add-on doesn't have full functionality with Thunderbird 52.7 but can still be used to remove embedded images. Have you tried using it?
Just downloaded this add-on and I'll try it as soon as I have a chance. As I use an older version Thunderbird, I may work. We'll see.
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

tanstaafl wrote:There is a comment at https://addons.mozilla.org/en-US/thunde ... or/?src=ss that the attachment extractor add-on doesn't have full functionality with Thunderbird 52.7 but can still be used to remove embedded images. Have you tried using it?
I installed "attachmentextractor-1.3.5.1-tb.xpi" and tried various setting, but no success. Deleting inserted images in email messages received from an iOS device not possible .. at least I can't make it work. It may work with embedded images in messages sent from Windows devices, however, I don't need that!
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by tanstaafl »

Does this problem occur if the message has a Content-ID header for the embedded image?

Does this problem only occur with messages from IOS or does it also occur with messages from OSX?

How do you know what its being sent from? Is there a X-Mailer: or User-Agent: header that states so?

If you forward to yourself one of the messages sent from a IOS device does it still have that problem? I'm not suggesting it as a workaround. The reason I ask is that I was going to suggest that I send you a private message with my email address and you forward (inline) one of those messages to me so that I can duplicate the problem and try to understand what the dependency is. But there is no point if your forwarding it makes it a non-reproducible problem.
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

tanstaafl wrote:Does this problem occur if the message has a Content-ID header for the embedded image?
Not sure I understand. Unless I answer below, please clarify.
Does this problem only occur with messages from IOS or does it also occur with messages from OSX?
Both.
How do you know what its being sent from? Is there a X-Mailer: or User-Agent: header that states so?
Many messages have the "Sent from my iPhone (or iPad)" sign off, which speaks for itself. And I know what devices many senders use and if not before I can see it in the body. Below some samples:

Content-Type: multipart/alternative; boundary=Apple-Mail-A09CF0E1-8AC0-4B17-9B5D-E2580CACF174
Mime-Version: 1.0 (1.0)
X-Mailer: iPhone Mail (15E302)

Content-Type: multipart/alternative; boundary=Apple-Mail-BED2F35F-FAAA-4B85-B071-8720AAACB505
Mime-Version: 1.0 (1.0)
X-Mailer: iPad Mail (14E304)

Content-Type: multipart/alternative; boundary="Apple-Mail=_A85EB18E-0FC6-427E-84D9-62FA84E6126F"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
X-Mailer: Apple Mail (2.3273)

Content-Type: multipart/alternative; boundary="Apple-Mail=_99E8A1FE-3FA8-405D-B48C-272A0F339F18"
Mime-Version: 1.0 (Mac OS X Mail 11.1 \(3445.4.7\))
X-Mailer: Apple Mail (2.3445.4.7)

If you forward to yourself one of the messages sent from a IOS device does it still have that problem? I'm not suggesting it as a workaround.
No. If I forward a message I received from an iOS device sender to myself (with an image I can't delete in original) I can delete the image. But, that's probably because the sender agent is now Windows and not iOS. This is not a viable workaround.
The reason I ask is that I was going to suggest that I send you a private message with my email address and you forward (inline) one of those messages to me so that I can duplicate the problem and try to understand what the dependency is. But there is no point if your forwarding it makes it a non-reproducible problem.
I can send you a message with an embedded image from my iPhone if you PM me your email address. That should do it.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by tanstaafl »

A Content-ID: header is a optional header that is used to refer to embedded images within the HTML. You may see them with a Content-Type:multipart/related header.

I sent you a private message with my email address.
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Insered Images ??

Post by CBA »

tanstaafl wrote:I sent you a private message with my email address.
I have sent you an email message with an embedded image from my iPhone a few moments ago. If the image is too large, let me know and I'll send you a smaller one. The view, by the way, is from a beach in Sri Lanka!
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Remove Apple (iPhone/iMac) Inserted Images?

Post by tanstaafl »

It's not too large. That beach looks great.

I can't reproduce the problem using Thunderbird 52.8.0. Switching to view -> message body as -> plain text, right clicking on the attachment and selecting delete from the context menu worked fine. I tried it several times on copies of the message. Looking at the raw message source the only changes were those I'd expect in copying a message from a IMAP account to "Local Folders" (mbox file). I'm using Windows 10 Home version 1803 on a PC with a AMD Ryzen 7 1800X and 16GB of memory. Anything unusual about your configuration?

--Apple-Mail-8E4827C3-300A-4C04-AE90-C4F5D0AE404D
Content-Type: text/html;
charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head><meta http-equiv="content-type" content="text/html; "></head><body dir="auto"><div><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica;"><span style="font-size: 12pt;">Test <b><i>embedded</i></b> image! Cheers...</span></p><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica;"><span style="font-size: 12pt;"><br></span></p><br><img src="cid:C22F8A9B-AEC0-4D59-876F-1376BE907992" id="C22F8A9B-AEC0-4D59-876F-1376BE907992"></div><div><br><br>Sent from my iPhone</div></body></html>
--Apple-Mail-8E4827C3-300A-4C04-AE90-C4F5D0AE404D
Content-Type: text/x-moz-deleted; name="Deleted: IMG_1629.JPG"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="Deleted: IMG_1629.JPG"
X-Mozilla-Altered: AttachmentDeleted; date="Sun Jun 17 11:44:31 2018"

You deleted an attachment from this message. The original MIME headers for the attachment were:
Content-Type: image/jpeg;
name=IMG_1629.JPG;
x-apple-part-url=C22F8A9B-AEC0-4D59-876F-1376BE907992
Content-Disposition: inline;
filename=IMG_1629.JPG
Content-Transfer-Encoding: base64
Content-Id: <C22F8A9B-AEC0-4D59-876F-1376BE907992>


--Apple-Mail-8E4827C3-300A-4C04-AE90-C4F5D0AE404D--

I found https://gearmage.com/maildownloader.html (Mail Attachment Downloader) while looking for an alternative to the attachmentextractor add-on (which I verified installed but did nothing on my PC). There is a free version with no ads. Unfortunately it looks like it can't be used to delete the original image .
CBA
Posts: 235
Joined: June 16th, 2008, 2:08 am

Re: Remove Apple (iPhone/iMac) Inserted Images?

Post by CBA »

tanstaafl wrote:I can't reproduce the problem using Thunderbird 52.8.0. Switching to view -> message body as -> plain text, right clicking on the attachment and selecting delete from the context menu worked fine. I tried it several times on copies of the message. Looking at the raw message source the only changes were those I'd expect in copying a message from a IMAP account to "Local Folders" (mbox file). I'm using Windows 10 Home version 1803 on a PC with a AMD Ryzen 7 1800X and 16GB of memory. Anything unusual about your configuration?
Thanks for your efforts. My configuration is VERY different (and very legacy) compared to yours. I use (by choice) Thunderbird 3.1.20 and POP3 mail. And I have tried to do the delete on W7 32- and 64-bit PCs, the latter with 8MB memory, but w/o much success so far.

As I can't do the image delete, my message body looks like the below:

--Apple-Mail-B020C8B6-84FC-4E48-8382-13DB76B291A5
Content-Type: multipart/related;
type="text/html";
boundary=Apple-Mail-8E4827C3-300A-4C04-AE90-C4F5D0AE404D
Content-Transfer-Encoding: 7bit

--Apple-Mail-8E4827C3-300A-4C04-AE90-C4F5D0AE404D
Content-Type: text/html;
charset=us-ascii
Content-Transfer-Encoding: 7bit

<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body dir="auto"><div><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica;"><span style="font-size: 12pt;">Test <b><i>embedded</i></b> image! Cheers...</span></p><p style="margin: 0px; font-size: 12px; line-height: normal; font-family: Helvetica;"><span style="font-size: 12pt;"><br></span></p><br><img src="cid:C22F8A9B-AEC0-4D59-876F-1376BE907992" id="C22F8A9B-AEC0-4D59-876F-1376BE907992"></div><div><br><br>Sent from my iPhone</div></body></html>
--Apple-Mail-8E4827C3-300A-4C04-AE90-C4F5D0AE404D
Content-Type: image/jpeg;
name=IMG_1629.JPG;
x-apple-part-url=C22F8A9B-AEC0-4D59-876F-1376BE907992
Content-Disposition: inline;
filename=IMG_1629.JPG
Content-Transfer-Encoding: base64
Content-Id: <C22F8A9B-AEC0-4D59-876F-1376BE907992>


Do you see anything unusual in the above and if so is there anything than I can change or tweak in my TB 3.1.20 configuration?

If not, the upshot is that this may be related to my "slightly" outdated version Thunderbird and/or to my use of POP3 mail. Perhaps I'll download and try a portable version of a more current Thunderbird version when I have time. Regardless, thanks!
Post Reply