How to Disable Remote Content in Junk Mail Folders in the MacOS Mail App

I just spent a whole afternoon trying to figure out how to get the stock MacOS Mail app to show images automatically except in the Junk folder(s). I finally got it, so I’m sharing my results for anyone else who would benefit from this.

Note: this solution depends on the app Keyboard Maestro, which I use heavily in my daily workflow.

The Mail Preferences pane (under “Viewing”) gives the option to “Load remote content in messages” or not, regardless of the folder. (By default, it hides remote content, including images, in mail the app itself considers junk, but that is pretty limiting and will not play nicely with any external spam filtering.)

There did not appear to be any built in AppleScript support for changing this option without interacting with the preferences pane, but it turns out there is; it’s just not officially documented. The option is called download html attachments in AppleScript. So, all you need is a couple of if actions to figure out whether to toggle the setting and a few lines of AppleScript to toggle it when necessary.

Here’s my macro:

Note: one piece of this got cut off, namely the text in the second if condition. The text that got cut off is:

^(General|Accounts|Junk Mail|Fonts & Colors|Viewing|Composing|Signatures|Rules)$

This prevents the setting from changing just because you have the Preferences open.

I hope this helps somebody else! Feedback is welcome.

New Job – Quick Thoughts

As many of you know, I started a new job with the new year. Yesterday was my first day as a Senior Attorney in the litigation group of the law firm Morgan, Lewis & Bockius LLP. It was a great day, and I’m very excited about the work ahead. I will be doing two types of work: both representing clients in their litigation matters and developing software platforms to augment and streamline the practice of law. It’s a truly unique opportunity to combine two of my skill sets and passions, and I can’t wait to get started in earnest.

I will, of course, miss the outstanding justices and wonderful former colleagues at the First Court of Appeals. But all good things in this life must come to an end, and this next chapter promises to be a great one!

Cereblitz has LAUNCHED!

Cereblitz makes the first fully-customizable cart for customizable products

As you know if you have been reading this site, I have been working on Cereblitz, a first-of-its-kind e-commerce platform for selling custom and customizable products. I’m proud to announce that IT’S ALIVE! We have officially launched our platform!

Cereblitz makes the first fully-customizable cart for customizable products

As of right now, you can sign up to run your site on the Cereblitz platform. Plans start at $50/month. If you sign up for our email list today, I’ll give you a special discount that you can use to save 20% on a monthly plan or 40%on a yearly plan.

If you want to see the system in action, please check out SportAndSafety.com, a small business that Sarah and I have launched to sell sporting goods and safety products. You can also look at safeathand.com, a business that I helped found many years ago (and have since sold) and that now runs on the Cereblitz platform.

Don’t forget to bookmark the Cereblitz blog and follow us on your favorite social network:

Getting Started and Moving On

This is my first week running my new company, Cereblitz. So far, it has gone wonderfully. I’ve already had a couple of meetings with clients, and my ecommerce platform is close to launching.

If you haven’t already done so, please remember to sign up for our email list, follow @Cereblitz on Twitter, and like the Cereblitz page on Facebook.

Decorative Scales Of Justice In The Courtroom

One of the side-effects of this, of course, is that I have left legal practice behind. I started law school ten years ago, and started my first legal job exactly seven years ago today. And now, I am not practicing law at all. It’s a little surreal. On the other hand, I have been programming almost my entire life (since I was learning to read), and I was running a software development company before law school, so this is not really a second career. It’s more like a return to my first career.

Anyway, thanks for joining me on this thrilling, crazy ride. Please remember to sign up for my newsletter so I can keep you up to date on everything!

Leaving My Job and Starting a Business

Entrepreneur Name Tag Business Owner New Startup Company

As you may know, I gave my notice at the First Court of Appeals this week. I am leaving the practice of law in order to start a software company, Cereblitz!

Cereblitz makes the first fully-customizable cart for customizable products

I will be developing and marketing an ecommerce platform for selling customizable products, such as products that can be imprinted with text or logos or have other user specifications. I have mentioned the software before, but now I am going to be working on it full-time.

This platform is one-of-a-kind: there is nothing else out there that is available to small and medium-sized businesses for selling customizable products!

I need your help getting the word out! Please help me by doing at least one of the following:

 

How to Stop Random iPhone Vibrations

I had problems recently with my iPhone 6 vibrating randomly. I didn’t get any alerts, banners, or app icon badges that I could see, so it was driving me a little crazy.

It turns out there are two kinds of mail notifications. The first kind is under Settings > Notifications > Mail. The second, which causes these phantom vibrations, is under Settings > Sounds > New Mail. Head there and change “Vibration” to “None.”

h/t http://www.scottyloveless.com/blog/2014/how-to-stop-your-iphone-from-vibrating-randomly

Using SSL with MySQL

If you ever make remote connections to a MySQL database, it’s extremely important to connect over SSL. Otherwise, you run the risk of someone seeing data in transit, modifying data in transit, or, worst of all, stealing your credentials. This could be an utter disaster.

Unfortunately, getting MySQL to use SSL is kind of complicated. Here’s how to do it.

Make Sure SSL is Enabled

First, make sure your installation of MySQL supports SSL. Using PHPMyAdmin, a MySQL command-line prompt, or whatever you prefer, run this command:

You should get a result looking something like this:

If you see “DISABLED” next to “have_openssl” and “have_ssl”, great – that means that your copy of MySQL supports SSL. If you see “NO”, you need to recompile or reinstall MySQL. If you see “YES”, you’re already done!

Create SSL Certificates

Now, you need to create some SSL certificates. Go to wherever you want to store them (I’d suggest something like /home/mysql/certs ) and run the following commands:

Enter information as needed at the prompts. This will create self-signed client and server keys for you to use. The last two lines are very important! OpenSSL versions 1.0 and newer create keys in the PKCS #8 format, but MySQL expects them to be in the PKCS #1 format, so you have to run these commands to convert the keys we just created. You can read more about that problem in this Ask Ubuntu question: Enabling SSL in MySQL.

Tell MySQL to Use the Certificates

Edit your my.cnf file (probably at /etc/my.cnf) to include the following entries:

(If you used a directory other than /home/mysql/certs above, use it in the entries here.) If your my.cnf file already has mysqld and/or client sections, just add the appropriate entries to those sections.

Restart MySQL. The command varies by system, but will usually be something like service mysql restart .

Test It

Run this command again:

You should see something like this:

If so, congratulations! You’re done! If not, you might find the post Debugging MySQL SSL Problems on the Percona blog helpful.

Have you had problems with MySQL over SSL? Let me know in the comments! I’ll try to help you out!

Userscript for WebdesignerDepot.com Tweet Round-Ups

If you are at all into web design, you likely read WebDesignerDepot.com’s weekly post on their favorite tweets of the week. If not, you should.

If you do read that post, you will notice that only the fancy shortened-URL links are clickable; the images aren’t clickable. This was driving me a little crazy, so I spent about two minutes writing a userscript to make the images clickable.

If you aren’t familiar with userscripts, they are little bits of JavaScript that run in your browser. You need the GreaseMonkey extension for Firefox or the TamperMonkey extension for Chrome to run them. They can add a lot to your web browsing experience.

Here’s the script. You can install it by clicking here.

Free Website Security Certificates (a/k/a Free SSL Certificates)

If you have a website, you almost certainly need to secure it. Even for a simple WordPress blog like this one, security is a real problem; sites get hacked all the time, and even a site like this one can draw hundreds or thousands of hack attempts per day. Sometimes, it’s because hackers discover a new vulnerability. Usually, it’s an old one that just hasn’t been patched yet. But there’s more: hackers can steal your login info and take over your site just by monitoring your traffic over a wireless network, like in a typical coffee shop or airport.

The solution for this is to get a security certificate (commonly, but no longer correctly, known as an SSL certificate). Typically, these cost $100/year or more, depending on what you need. But there’s good news.

The free option for today is StartSSL.com, which will give you a very basic certificate for free. It still requires some technical know-how, but not much; whoever handles your website maintenance now should be able to handle it pretty easily.

It’s about to get a lot easier. In mid-2015, Let’s Encrypt is launching. Let’s Encrypt is a project of the Internet Security Research Group, which consists of some real heavy-hitters in the tech world: Mozilla, Akamai, Cisco, the EFF, and IdenTrust. It will allow you do secure a website with, basically, one click. For free.

So, cost is no longer a barrier to securing your website. Go do it!