mikehardy / thunderlink

Link to your Thunderbird emails!
Mozilla Public License 2.0
42 stars 14 forks source link

Message ID with all CAPS after @ #62

Closed tomatic closed 4 years ago

tomatic commented 4 years ago

It looks like Thunderlink isn't case-sensitive when parsing a thunderlink URL. For example, clicking the link

thunderlink://messageid=ef5fbad2-61fc-4e3d-85bc-bfd3fd316c92@PC-BUERO-32

results in the error message

Couldn't find an email message for ThunderLink
thunderlink://messageid=ef5fbad2-61fc-4e3d-85bc-bfd3fd316c92@pc-buero-32

Note that the part after the @ in the URL in the error message is lowercase, while that part of the message ID is in fact uppercase.

Other thunderlink URLs work fine, the only difference I can make out is that the part after the @ is lowercase in those emails.

I'm using Thunderlink 1.2.10 on Thunderbird 68.8.0 running on Kubuntu 19.10.

tomatic commented 4 years ago

Interestingly, when I run thunderbird -thunderlink 'thunderlink://messageid=ef5fbad2-61fc-4e3d-85bc-bfd3fd316c92@PC-BUERO-32' the correct email opens up. So maybe it's the URL handler?

This is my thunderbird-tl.desktop file:

[Desktop Entry]
Actions=Compose;Contacts
Categories=Application;Network;Email;
Comment[en_US]=Open specific Message-ID Thunderbird
Comment=Open specific Message-ID Thunderbird
Encoding=UTF-8
Exec=thunderbird -thunderlink %u
GenericName[en_US]=
GenericName=
Icon=thunderbird
MimeType=
Name[en_US]=Thunderlink Opener
Name=Thunderlink Opener
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=
X-MultipleArgs=false
mikehardy commented 4 years ago

Probably the gnome desktop lower-casing it. The email RFCs are apparently such that SMTP headers are supposed to be case insensitive, so thunderbird should theoretically be doing a case-insensitive search and this should work, but obviously not. You could take that up with them (couldn't hurt - it's this method, for what it's worth: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIMsgDatabase#getMsgHdrForMessageID.28.29)

Here's a link to all the available substitutions, you could try %k https://developer.gnome.org/integration-guide/stable/desktop-files.html.en#commandline

Not sure what else to do about this if you can get it to work successfully on the command line but not from the desktop handler, that's gnome :thinking:

tomatic commented 4 years ago

In my case it's KDE Plasma, but same difference ;) Thanks for the pointers.

It's probably an edge case. This particular sender apparently has weirdly configured hostnames which result in that uppercase part. But I"ll see if I can submit a bug report to the relevant project.