Author Topic: No way to remove from the response the inline photo from the original message  (Read 8954 times)

StR

  • Hero Member
  • *****
  • Posts: 1558
I encountered the following situation:
An e-mail was sent to me with a photo attached as an inline image.
The message was sent either from Gmail website or from its mobile app, I am not sure.

When I am replying to that message, I do not see the option to include/exclude the message (which I believe shows up if it is a regular attachment). The image is automatically attached.

If I uncheck "include the original message" checkbox, even though the message is not included, the image is still included, and there is no obvious way to tell if it is attached or not (until you actually send it).
More over, if the original message is not included, Aquamail is unable to see the attached image, or even see that there is an attachment, which is even weirder.

I suspect, switching to the plain text might remove the image, but I didn't test that.
Also, I assume, if I edit the original message within the reply, that might allow removing the image, but I haven't tested if the image would still be attached. Those ways would still be workarounds rather than a proper and elegant solution.

As a user, I would expect a checkbox:
[ ] include the attached (or inline) image.

Kostya, if you have problem reproducing the situation (I am not sure if this bug is sensitive to how exactly the image was incorporated inline), please let me know and I will try to provide the necessary information.

« Last Edit: February 02, 2015, 08:38:54 am by StR »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
In the latest released version, turning off "quote original" will still package the original images in the resulting (response) message...

They aren't referenced anywhere, so won't show in Aqua itself -- but some mail apps show "orphaned" inlines as attachments.

And actually I fixed it a few days ago.

I've not been posting my dev builds (since there is not much exciting there, until I can post the new calendar stuff) -- so here is a direct link for you:

http://www.aqua-mail.com/download/AquaMail-market-1.5.1.15.8.apk
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

StR

  • Hero Member
  • *****
  • Posts: 1558
Aah, OK, so you already knew about this bug.
Just in case, - I've encountered that with the "published" development build just prior to the one with the Yahoo fix (the one posted to the G.play).

It weird that Aqua did not report that "packaged" image as an attachment. The only way you can tell it from within Aqua was by the size of the message. In both Alpine and Thunderbird, the image showed as an attachment.

I just installed the build you suggested, and can report the following:
1. When replying, and choosing "Original message not included" -> no image is included .  [Fixed!]
2. There is still no way of excluding just the image         [Remains a shortcoming, but that's more of a feature (or lack of one), than a bug].
3. The [phantom] image that was attached previously, is still not seen/reported as an attachment  [Not fixed! - that's, I think, is a bug].

Thank you, Kostya!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
>> 1. When replying, and choosing "Original message not included" -> no image is included .  [Fixed!]

Yes, that's the fix.

Your 2 and 3 are not bugs.

Inline images are not attachments.

Rather, you can think of them as being "embedded" in message content (original message content).

When you turn off original message content -- the embedded images are not included in the resulting outgoing message either.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

StR

  • Hero Member
  • *****
  • Posts: 1558
...
Your 2 and 3 are not bugs.

Inline images are not attachments.

Rather, you can think of them as being "embedded" in message content (original message content).

When you turn off original message content -- the embedded images are not included in the resulting outgoing message either.

Kostya, it appears to me that I was not very clear on #3.
Hence, let me clarify what I meant.
So, I have a message (actually a few) that was sent previously using the previous version of AM, and it has no included message but the image is attached.
Well, yes, technically, it is done differently, it is not
Code: [Select]
Content-Disposition: attachment;rather, it is
Code: [Select]
Content-Disposition: inline;I don't know if it actually breaks the corresponding RFC or not, and how, according to RFC it should be treated by the e-mail program if that image is not referenced.

From what I can tell, AquaMail completely ignores it, and unless I knew there was an image there, I'd keep replying to that message without removing the "new" original message, I will continue resending that phantom image. (I just tested that with the new version)
In contrast, Thunderbird and Alpine show that there is an attachment (that one can save, open, etc.).

I don't know if such a phantom inline image is "legal" (and whether it could happen from other mailiers), but I just offered a case where handling it (instead of keeping silent about its presence) by AM would be helpful.


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
>> From what I can tell, AquaMail completely ignores it

No, Aqua does look at Content-Disposition (and the parent's "mutipart/related" or "multipart/mixed") to sort out attachments vs. inlines.

>> In contrast, Thunderbird and Alpine show that there is an attachment (that one can save, open, etc.).

It's just a way to deal with malformed messages -- sent by malformed mail apps -- which mark images as "inline" and don't actually reference them from HTML content.

And until the "fix" here, Aqua was just such a "malformed" mail apps, where it would send the images embedded in the original (quoted) message even if you turned off "quote original".

( incidentally, Aqua doesn't do that -- if an image is marked inline, then it's assumed that the sending app knew what it was doing )

----

But I think there is another case here.

Sending a message like that (original with inlines, turning off quoting when replying) -- *and then* opening it from Sent and doing "Edit as new".

Am I right? Is the new scenario you've just discovered?
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

StR

  • Hero Member
  • *****
  • Posts: 1558
>> In contrast, Thunderbird and Alpine show that there is an attachment (that one can save, open, etc.).

It's just a way to deal with malformed messages -- sent by malformed mail apps -- which mark images as "inline" and don't actually reference them from HTML content.

Yep, I understand, and while it is not required, it is a good behavior.
Besides compensating for a malformed message, it allows people to save one of the "parts/attachments" separately, even in the graphic-capable program such as Thunderbird.

As for Alpine (aka a followup to pine), - since it is a terminal (text)-based program itself, - it shows ALL parts of the multipart message as "Parts/Attachments", without making a distinction:
Quote
Parts/Attachments:
   1.1   OK    ~436 bytes  Text (charset: UTF-8)
   1.2 Shown   ~682 bytes  Text (charset: UTF-8)
   2            3.6 MB     Image



But I think there is another case here.

Sending a message like that (original with inlines, turning off quoting when replying) -- *and then* opening it from Sent and doing "Edit as new".

Am I right? Is the new scenario you've just discovered?

Nope.
I had two other scenarios that I encountered (one in part of the course of interaction, the other one, - in the course of testing):
1. I replied with the malformed message (from the older version of AM), then I got response to my message that preserved that phantom inline image. While trying to reply to that message with the new, "fixed" version, I was still having that phantom inline image.
I don't know what client was used on the other end to preserve that phantom image, but I wasn't happy to keep both receiving and sending it (bloating my mailbox and wasting my cell data allowance)

2. I sent a copy of a reply to myself, and so, I was testing by replying to myself from the newer version of AM.

I don't want to waste your (and) time anymore on this. It is sort of a "marginal" case, and most likely it is not affecting many people. (and even when it is happening, most people probably wouldn't notice.)
So, if it requires somewhat considerable effort, don't bother.
If it is easy, it would be nice to have an option to see the presence of any of phantom part.

While writing this message I thought of one more case where this behavior may play a role. And in that case, it should not be limited to an image, but should be extended to any object used or unused.
  Consider a message sent with a malware object sent as an inline phantom (i.e. unreferenced) part.
If the recipient using Aquamail responds to that message (to the address faked in the field "From:") or better yet, - forwards it to somebody else (as it is frequently happens with socially engineered "viral" messages), than this user is spreading that malware (which might not be affecting Android but would affect other OSes).
I understand that this is a security consideration that might be beyond the scope of your interests. Also, even this case is probably rare enough... So, as I wrote above, I stop at this.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
>> 2. I sent a copy of a reply to myself, and so, I was testing by replying to myself from the newer version of AM.

Was this message sent by an older "pre-fix" version of Aqua?

If it was, then consider that since the fix, the issue will be stopped earlier than that, when sending.

I will check out a couple of other scenarios which I have in mind...


Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

StR

  • Hero Member
  • *****
  • Posts: 1558
>> 2. I sent a copy of a reply to myself, and so, I was testing by replying to myself from the newer version of AM.

Was this message sent by an older "pre-fix" version of Aqua?


Yes, the original reply was created by the older, "buggy" version.

To clarify and summarize, - in the scenarios I've tried, the updated version does not produce a phantom inline image in replies to/forwards of a valid message (one that references the image(s)): if the original message is removed, so is the image.

If the phantom [i.e. unreferenced] "inline" image is present in the incoming message (for whatever reason), Aquamail completely ignores that image, neither informing about its presence nor giving an effective handle to remove it (short of removing "the original message"). As we agreed this is not a bug, just a lack of a feature that keeps the user informed.
So, if there is a phantom "inline" attachment, the user has no way of figuring out why the message with 3 lines of text is several-MB heavy (IFF the users notices the unusually large size).
« Last Edit: February 10, 2015, 01:40:59 pm by StR »

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
>> So, if there is a phantom "inline" attachment, the user has no way of figuring out why the message with 3 lines of text is several-MB heavy (IFF the users notices the unusually large size).


Yes, true. Good point.

To detect this, I'd have to cross-reference CID: links in images against actual inline "message parts".

Can be done, just no good place for it since the app doesn't preload full message text up front.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/