Attachments saved with wrong extension

When I download attachments .pdf files get saved as .pdf.txt
Same with .gpx
Tried searching forum but cannot find anything. Must be something stupid I have done.

Sound like the MIME type is not properly encoded or passed to the file system intent.

Are the files proper after you rename them? If “yes,” this would support my hunch. If “no,” the file encoding itself seems to be damaged during transfer.

Thanks for quick reply. Looks like might not be simple.
I had the problem on phone with Android 11 but it is still happening on new my Android 12 phone.
.gpx files are saved as .gpx.gps
If renamed, ir new extension removed then they open correctly in the apps.
If I send the same files to another account and open with Outlook on either phone the files open ok.

What is the make and model of your smartphone?

I just tested diverse attachments on my Pixel 6 Pro running Android 12L. Sadly, I am unable to reproduce your issue.

Maybe the file manager on your device does not handle the intent properly? I am using the stock file manager from Google as well as “Explorer” (3.10.3 from Speed Software). Both save the files with the given extensions and proper MIME type.

Have you set your “Downloads” folder as default save location (Misc → Save file to)? If you set a folder here which is not accessible for K-9, the file intent may get intercepted by the downloader. However, that one should not modify the file extensions…

1st phone Moto 5G Plus, 2nd phone Samsung S22 Ultra, both have same fault.
.jpg files arrive correctly. Outlook on same phones downloads attachments correctly.