All posts by Mark

Reddit – This time not as a dirty word

This summer I found an article that finally describes what reddit can be in terms many people can understand. I’ve been nervous about sharing that I even like reddit because of all the common negative associations people have about it (some of them in the intro to this article:)

http://www.slate.com/articles/double_x/doublex/2015/07/reddit_as_feminist_utopia_what_the_front_page_of_the_internet_looks_like.single.html

Long story short, reddit is what you make of it. Do not visit the main page and assume that’s all there is, because it’s mostly trash. The linked author made her reddit a feminist (&reading!) utopia. Mine is a mix of so many areas, here’s a sampling.
https://www.reddit.com/r/yesyesyesno/
https://www.reddit.com/r/nonononoyes/
https://www.reddit.com/r/LaserCleaningPorn/
https://www.reddit.com/r/cableporn/
https://www.reddit.com/r/BuyItForLife/
https://www.reddit.com/r/BBQ/
https://www.reddit.com/r/sysadmin/
https://www.reddit.com/r/TalesFromRetail/
https://www.reddit.com/r/TrueReddit/
https://www.reddit.com/r/AskEngineers/
https://www.reddit.com/r/askscience/
https://www.reddit.com/r/changemyview

Unless you get all fancy-pants you’ve got to make an account to start customizing, but A) they never spam you, B) it doesn’t cost anything and, C) there’s really very little information to sell (they don’t do that either afaik.) There’s no obligation to post links or even comment.

My only lingering doubt in sharing this information is that having new information that’s customized to you is quite addicting. Not like Facebook where you’re the product and they decide what you should see, you get to decide – and have a say, if voting floats your boat.

Firefox Profiles

So you might know that /Applications/Firefox.app/Contents/MacOS/firefox-bin --ProfileManager will launch Firefox’s profile manager. Ran into a bit of a surprise when I couldn’t get the profile manager to open, even by deleting profiles/prefs and caches (using Maintenance.app) plus doing other normal fixes.

Despite Terminal reporting “Error: Access was denied while trying to open files in your profile directory.” the actual problem was the Caches directory in ~/Library/Caches – instead of the client’s short username, root owned the Caches folder. Really surprised this guy wasn’t having more issues.

Thought I’d post this here in case someone else runs into what seems to be a profile folder problem but can’t fix it through the usual Firefox-specific methods. In case that doesn’t tell you all you need to know, check this link for more details, specifically the part surrounding the command you’ll use to fix it which I’ll quote here in case it helps:
sudo chown -R `id -un`:`id -gn` ~/Library/Caches
Please note I haven’t tested that on Yosemite 10.10.5 but the code doesn’t look tricky so it should work fine. It’s just a basic chown command with a couple nested commands that insert your specific username and groupname into the main command. Email me at firefoxprofiles at this domain name if you have questions!

Genesis

Got a new car today, woot!!! It’s a 2015 Hyundai Genesis 3.8 AWD w/Tech package. I’ve been lusting after this car pretty much since it was released. It’s got pretty much every feature you can think of.

I love that from my last Genesis to this one, they took pretty much every suggestion I had and made them a reality on the new car, except one. Now I’m not nearly arrogant enough to believe I caused these things, but even if my comments helped just a teensy weensy amount I’m happy. Even if no one saw them, they still ended up in a very good place. There’s nothing quite like this vehicle for the money. Believe me, I looked hard!

Today, I am one unbelievably happy dude.

Server-side Mail Rules in OS X Server

Recently transitioned from 10.7.5 Server to 10.9.4 Server.  Apple dumped webmail in Mountain Lion Server so of course it’s gone in Mavericks Server too.  With webmail gone there’s no way to implement filtering with a GUI at the server level anymore.

With the combination of push email and loads of scripts emailing me at all hours, I found even configuring the rules in Mail.app on the server itself wasn’t fast enough to prevent my phone from buzzing before the message was filed away (in the next second or two.)

I found tidbits all over the place but no comprehensive guide to configuring sieve in OS X Server (on Mavericks or ML.)  I don’t know that this is comprehensive, but it’s more than I found.  This is written assuming you’re at least a little comfortable on the command line.

Find your unique mail ID.
I just headed to /Library/Server/Mail/Data/mail/ and looked for the most recently modified folder since I’m by far the most active user on my server.  You can also check the folder hierachy within it to see if those folders look like yours.

The safer way is to head to Server.app, open Directory Utility, switch to Directory Editor, make sure you’re in the right node (either /Local/Default for local users or /LDAPv3/127.0.0.1 for Open Directory users) and then select the user.  The GeneratedUID is the value you’re looking for and looks like this: 704751C3-6F9D-4A10-8CA9-04E34CBA5B3C.  I’m going to call this $USER_GUID.

Create Rules folder and sieve file

Fire up TextEdit.app, grab this text below, customize with your GUID value, then copy and paste the lines beginning with sudo into Terminal, one by one.  Make sure there are no line breaks for the four lines that begin with “sudo” or the commands will not work.  Here is a text version of it.
sudo mkdir -p /Library/Server/Mail/Data/rules/$USER_GUID
sudo chmod 775 /Library/Server/Mail/Data/rules/$USER_GUID
sudo nano /Library/Server/Mail/Data/rules/$USER_GUID/dovecot.sieve
(just type #replaceme for now, control+x, y, then return)
sudo chown -R _dovecot /Library/Server/Mail/Data/rules/$USER_GUID

Now comes the fun part, creating the rules. 

The link below contains several examples in a format that will work directly in dovecot.sieve, with modifications for your rules and mailboxes of course.

There are far more advanced ways to edit the dovecot.sieve file, but for really basic usage you can use the line beginning with “sudo nano …” above and then either edit directly, or edit in something with a friendly GUI like TextWrangler and then copy and paste into dovecot.sieve.  Just hold down control+K to delete the file line by line then paste from your editor.  Yes this will make your average command line geek cringe, but it’s quite straightforward.

Click on this text for dovecot sieve examples.

I provide all of these rules to provide examples of what you can do.  For what it’s worth I use one domain with a catch-all address, that way I can give companyname@mydomain.com email addresses out.  If/when the address gets compromised I can block that exact email address (which is sometimes buried in the headers instead of in the To field.)  This has happened at several small companies, and more recently Adobe, XM, and Toyota.

More examples can be found on the Dovecot LDA/Sieve page here: http://wiki1.dovecot.org/LDA/Sieve

As soon as you save the dovecot.sieve file the rules are in effect.  If you run a test and it’s not working (and I do recommend testing with just one rule before implementing everything!) you’ll see dovecot.sieve.log right next to dovecot.sieve in /Library/Server/Mail/Data/rules/$USER_GUID/ telling you in fairly plain english (at least for a program) what you did wrong.  Probably the easiest error to make would be leaving out a comma in one of the multiple rules, or adding an extra one on the last/only one.

If I’ve made an error or helped you out, I’d love to hear about it.  Please email me at dovecot@ this domain name (without the www.)  Thanks!