Do you think it is even necessary to implement a plugin?
I thought it could be achieved in a much simpler way, by acting on the CSS, but I don't know what to change.
I am not a programmer, I believe that if there is no simple solution I will continue as I do now.
Fortunately there is a somewhat simple solution! You can use CSS to target the href of a link. The below example will replace the icon for any link that ends in .eml with another icon. This icon won't be correct for you, but I'm sure you can find the appropriate one. Good luck!
You could use title$= (the bit in the square brackets) instead of href$= but you will need a way to remove the default icon otherwise you will get two!!
The only way I can get this to happen is to not display the default icon for only "eml" titles and then add another one.
Looks clunky and probably could be done more efficiently
From what I can see Joplin knows it's an email file as it shows the link as type="message/rfc822" so I guess it just does not associate a specific icon with that type.
EDIT
I guess this means that a[type$="rfc822"] should work to select it as well...