<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 4 Nov 2017, at 17:10, Sam Hathaway wrote:</p>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">I’ve been thinking about whether there’d be an easy way for you to add conditional domain-based image loading, without doing a bunch of UI work for a feature that (admittedly) has limited appeal.</p>
</blockquote>
<p dir="auto">Thanks for the detailed idea.</p>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<ol>
<li value="2">If this is set, MailMate would run this program when displaying an HTML email. It would send the program each image URL on stdin, and expect to get back the strings <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">allow</code> or <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">deny</code>.</li>
</ol>
</blockquote>
<p dir="auto">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).</p>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">Everyone else could ignore this feature.</p>
<p dir="auto">What do you think?</p>
</blockquote>
<p dir="auto">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 <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">MmAllowedImageURLRegexp</code>. For example:</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">defaults write com.freron.MailMate MmAllowedImageURLRegexp -string "https://(freron\.com|example\.com)/.*"
</code></pre>
<p dir="auto">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 <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">MmDisallowedImageURLRegexp</code>. Let me know if you need that.</p>
<p dir="auto">-- <br>
Benny</p>
</div>
</div>
</body>
</html>