On 6 Nov 2017, at 5:13, Benny Kjær Nielsen wrote:
Thanks for the detailed idea.
Thanks for considering it!
I'm thinking it might be a performance issue to call a script for
every image (there can be a lot of them in a single email).
I was thinking you’d invoke the script once for each email, at display
time. Does that change things for you? The process on your side would
look something like:
```
on display_html_email:
proc = run(uri_approver)
for image in remote_images:
proc.write(image)
result = proc.read()
if result is 'allow':
display(image)
proc.end()
```
It might be nice with a more flexible solution, but if all you want is
a regular expression to allow certain images then I already
implemented `MmAllowedImageURLRegexp`. For example:
defaults write com.freron.MailMate MmAllowedImageURLRegexp -string
"https://(freron\.com|example\.com)/.*"
Hmm, it appears I've “forgotten” to document this. Maybe because I
didn't really finish this feature. I would have liked to also handle a
`MmDisallowedImageURLRegexp`. Let me know if you need that.
Hey, that’s great. It means I’ll have to deal with a long, ugly
regular expression, but I can tolerate that I think. I don’t think I
need a deny pattern, since deny is MailMate’s default.
Thanks a lot!
-sam
_______________________________________________
mailmate mailing list
mailmate@lists.freron.com
https://lists.freron.com/listinfo/mailmate