<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body><div style="font-family: sans-serif;"><div class="markdown" style="white-space: normal;">
<p dir="auto">On 3 Sep 2022, at 11:15, Randall Gellens wrote:</p>
</div><div class="plaintext" style="white-space: normal;"><blockquote style="margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777;"><p dir="auto">Is there any way to tell MM to download (and hence display inline) some of them, without downloading the others? E.g., perhaps I want to download and see the images from the CDN but not the buttons, and especially not the image from the suspicious-sounding "ktclick.com".</p>
</blockquote></div>
<div class="markdown" style="white-space: normal;">
<p dir="auto">Yes, there is, using the advanced preference <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">MmAllowedImageURLRegexp</code>.</p>
<p dir="auto">I’ve been using this for years to unblock benign remote images, so that I hardly ever feel the need to click the “Download” button. I have a script that maintains it for me (but I have to add the patterns manually). Here’s the script:</p>
<pre class="highlighted" style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw; color: black;"><code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;"><span style="color: #888888">#!/usr/bin/env perl</span>
<span style="color: #008800; font-weight: bold">use</span> <span style="color: #0e84b5; font-weight: bold">Modern::Perl</span>;
<span style="color: #008800; font-weight: bold">use</span> <span style="color: #0e84b5; font-weight: bold">autodie</span> <span style="background-color: #fff0f0">':all'</span>;
<span style="color: #008800; font-weight: bold">my</span> <span style="color: #996633">@pats</span> <span style="color: #333333">=</span> (
<span style="background-color: #fff0f0">'cid:'</span>,
<span style="background-color: #fff0f0">'https://([A-Za-z0-9-]+\.)?s3[A-Za-z0-9-]*\.amazonaws\.com/'</span>,
<span style="background-color: #fff0f0">'https://assets\.wildbit\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.google\.com/s2/favicons\?'</span>,
<span style="background-color: #fff0f0">'https://(images|links|www)\.mint\.com/'</span>,
<span style="color: #888888">#'https://github\.com/', # disabled because of /notifications/beacon/</span>
<span style="background-color: #fff0f0">'https://assets\.sk-static\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.zillow\.com/'</span>,
<span style="background-color: #fff0f0">'https://(www|photos)\.zillowstatic\.com/'</span>,
<span style="background-color: #fff0f0">'https://pumcgit\.prefutil\.local/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?googleusercontent\.com/'</span>,
<span style="background-color: #fff0f0">'https://gallery\.mailchimp\.com/'</span>,
<span style="background-color: #fff0f0">'https://cdn-images\.mailchimp\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.ups\.com/'</span>,
<span style="background-color: #fff0f0">'https://connect\.gardnermuseum\.org/'</span>,
<span style="background-color: #fff0f0">'https://media\.zipcar\.com/'</span>,
<span style="background-color: #fff0f0">'https://maps\.googleapis\.com/'</span>,
<span style="background-color: #fff0f0">'https://images\.craigslist\.org/'</span>,
<span style="background-color: #fff0f0">'https://home\.sophos\.com/'</span>,
<span style="background-color: #fff0f0">'https://media\.mlspin\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.cvs\.com/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?patreon\.com/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?patreonusercontent\.com/'</span>,
<span style="background-color: #fff0f0">'https://amherstcinema\.org/'</span>,
<span style="background-color: #fff0f0">'https://files\.constantcontact\.com/9c1b9ffb601/'</span>, <span style="color: #888888"># Amherst Cinema</span>
<span style="background-color: #fff0f0">'https://(cms|img)\.chewy\.com/'</span>,
<span style="background-color: #fff0f0">'https://chirp\.media\.chewy\.cloud/'</span>,
<span style="background-color: #fff0f0">'https://proxy\.harvestfiles\.com/'</span>,
<span style="background-color: #fff0f0">'https://samhathaway\.harvestapp\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.gardencinemas\.net/'</span>,
<span style="background-color: #fff0f0">'https://img\.cnmhstng\.com/'</span>,
<span style="background-color: #fff0f0">'https://d1a2o89e23clzw\.cloudfront\.net/emails/'</span>, <span style="color: #888888"># XConfessions</span>
<span style="background-color: #fff0f0">'https://cdn\.harrys\.com/'</span>,
<span style="background-color: #fff0f0">'https://cdn\.shopify\.com/'</span>,
<span style="background-color: #fff0f0">'https://cdn\.substack\.com/'</span>,
<span style="background-color: #fff0f0">'https://mcusercontent\.com/'</span>,
<span style="background-color: #fff0f0">'https://hilltownnetworks\.sonar\.software/'</span>,
<span style="background-color: #fff0f0">'https://f\.e\.walgreens\.com/i/'</span>,
<span style="background-color: #fff0f0">'https://mi\.walgreens\.com/p/'</span>,
<span style="background-color: #fff0f0">'https://www\.walgreens\.com/images/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?bcbits\.com/'</span>,
<span style="background-color: #fff0f0">'https://bandcamp\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.garnethill\.com/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?scene7\.com/'</span>,
<span style="background-color: #fff0f0">'https://static\.cdn\.responsys\.net/i2/responsysimages/quicken/'</span>,
<span style="background-color: #fff0f0">'https://endeavorexperiences\.com/'</span>,
<span style="background-color: #fff0f0">'https://image\.email\.bofi\.com/'</span>,
<span style="background-color: #fff0f0">'https://services\.google\.com/fh/files/emails/'</span>,
<span style="background-color: #fff0f0">'https://fonts\.gstatic\.com/s/i/googlematerialicons/'</span>,
<span style="background-color: #fff0f0">'https://materials\.proxyvote\.com/Approved/IMAGES/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?walmartimages\.com/'</span>,
<span style="background-color: #fff0f0">'https://(?:[A-Za-z0-9-]+\.)?mjt.lu/'</span>,
<span style="background-color: #fff0f0">'https://billpay\.schwab\.com/'</span>,
<span style="background-color: #fff0f0">'https://cdn\.platinumcloud\.io/'</span>,
<span style="background-color: #fff0f0">'https://d3k81ch9hvuctc\.cloudfront\.net/'</span>, <span style="color: #888888"># Simplehuman</span>
<span style="background-color: #fff0f0">'https://media\.wordfly\.com/isabellastewartgardnermuseum/'</span>,
<span style="background-color: #fff0f0">'https://www\.etsy\.com/images/email/'</span>,
<span style="background-color: #fff0f0">'https://img\d*\.etsystatic\.com/'</span>,
<span style="background-color: #fff0f0">'https://i\.etsystatic\.com/'</span>,
<span style="background-color: #fff0f0">'https://cascade\.madmimi\.com/'</span>, <span style="color: #888888"># Gonzalez and Associates</span>
<span style="background-color: #fff0f0">'https://d1lggihq2bt4jo\.cloudfront\.net/'</span>, <span style="color: #888888"># Gonzalez and Associates</span>
<span style="background-color: #fff0f0">'https://www\.dreamwidth\.org/img/'</span>,
<span style="background-color: #fff0f0">'https://github\.githubassets\.com/'</span>,
<span style="background-color: #fff0f0">'https://www\.fastmail\.com/images/emailtemplates/'</span>,
<span style="background-color: #fff0f0">'https://www\.chase\.com/content/dam/chaseonline/en/alerts/images/'</span>,
<span style="background-color: #fff0f0">'https://static1\.squarespace\.com/static/'</span>,
<span style="background-color: #fff0f0">'https://image\.e-mail\.amtrak\.com/'</span>,
<span style="background-color: #fff0f0">'https://images\.ctfassets\.net/'</span>,
<span style="background-color: #fff0f0">'https://d15k2d11r6t6rl\.cloudfront\.net/'</span>, <span style="color: #888888"># Plex</span>
<span style="background-color: #fff0f0">'https://media\.sailthru\.com/'</span>,
<span style="background-color: #fff0f0">'http://image\.sfmc\.petfinder\.com/'</span>,
<span style="background-color: #fff0f0">'https://image\.email\.ticketmaster\.com/'</span>,
<span style="background-color: #fff0f0">'https://t\.vitacost\.com/images/'</span>,
<span style="background-color: #fff0f0">'https://static\.airtable\.com/'</span>,
<span style="background-color: #fff0f0">'https://live\.staticflickr\.com/'</span>,
<span style="background-color: #fff0f0">'https://combo\.staticflickr\.com/'</span>,
<span style="background-color: #fff0f0">'https://bbeditbeta\.slack\.com/'</span>,
<span style="background-color: #fff0f0">'https://secure\.gravatar\.com/avatar/'</span>,
<span style="background-color: #fff0f0">'https://[A-Za-z0-9-]+\.slack-edge\.com/'</span>,
<span style="background-color: #fff0f0">'https://static\.xx\.fbcdn.net/'</span>,
<span style="background-color: #fff0f0">'https://scontent\.xx\.fbcdn\.net/'</span>,
<span style="background-color: #fff0f0">'https://www\.paypalobjects\.com/'</span>,
<span style="background-color: #fff0f0">'https://p\.ebaystatic\.com/'</span>,
<span style="background-color: #fff0f0">'https://i\.ebayimg\.com/'</span>,
<span style="background-color: #fff0f0">'https://rxhealthalerts\.com/[^/]+.png'</span>,
<span style="background-color: #fff0f0">'https://www\.chase\.com/content/dam/email/images/'</span>,
<span style="background-color: #fff0f0">'https://static\.chasecdn\.com/content/services/rendition/'</span>,
<span style="background-color: #fff0f0">'https://image\.link\.hellofresh\.com/lib/'</span>,
<span style="background-color: #fff0f0">'https://cdn\.hellofresh\.com/'</span>,
<span style="background-color: #fff0f0">'https?://mi\.hellofresh\.com/'</span>,
<span style="background-color: #fff0f0">'https://cash-s\.squarecdn\.com/static/'</span>,
<span style="background-color: #fff0f0">'https?://www\.ti\.com/content/dam/tinews/images/'</span>,
<span style="background-color: #fff0f0">'https?://www\.ti\.com/webemail/graphics/'</span>,
<span style="background-color: #fff0f0">'https://www\.ti\.com/graphics/'</span>,
<span style="background-color: #fff0f0">'https://images\.marketing\.ti\.com/EloquaImages/clients/TXInstruments/'</span>,
<span style="background-color: #fff0f0">'https://image\.email\.schwab\.com/'</span>,
<span style="background-color: #fff0f0">'https://images\.sk-static\.com/images/'</span>,
<span style="background-color: #fff0f0">'http://ordermanager\.spalding-labs\.com/themes/images/email_template/'</span>,
<span style="background-color: #fff0f0">'https://updates\.mailmate-app\.com/icons/'</span>,
);
<span style="color: #008800; font-weight: bold">my</span> <span style="color: #996633">$pat</span> <span style="color: #333333">=</span> <span style="background-color: #fff0f0">'('</span> <span style="color: #333333">.</span> <span style="color: #007020">join</span>(<span style="background-color: #fff0f0">'|'</span>, <span style="color: #996633">@pats</span>) <span style="color: #333333">.</span> <span style="background-color: #fff0f0">').*'</span>;
<span style="color: #007020">system</span> <span style="background-color: #fff0f0">"/usr/bin/defaults"</span>, <span style="background-color: #fff0f0">"write"</span>, <span style="background-color: #fff0f0">"com.freron.MailMate"</span>,
<span style="background-color: #fff0f0">"MmAllowedImageURLRegexp"</span>, <span style="background-color: #fff0f0">"-string"</span>, <span style="color: #996633">$pat</span>;
</code></pre>
<p dir="auto">I edit the script in BBEdit (usually to add a pattern to <code style="margin: 0 0; padding: 0 0.25em; border-radius: 3px; background-color: #F7F7F7;">@pats</code>), save, and then use #! → Run to actually update the plist.<br>
-sam</p>
</div>
</div>
</body>
</html>