Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Save message as file' action does not work properly with forwarded messages #131

Closed
Timaios28 opened this issue Nov 3, 2021 · 11 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@Timaios28
Copy link

Hi.
I have tried the 'Save message as file' action and it works fine except when the received message that needs to be filtered is a forwarded one. Then it saves a simple 0 bytes 'fwd' file without extension. I've tried multiple thunderbird versions, from 78.14.0 portable to a 93.0.1 normal installation and I get the same result. The 'Save attachments to' action works fine with all kinds of messages. Note: The forwarded messages that were used for testing were from gmail.

Any thoughts?

@Timaios28
Copy link
Author

So I did a little more digging and I found that if you forward a message, edit the subject and remove the fwd: , the 'Save message as file' works as intended

@RealRaven2000 RealRaven2000 self-assigned this Nov 3, 2021
@RealRaven2000 RealRaven2000 added the bug Something isn't working label Nov 3, 2021
@RealRaven2000
Copy link
Owner

Interesting - some mismatch with the original email? We will see...

@Timaios28
Copy link
Author

example01

I kept on digging a bit. Replying works. Replying multiple times to the same email works. Normal mail works. Only ' Fwd: ' in the subject causes problems, as seen in the picture. I noticed that when handling a 'reply', the action saves the email but removes the 'Re:' from the subject. On the other hand, when handling a 'forward', it tries to keep the 'Fwd:' and fails. I suspect that the colon ':' might be causing the problem. Maybe the algorithm that scans the subject to create the filename has problems dealing with the ':' ?

@Timaios28
Copy link
Author

example02
So, I finally did the obvious. I sent a normal email with a normal subject that I added a colon ':' in a random place (neither in the beginning nor the end). The action saved the email properly, but the filename didn't contain the part of the subject that was after the ':', as can be seen in the pic. It seems that the colon creates the problem but somehow it is more severe in 'Fwd:' .

@RealRaven2000
Copy link
Owner

So, I finally did the obvious. I sent a normal email with a normal subject that I added a colon ':' in a random place (neither in the beginning nor the end). The action saved the email properly, but the filename didn't contain the part of the subject that was after the ':', as can be seen in the pic. It seems that the colon creates the problem but somehow it is more severe in 'Fwd:' .

great stuff thanks for finding that - it will surely be helpful when I recreate the problem.

@Timaios28
Copy link
Author

I think the problem is the fact that the windows filesystem does not accept the colon ':' in the filenames. I even used Thunderbird's built in 'Save As' ability and it saves the email using the subject as filename but removes the colon. If you try this in Linux, it will probably work as the filesystem accepts colons. I think the problem is that the addon tries to save a filename with a colon in it and that is a no no in windows. And for some reason it does it in Fwd: (it works fine in Re: - it removes the : there?). Just my two cents. Great addon, take care!

@Timaios28
Copy link
Author

linux example

Well, I copied the thunderbird profile from windows and I put it in Linux Mint. As expected, it works there. It almost certainly is the ':'. It needs to be cleared from all windows filenames generated using mail subjects because NTFS does not like it and I suppose other characters that cause the same problems with NTFS should be cleared from generated filenames as well, like / ? < > \ : * | "

Thanks for your time, take care!

@RealRaven2000
Copy link
Owner

There is a test version on #144 - I think this one can safely be regarded as duplicate.

@RealRaven2000
Copy link
Owner

Fixed in 3.3, officially released today (21/02/22)

@Timaios28
Copy link
Author

I'll give it a try and let you know :)

@Timaios28
Copy link
Author

save email fwd rep ntfs weird chars problem fixed

It works. The normal email is ok, the forwarded email is OK, the only "problem" I can see is with the replied email, where it saves the filename but omits the "Re:" . Maybe it is deliberate? And even if it is not, it is not a big deal. Thank you for everything! Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants