Add a Keyboard Shortcut to Mail’s Load Images Button

The Load Images button in Apple Mail on Mac OS X doesn’t have a keyboard shortcut, and there’s no easy way to add one. This is very annoying. This article shows how to add one, using AppleScript and FastScripts.

I like Apple Mail for Mac OS X, but one thing that irritates me to no end is that the Load Images button (Load Remote Content in Mac OS X 10.10), which loads the images in a message on-demand, doesn’t have a keyboard shortcut. Because it’s not a menu item, there’s no easy way to add one. I looked for a way to add a keystroke to Load Images for more than five years before I finally found a way to do it.

The hard part is triggering the Load Images button itself, by anything besides a mouse click. What finally did it was using the GUI Scripting feature of AppleScript to tell the button to click itself. Once I had an AppleScript that worked, it was simple to use FastScripts to trigger the script with a keyboard shortcut.

Why don’t I let Mail load images automatically? Spammers use image loading to confirm the validity of an email address. See this Apple Support Forum post for some details, and how to turn it off.

AppleScript to Load Images in Apple Mail

Download the Load Images script v1.11, 2021-12-14

The work of the script can be done by a single line that might look like this:

click button "Load Images" of 
    UI element 1 of row 1 of table 1 of scroll area 1 of front window

(Because Mail.app’s user interface has changed across various versions, and with different preference settings, the actual code is more complex. See the AppleScript for the full, ugly details.)

This user interface elements path, or specifier, tells the GUI Scripting system how to reach a specific user interface element, in this case a button, and what to do with it. It’s far from obvious how to determine one of these UI specifiers just by looking at a Mail window; I used the very interesting developer tool UI Browser to figure it out.

It’s also specific enough to be brittle; it has changed from prior versions of Apple Mail, and will probably change in the future. When it does this script will stop working and start beeping. I’ve written the script to adapt to a few different version and configuration possibilities, and I’ll try to update it if it ever breaks. The current version (v1.6) is compatible with Mac OS X 10.5 (“Tiger”) through Mac OS X 10.10 (“Yosemite”).

The rest of the script is error handling and AppleScript ceremony. It should make sense if you’re familiar with AppleScript, and there are plenty of comments, so I won’t describe it here.

Add a Keyboard Shortcut for Running the AppleScript

Adding a keyboard shortcut for an already-existing menu item is easily done using the Keyboard preference pane. Adding a keyboard shortcut for an AppleScript requires a third-party utility. You might already have a favorite–there are lots to choose from–and so do I. FastScripts from Red Sweater Software does a great job handling application-specific AppleScripts, and it’s free if you don’t need more than 10 keyboard shortcuts. (It’s also a good value at $14.95 for the unlimited version.)

Create the shortcut for the AppleScript

  1. Install and run FastScripts, and then switch to Mail.app.
  2. From the FastScripts menu, choose Open Mail Scripts folder.
    Open Mail Scripts folder menu item
  3. Move or copy the Load Images script into the Mail Scripts folder.
  4. From the FastScripts menu, choose Preferences…, click the Script Shortcuts tab, and add your preferred keyboard shortcut.
    Keyboard shortcut for Load Images AppleScript

Note: If you use the same keyboard shortcut I did, Command-Shift-L, you’ll need to change the keyboard shortcut for the existing menu command that uses it, by adding a new one to that command, using the technique at the Mactuts+ article linked above.

Corpus Reset

“SpamSieve”:http://c-command.com/spamsieve/, by far “the best anti-spam email tool I’ve used”:/blog/410, was “updated to version 2.3”:http://mjtsai.com/blog/2005/04/25/spamsieve-23/ yesterday. The biggest change listed was increased accuracy, due to improvements in the tokenizers and parsers. John Gruber reported that the “beta versions were running at 99.9% accuracy”:http://daringfireball.net/linked/2005/april#mon-25-spamsieve for him, which is several tenths of a percent above where I’d peaked.

When you get more than one thousand spams a week, you _live_ for a couple of tenths of a percent improvements. I of course upgraded immediately.

SpamSieve, by far the best anti-spam email tool I’ve used, was updated to version 2.3 yesterday. The biggest change listed was increased accuracy, due to improvements in the tokenizers and parsers. John Gruber reported that the beta versions were running at 99.9% accuracy for him, which is several tenths of a percent above where I’d peaked.

When you get more than one thousand spams a week, you live for improvements of a couple of tenths of a percent. I of course upgraded immediately.

Continue reading “Corpus Reset”

Anti-virus for Mozilla Thunderbird?

For many years, Rochelle used Netscape Communicator for her email. A little over a year ago, I switched her to Mozilla Thunderbird, which is the code and user-interface successor to Communicator. For the most part it works very well, but it has one astonishing omission: its anti-virus capabilities are terrible.

For many years, Rochelle used Netscape Communicator for her email. About a year and a half ago, I switched her to Mozilla Thunderbird, which is the code and user-interface successor to Communicator. For the most part it works very well, but it has one astonishing omission: its anti-virus capabilities are terrible.

This is all the more remarkable given their tagline (“Reclaim Your Inbox”), and the second sentence of their Why Use Thunderbird blurb: “We designed Thunderbird to prevent viruses and to stop junk mail so you can get back to reading your mail.” Thunderbird is positioned as the more user-centric, safer alternative to Microsoft Outlook.

Continue reading “Anti-virus for Mozilla Thunderbird?”

Comment Form Fakeout

When I converted this site to WordPress, I decided to turn on commenting, and see what happened. I have gotten a fair number of really good comments, and from people I didn’t know, which was cool. I also got a ton of comment spam (most of which never made it online). Not cool.

So I did a few things about it.

When I converted this site to WordPress, I decided to turn on commenting, and see what happened. I have gotten a fair number of really good comments, and from people I didn’t know, which was cool. I also got a ton of comment spam (most of which never made it online). Not cool.

So I did a few things about it.

Continue reading “Comment Form Fakeout”

Spam Counts for 2004

2004 was a big year for spam, after “Congress voted to make it legal”:http://www.spamhaus.org/position/CAN-SPAM_Act_2003.html at the end of 2003. The result: “spam increased sharply in 2004”:http://www.ecommercetimes.com/story/business/can-spam-act-40216.html. But in my own, more personal battles with spam I’ve been more successful at holding back the tide.

2004 was a big year for spam, after Congress voted to make it legal at the end of 2003. The result: spam increased sharply in 2004.

But in my own, more personal battles with spam I’ve been more successful at holding back the tide. My stats for 2004:

Filtered Mail

36278 Good Messages
72239 Spam Messages (67%)
197 Spam Messages Per Day

SpamSieve Accuracy

135 False Positives
451 False Negatives (77%)
99.5% Correct

Nearly seventy five thousand spam messages came at me, but thanks to SpamSieve a mere 451 made it into my Inbox. That’s less than two spams a day. Simply amazing.

Continue reading “Spam Counts for 2004”

How This Weblog is Run

As I have been working on this site, I’ve visited quite a few other weblogs run by WordPress, and occasionally see something that I’d like to know how to do myself. A little widget here, a list of related posts there, etc. Cool things, but nothing that says how to do them. So, if anyone ever has that thought about _my_ site, here’s the info. (Hopefully other WordPress users will do this for their sites.)

As I have been working on this site, I’ve visited quite a few other weblogs run by WordPress, and occasionally see something that I’d like to know how to do myself. A little widget here, a list of related posts there, a cool show/hide trick somewhere, etc. Cool things, but nothing that says how to do them. So, if anyone ever has that thought about my site, here’s the info. (This is really of interest to WordPress users only, but hopefully it’ll be useful, and other WordPress users will do the same.)

Continue reading “How This Weblog is Run”

Done Digging for a While

I spent a couple of hours yesterday working on a few last lingering details for this site. The main changes I wanted to make were to upgrade to the latest version of WordPress (a minor security update), make sure I was using the latest version of the Kubrick template (I was), and most importantly, fix the problems I was having with the Kubrick comments form.

I spent a couple of hours yesterday working on a few last lingering details for this site. The main changes I wanted to make were to upgrade to the latest version of WordPress (a minor security update), make sure I was using the latest version of the Kubrick template (I was), and most importantly, fix the problems I was having with the Kubrick comments form, which is a lot cleaner and nicer than the standard WordPress version.

Continue reading “Done Digging for a While”

Personal Survey of Anti-spam Tools

In the three or four years I’ve been fighting unwanted e-mail messages with better tools than the Delete key I’ve tried almost a dozen different tools. This is a quick survey of the ones I’ve used, and why I don’t (or do) still use them.

In the three or four years I’ve been fighting unwanted e-mail messages with better tools than the Delete key I’ve tried almost a dozen different tools. This is a quick (ha!) survey of the ones I’ve used, and why I don’t (or do) still use them.

My very first anti-spam tool was something called Mailfilter. I used it for my personal e-mail on Mac OS X, wrote about it here, and almost immediately afterwards lost a non-spam message to an aggressive keyword match. That was the end of Mailfilter. I can’t even remotely recommend it, as it’s just not intelligent enough (strict, single expression matching), and had zero safety net.

My next attempt at a solution was a utility called SpamFire. Like Mailfilter, it is a “pre-filter,” which means it would run before my e-mail client, download my mail, and skim out the spam. Unlike Mailfilter, it actually saved the trapped messages, so if it made a mistake, I could recover the message. It had plenty of other differences from Mailfilter, which I wrote about previously, and which made it so useful that it became the first anti-spam tool I paid for. But in the end I switched to a different tool because SpamFire was separate from my e-mail client, and that made it cumbersome to use.

Continue reading “Personal Survey of Anti-spam Tools”

Spam Counts for Q2

So, with the end of the first half of the year, I thought break my silence by taking another look at the level of spam flowing into my mailboxes, and how well my tools are coping with it.

So, with the end of the first half of the year, I thought break my silence by taking another look at the level of spam flowing into my mailboxes, and how well my tools are coping with it. First, here are the stats for Q2:

Filtered Mail

6674 Good Messages
16976 Spam Messages (72%)

SpamSieve Accuracy

52 False Positives
71 False Negatives (58%)
99.5% Correct

And here are the stats for the first half of the year:

Filtered Mail

20554 Good Messages
39595 Spam Messages (66%)

SpamSieve Accuracy

83 False Positives
270 False Negatives (76%)
99.4% Correct

You can review my previous post for the Q1 details, but the overall trends are:

  • SpamSieve increased its overall accuracy, but the number of false positives (legit messages marked as spam) went up, which is a bit troubling.
  • The actual amount of spam I received was down, but as a percentage of my mail stream, it was up. (This is because my legitimate mail traffic is down 50% after I unsubscribed from some mailing lists.)
  • 75% less spam reached my Inbox (71, vs 270 in Q1).

The overall reduction in spam traffic is encouraging, and proof that the pobox.com mail filters that I enabled at the end of Q1 are doing a tremendous job at rejecting spam coming to my oldest e-mail address.

The one really irritating new trend this past quarter, which doesn’t show up in the stats, is the number of bounces and anti-virus error messages hitting me. The alderete.com and aldosoft.com domains have been spoofed (forged) in a lot of spam and worm traffic, and because I have my domains “wild carded” to accept e-mail for “any-address [at] alderete.com”, the result is I get a lot of crap in my Inbox that is intended to let “pigxwnslesps [at] aldosoft.com” know that the crap didn’t go through.

So I’ve been compiling a list of the e-mail aliases I actually use (quite a lot because I use custom addresses with various vendors and web sites, so I can track who sells my address to spammers, turn off specific addresses, etc.), with the intent that I’ll enable those, and disable the wild cards. I hope to do that over the holiday weekend, and expect it to have almost as dramatic effect on crap coming in as the improved pobox.com spam filters.

Spam Count So Far This Year

With Q1-2004 coming to a close, I thought I’d take a look at my spam situation, which has been escalating out of control. Since 12:01am January 1, 2004 I have received 22,255 spam messages via e-mail. That’s more than 250 a day, every day, for the last 89 days. Earlier in the year, the daily average was lower, which means that in the last couple weeks it’s gone well above 250 per day. In spite of these numbers, I have two things that give me hope.

With Q1-2004 coming to a close, I thought I’d take a look at my spam situation, which has been escalating out of control. Since 12:01am January 1, 2004 I have received 22,255 spam messages via e-mail. That’s more than 250 a day, every day, for the last 89 days. Earlier in the year, the daily average was lower, which means that in the last couple weeks it’s gone well above 250 per day.

In spite of these numbers, I have two things that give me hope.

First, SpamSieve is an amazing anti-spam filter that integrates well with Eudora. It’s far more reliable than the built-in SpamWatch feature that debuted in Eudora 6, primarily in the area of false positives (real messages mistakenly filtered out):

Filtered Mail

13565 Good Messages
22255 Spam Messages (62%)

SpamSieve Accuracy

21 False Positives
197 False Negatives (90%)
99.4% Correct

SpamSieve is award-winning software for Mac OS X, and it integrates beautifully with both Eudora and Mailsmith, the two best e-mail clients for the platform. I am getting to the point where I trust SpamSieve enough to just purge filtered e-mail without reviewing it.

Without SpamSieve, I would be going insane because of spam.

The second thing I have on my side is that more than half of my spam comes to one e-mail address, the oldest e-mail address I still use. If I were able to kill it, it would instantly cut off more than half of the spam. But, it’s the first permanent e-mail address I ever got, using the excellent pobox.com mail forwarding service. I’ve had it for almost 15 years. Because it’s so old, I’m extremely reluctant to part with it — what if that’s the only address a long lost friend has?

Well, it looks like I can have my cake and eat it too. pobox.com just introduced new spam filtering controls and services, which are far more effective than the old filters that were enabled on my account. Last night I turned them on, and already the amount of spam coming into my pobox.com e-mail address has dropped to almost zero.

I wouldn’t exactly call this the turn of the tide, but it’s certainly encouraging. Because it’s my only hope to avoid having to look at 100,000 spam messages in 2004, which is where the growth curve points, if there isn’t change.

I’ll let you know how it’s looking when Q2 is over.

Save Me From the Bounces!

I have over the last two years implemented, I think, a dozen different anti-spam technologies to protect my Inbox. (I’ll total them up and summarize my thoughts in another post.) Today I finished implemented yet another, called SPF, or Sender Permitted From.

I have over the last two years implemented, I think, a dozen different anti-spam technologies to protect my Inbox. (I’ll total them up and summarize my thoughts in another post.) Today I finished implemented yet another, called SPF, or Sender Permitted From (now renamed to “Sender Policy Framework”).

The idea is, if my e-mail address is “michael a-t alderete.com”, then there are only a few servers on the internet that are likely, or permitted, to send e-mail for the alderete.com domain. When you receive an e-mail from that address or domain, if you knew which servers on the internet were legitimate senders, then you could reject messages from all other servers.

This is useful because it’s common practice by spammers to forge the From: header of their spam messages, and because they are almost never able to send those messages from the real server for the domain. (This is why bouncing spam back to the sender just makes the spam problem worse.)

I had incentive to do this because one of my e-mail address domains, alderete.com, has been forged heavily recently (though not quite Joe Jobed), with thousands of e-mails being sent out with forged from addresses like “Tammeravxryawwv [at] alderete.com” and “Glenniedatjklcjyknai [at] alderete.com”. When the spams bounce back, they come to my Inbox. Thousands of them.

Now, SPF isn’t a panacea for this problem, mostly because there has not been a lot of deployment of the technology yet. But that’s coming; AOL recently began trialing it, and if it’s successful I am sure the other big ISPs will do so soon.

When they do, I’ll be ready to reap the benefits.

Eudora 6 with SpamWatch

QUALCOMM’s Eudora has been my e-mail client of choice for nearly 10 years, and last week a major new version shipped, Eudora 6. My primary concern before upgrading was whether and how my other anti-spam tool, Spamnix, would work with the new version, especially with the new SpamWatch feature. I’m thrilled to report that Spamnix works fine with Eudora 6 (for Mac OS X), and that Spamnix + SpamWatch is more effective than either tool alone.

Note: Although still terrific tools, and in the case of SpamWatch free and built-in, I no longer use either Spamnix or Eudora’s SpamWatch, having found more effective tools. See my Personal Survey of Anti-Spam Tools for more details and recommendations.

QUALCOMM’s Eudora has been my e-mail client of choice for nearly 10 years, and last week a major new version shipped, Eudora 6. I’m usually of the “fools rush in” school of thought with regards to software updates, so I waited to see what people were saying about the upgrade (MacInTouch is a great resource for these “reader reports”).

But it’s been a week, and nary a peep. And with the amount of spam I receive continuing to grow, I really wanted to try the new SpamWatch feature. So, after doing multiple backups, I upgraded myself over the weekend.

My primary concern was whether and how my other anti-spam tool, Spamnix, would work with the new version, especially with the new SpamWatch feature. Unlike a lot of other third-party anti-spam tools, Spamnix is a Eudora plug-in, and so runs “in-process” (i.e., inside) with Eudora. [Update: SpamSieve 2 just shipped, and now also includes a Eudora plug-in. Very cool!] This makes it more efficient, but also (in theory) more susceptible to compatibility issues.

I’m happy, nay, thrilled to report that Spamnix works fine with Eudora 6 (for Mac OS X), and that Spamnix + SpamWatch is more effective than either tool alone.

I love the way that SpamWatch and Spamnix tag-team to combat spam. SpamWatch gets first crack, before other filters or plug-ins look at the message, and if the message’s score is over the spam threshold, it will be filtered into the Junk mailbox, with no further processing. (Qualcomm designed SpamWatch to run first, and you can’t change that.)

If a message doesn’t get caught by SpamWatch, then Spamnix takes a look at it, and if Spamnix decides it’s spam, it’ll go into Spamnix’s own spam folder (on my system named “_Spamnix”; note the initial space to influence sort order). These messages, nicely separated and usually all spam, are prime candidates for further training for SpamWatch.

I receive hundreds of spam messages a day, but after two tiers of spam filtering very little spam gets to my Inbox — so far only a couple a day, with very little training of SpamWatch yet. The few that have made it through have gone straight back to SpamWatch for training. :-)

What is fascinating about this process is the progress that SpamWatch has made, in less than 4 days of processing my mail. The first time I downloaded a sizeable batch of e-mail (more than 50 messages), most of the spam got through SpamWatch, and caught by Spamnix. After training SpamWatch with those messages, and then downloading another big batch a few hours later, the ratio went the other way: SpamWatch was now catching most spam before Spamnix got a chance to look at it.

I’m still glad to have both layers. Spamnix was extremely effective at catching my spam, prior to SpamWatch being added to the mix, and it’s still catching spam that SpamWatch is missing. So overall, I am doing better in my personal war against spam (though it’s important to remember that this is defensive action only).

About the only downside of introducing SpamWatch as a new layer of anti-spam defense is that right now it’s relatively untrained, and generating a larger number of false positives (non-spams filed in the Junk folder) than I’m used to. SpamWatch ships “pre-trained”, meaning it already has a database of spam words to run against, but this list is generic, not customized to my own e-mail traffic. So it’s not that surprising that some of Rochelle’s e-mails are getting tagged as spam. My previous experience with Bayesian filtering is that it rapidly adjusts as you correct its mistakes, so I’m confident the false positives will go down in a week or so.

At any rate, I’m quite happy with the new version, especially since I was still in my 12 month support period from my last upgrade, so version 6 was free. Recommended, even if you have to pay for it.