off by one for 2007 February

<M <Y
Y> M>

Thu Feb 01 10:39:06 PST another one from spamblock:

It is trivially easy to block attachments by extension with postfix. This is nothing earth shattering, and people have been doing this for years, but pretty much everyone running postfix should be doing this. And it's so easy that you have no excuse.

Step 1: Create a file header_checks in your /etc/postfix directory. In that file, put a line like this:

/^content-(type|disposition):.*name *=.*\.(exe|pif|com|scr|bat)/ REJECT We cannot accept executable attachments

... run postmap on that file to create header_checks.db.

Step 2: Edit main.cf and add a line like this:

header_checks = regexp:/etc/postfix/header_checks

... restart postfix.

Step 3: PROFIT!!!

Seriously, that's it. You can also use a pcre instead of a regexp by using the postfix-pcre package (in Debian/Ubuntu), and changing "regexp" to "pcre" in the main.cf line.

Originally from here... but their regexp has a bug in it.

[Comments] (1) Wed Feb 21 00:03:16 PST explaining finite automata -- without sounding CrAzY!:

So, while I'll never be a "theory guy," I have really been enjoying my Automata / Complexity class. I think it's fascinating stuff that not only says a lot about computers, but fundamentally says something about how logic and reality function.

Unfortunately, my fascination with the material isn't something I can easily share with anyone, because... where do you even begin? When I try to explain it, why it's interesting, why it's hard, why it's important, I fail miserably, and usually sound like the guy ranting down on the corner with the hand-lettered sandwich board. "It's like tiny little machines, with arrows! Every thing is a tiny machine on a piece of paper with finite memory! 12 Galaxies!"

How would YOU explain Automata to someone who has no idea what they are or why they matter? Bonus points for explaining the concept of state machines without a pen and paper!

Thu Feb 22 10:50:06 PST the 56 hour challenge:

In the spirit of SHATTERED and SUPER SIZE ME and THAT GIRL WHO ONLY ATE CARROTS FOR A WEEK and other great Internet "let me do something weird to my body and blog about it to the world" I bring you, THE 56 HOUR CHALLENGE.

YES, I, Peter Peterson am going to try and get 8 HOURS OF SLEEP A NIGHT FOR A WEEK -- a feat I have been unable to perform since I last had a bedtime!

DAY 1:

I got 8 hours of sleep last night, so far so good. I haven't started hallucinating or turning funny colors yet, so it seems like everything's ok. If I start going crazy later this week, please call a doctor!

T Fri Feb 23 09:18:03 the 56 hour challenege: DAY 2:

It's Day 2, and last night I got 9.5 hours of sleep. I know... it's shocking and disturbing. I feel pretty good -- much better than yesterday morning. Maybe my body is starting to adjust to this excessive amount of sleep. We'll see. I've only been up for a little while, so who knows what weird effects will happen to me throughout the day (like, maybe I'll be UNABLE to SLEEP in CLASS!)... I'll keep you posted.


[Main]

Unless otherwise noted, all content licensed by Peter A. H. Peterson
under a Creative Commons License.