Category Archives: Uncategorized

Stranger – Chapter 7 – Anything can be a monster with the right type of imagination

So my wife and I have divided chores in our household in certain categories. Some chores she will take care of and do it however she pleases, and some I will. Others we will both take whenever there is time. One chore my wife is responsible for is taking the laundry, this includes folding the clothes. However, when she folds the clothes, she places them on the bed. Then we are both responsible for taking our own folded clothes to where we store them (we currently store them separately for no specific reason, it just became like that). We are both lazy in our own ways, and I’m lazy when it comes to putting away my clothes once they have been folded. Thus, they end up spread out around my side of the bed. Currently, one pile is laying on the air conditioning unit next to my bed, and another one on the windowsill next to my bed.

A few nights ago Stranger was on watch as usual, when he suddenly detected something straight out of a horror movie. Between the folded clothes on the windowsill, were red glowing eyes. There were hundreds of them, and they were staring right at us, ready to attack. This of course required immediate evacuation. Stranger acted without hesitation and grabbed the cover, and then swiftly made his way out on the balcony. Standing out there, I woke up, and Stranger let go of the controls. I knew what had happened, but the feeling of being confused and terribly frightened had me standing out there for a few minutes before I could go back inside. I double checked the clothes so that nothing was hiding under them, and then went back to sleep.

Next to the clothes is a pile of socks I’ve been picking from every morning when I’m about to take my morning shower. Last night Stranger sensed a disturbance in the force coming from the pile of socks. His instincts are as always, 100% correct and the socks had turned into snakes! He quickly leaped into battle against the overwhelming number of foes (I have a lot of socks, and change daily, sometimes twice a day depending on what I do during the day). It was a long and hard battle, but I never doubted Strangers abilities and he obviously managed to take care of the threat.

When I woke up the traces of the battle were still there in plain sight. My first thought was that I might need to call a medic to the scene, but there were clearly no survivors. There were socks spread out literally everywhere in the room (I even had one tucked up in my armpit).

Stranger triumphs, yet again.

Thanks Stranger!

Stranger – Chapter 5 – Farmville

Rough night. Stranger went up at least five times to drink water for no apparent reason (I doubt he was thirsty every single time). Then at one point he noticed an evil tractor in one of the bedroom corners with its engine on. So to make it turn off he threw my pillow at it, which I then woke up to find was missing a while later (and had to go fetch). Turns out it was the air conditioner unit, and not an evil tractor. Easy mistake to make in the dark I guess.

Installing Postfix and Courier with MySQL and SASL on Debian 7

I recently had to move to a new server and had some troube getting Postfix and Courier to work as I wanted. The tutorial I used to follow a bunch of years ago is gone and the tutorials I found were either outdated, wrong or didn’t do it my way. So with some inspiration from other tutorials including the old one I used to have, I have written my own modified version.

Step 1: Prepare your certificate now as you will be using it later
If you don’t already have one you can get one for free at StartSSL
This tutorial wont cover the steps at StartSSL as there are other documents for that.

Files that you will need:

– yourcert.crt
– yourprivatekey.key (in a decrypted state for server purpose)
– ca.pem

Place them in a folder like /etc/ssl/StartCom/year-month-day
For example, I use /etc/ssl/StartCom/2015-08-10 since that is the expiration date for one of my certs.
When the files have been placed there you need to do the following:

This is because Courier wants it in a pem file later, while Postfix wants them separated.
There might be a way to keep it consistent but I haven’t checked.

Also remember to set permissions to this folder!

Your private key is in there and you need to protect it.

Step 2: Install required software

Step 3: Setup MySQL database

Step 4: Configure postfix

Create these files below and paste the content that follows.
Remember to replace the user and password with whatever you chose before.

Change permissions of the files

Create user vmail

Set options in the Postfix configuration file.
Replace with a FQDN of your server.
Also replace the cert and key file with the cert and key file in your StartCom folder.
For example instead of /etc/postfix/smtpd.cert you write /etc/ssl/StartCom/2015-08-10/yourcert.crt

Now open /etc/postfix/ and uncomment the following section.
The format of these lines are important so only remove the comment characters (#) and nothing else.

Step 5: Configure Saslauthd

Create a folder for saslauthd

Open the following file.
Set START to yes and change the line OPTIONS=”-c -m /var/run/saslauthd” to OPTIONS=”-c -m /var/spool/postfix/var/run/saslauthd -r”.

Open the following file and configure pam to use MySQL to authenticate you.

Edit smtpd.conf and configure sasl to use the sql plugin to authenticate users.

Add the postfix user to the sasl group

Restart postfix and saslauthd

Step 6: Configure courier

Edit Courier to use MySQL to authenticate

Now configure Courier to use your StartSSL cert for imap.
Courier wants the combined pem file.

Find the row TLS_CERTFILE and change the path.
For example: TLS_CERTFILE=/etc/ssl/StartCom/2015-08-10/combined.pem

Also find the the following rows and make sure they are set to the values below.

Since I don’t use pop3 I will make sure to disable it.

Find the the following row and make sure it’s set to the value below.

Restart courier

Step 7: Modify aliases

Issue this command to update the aliases

That should be all.
Don’t forget to populate the database with a user and a domain.

If you have any comments or feedback then feel free to leave them in the comment section below.
This tutorial will be updated later with some more security related settings to protect against certain SSL/TLS attacks.