Free time guilt

Blog

StickersI fairly much have the day off. I don't have any work projects that require I actively work on them. I don't have any upcoming talks I should be practicing. I don't have any pressing items on my gigantic to-do list. I don't have any emergency client task to finish, no not-so-emergency client task to finish, no documentation that needs writing, no proposal that needs pondering.

I can pretty much do anything I want today, including sleeping until noon, getting drunk by 12:30, or making myself an early birthday cake. I can write a book, compose a song, build something with my new raspberry pi, clean out my crap, scan my paperwork, watch a bad movie, or read a book.

I can do any of these things.

So why do I feel guilty when I'm not working, not being productive?

Why do I have that clenching, sinking feeling in my gut that I'm doing something wrong by not working?

Guilty is the best word to describe the feelings. Maybe it's not guilt, maybe it's the lingering feeling that I need to be productive and not being productive is just discomfort. Maybe the feelings are that *thing* I need to create, just itching to break free and be created. Maybe the feelings are indigestion that happened to occur just as I'm not being productive.

Why do I equate idleness with laziness and think both are bad? Idleness can be necessary for recovery. Laziness doesn't always mean sloth, it can also mean efficient. One doesn't need to be, and realistically can't be, always on, always working, always doing. I'm idle in ways I probably don't recognize, but choosing to be idle is a difficult concept for me.

So, today's journey outside of my comfort zone, my adventure of the day, is to relax, and just be. I'm going to Michaels and buying some stickers. I'm going to Starbucks and having a short chai latte, soy, no water, extra hot. I'm going to the park with a book, sitting down in the shade, and reading for a while. I'm going to watch one of the soccer games on today, and maybe pay attention. I'm going to cook a lovely dinner, and enjoy it as I eat it slowly.

I'm going to enjoy relaxing, dammit.

RIP Troggie

Blog

Years ago, when I started travelling a lot (for talks and for fun), Mom handed me a small green frog, named her Troggie, and asked me to keep her with me when I travel. Troggie has been a constant companion, hanging out in the lower small pocket of my blue backpack, coming out and having her picture taken when we were in spectacular locations.

She's been to New Zealand with me. She's been to Tanzania with me. She's been to Zanzibar with me. She's been to Portland with me. She's been to Canada with me. She went to Twitter with me. She's been to Ireland with me. She's been to Indiana with me. She's been to Brooklyn with me. She's been to Phoenix with me. She's gone on a cross-country trip with me and my brother. She's been to Australia with me. She's been to Argentina with me, in an attempt to visit Antarctica.

Aaaaaaaand, she's been to Scotland with me.

This is my last photo of Troggie. She was posing with the Edinburgh Castle in the background.

Troggie in Edinburgh

I took pictures of Troggie in all of these places, sending them to Mom. Some of the pictures were amusing (in the palm of the outstretched hand of a statue of a famous dignitary is one of my favorites), most were just Troggie.

Two weeks ago, Troggie hitched a ride in a jacket pocket, then snuck out when I was walking back to my hotel before Scotch on the Rocks, in Edinburgh. I kept hoping she'd turn up, once I noticed her missing. I hoped she had snuck back into one of my bags when I wasn't looking. Today, I admitted defeat.

She's gone.

I am le sad. I hope she's having a good time in Edinburgh, and that the next person who hangs out with her goes on a large number of adventures with her, too.

Yes, please, feel free

Blog

I swear, the 4th most famous last words are, "How hard can it be?"

When I read something like this (go ahead, read the whole post):

"The conference was a joke. You're a ridiculous outfit and I could do a better job in a fraction of the time and cost."

I have to take a deep breath, look down, shake my head, look up, and either burst into laughter or attempt to suppress that laughter. I have to do these things, because the only people who could possibly say these words are the people who HAVE NEVER DONE IT (where IT is defined at organizing and coordinating whatever the organized event is).

When I was running SBUL and MPUL, people would complain about this or that, about how unbalanced the teams were, about how I wouldn't let the teams play when the ground was too wet, about how the bathrooms weren't open or the lights were turned off too early, about how much the league cost, or about I don't know, pick something. Yes, the leagues were balanced on paper but life/injuries/sandbagging happens, we'd lose the fields forever if we played on them when they were wet, the bathrooms were open you went to the wrong ones, the lights went off exactly on schedule, and yes, field maintenance costs money, suck it up. No bit of logic would dissuade these people from complaining to a bunch of volunteers who spent their time helping CREATE SOMETHING THAT DIDN'T EXIST BEFORE, and existed because they wanted it to exist.

Fast forward to Hacker Dojo. Now THERE was a lesson in how many different ways I can keep a smile on my face while people complain about things that really didn't matter much in the grand scheme of things, all while getting kicked in the teeth in the end. Or Ignite Silicon Valley where a woman complained that the free-for-her event that I paid for and was organizing WASN'T SERVING DINNER.

The people who complained were invariably the people who have never managed an event, never created something from nothing for others because they wanted that something to exist, never been on the receiving end of two hundred people all asking for "one small thing, it shouldn't take long." They had never walked that mile in the organizers shoes, never understood death by a thousand cuts.

So, when I read something like the quote above, I see myself standing like Kris, one hand on my hip, the other hand on the bill of my baseball hat, looking down as I push the hat up and rub my forehead with the back of that upper hand, shaking my head slightly, a smirking grimace on my face. I see myself putting my hat back on my head, looking up, and echoing Andy Allan's words, "All I can say to you is please, feel free."

Postfix check_recipient_access with MySQL

Blog

Having a list of rejecting email addresses in a DB table makes adding them easy (add via command line insert, add via script, add via email trigger, add via desktop SQL app like Sequel Pro, add via web app), removing the need for root access to edit configuration files and restart the postfix process that may happen when hashed files are used.

This is what I did, without a list of why I did it, or how I ended up with this particular solution:

In my /etc/postfix/main.cf file, I have this entry in my list of smtpd_recipient_restrictions values:

  check_recipient_access mysql:/etc/postfix/mysql-virtual-recipient-access.cf

This says, check the recipient address by executing the SQL query specified in /etc/postfix/mysql-virtual-recipient-access.cf using the mysql credentials in the same file.

My whole smtpd_recipient_restrictions section looks like, this, but your mileage will vary:

smtpd_recipient_restrictions =
  permit_sasl_authenticated,
  permit_mynetworks,
  reject_unauth_destination,
  reject_unknown_sender_domain
  reject_invalid_hostname,
  reject_non_fqdn_hostname,
  reject_unknown_recipient_domain,
  reject_unknown_helo_hostname,
  check_recipient_access mysql:/etc/postfix/mysql-virtual-recipient-access.cf

For the mysql query to work, I needed my table. I created my mysql table with this command:

CREATE TABLE `virtual_sender_access` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(256) NOT NULL DEFAULT '',
  `access` varchar(128) NOT NULL DEFAULT '',
  `created_on` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

Where the fields are id to track unique entries, source is the email address (using the conventions from other tables that are defined in a whole bunch of tutorials for the virtual domains, aliases, and users), access is what I'm going to do with the email address: deliver it, reject it, drop it, etc. as allowed in the access(5) values on http://www.postfix.org/access.5.html.

I nearly always use created_on and last_modified in my tables, as a way to track changes. You can totally leave those out if you don't care about them or have a different logging mechanism.

I have the table, I have the configuration, now the query.

In my mysql-virtual-recipient-access.cf, I have this:

user = lookupuser
password = *********************
hosts = 127.0.0.1
dbname = postfix
query = SELECT access FROM virtual_sender_access WHERE source='%s'

Now, all of this you likely could have gotten from the other tutorials around the web. The problem I had when setting this thing up with my mail server was *what do I put IN the database table*?

Right.

Put in this to reject an address:

INSERT INTO virtual_sender_access (source, access, created_on) VALUES ('reject@example.io', 'REJECT', NOW());

Put in this to accept an address and deliver it:

INSERT INTO virtual_sender_access (source, access, created_on) VALUES ('accept@example.io', 'OK', NOW());

Follow along with the other tutorials for the rest of the configuration, restart your postfix server with something like "service postfix restart" and check your queries and tables are all setup correctly. I tested by sending email to an address I wanted rejected, as listed in my virtual_sender_access with a REJECT code, and watching it be rejected. I then sent an email to an address NOT listed in the table, and it was delivered. I considered this a success. I would not recommend that as the correct way to test if a system is working.

Apache config for redirect from www to just domain

Blog

You can use a VirtualHost directive to redirect from www.example.com to example.com at the Apache level

# redirect www to no-host
<VirtualHost *:80>
  ServerName www.example.io
  Redirect permanent / http://example.io
</VirtualHost>

# redirect SSL www to no-host
<VirtualHost *:443>
  ServerName www.example.io
  Redirect permanent / https://example.io
</VirtualHost>

That second one will likely fail unless you have the SNI (Server Name Indication) TLS extension on your server.

Then, include the rest of your Apache configuration as normal:

<VirtualHost *:80>
  ServerName example.io
  ServerAdmin hello@example.io
  DocumentRoot /var/www/example.io/html/
  ErrorDocument 404 /404.html
  ErrorDocument 403 /403.html
  ...
</VirtualHost>
...

Pages