Shami's Blog

Sysadmin, Because Even Developers Need Heroes

Randomize Source IP Addresses With Postfix

2016-04-27

Sometimes when you have a high number of outgoing messages services like Yahoo! and Gmail might block you. To prevent that you need to distribute your outgoing emails through a set of IPs. I used HAProxy for that along with a number of FreeBSD Jails. That solution is a bit tedious, even though after I started using Salt things became a bit easier it was still too complicated for my taste.

Read More - Randomize Source IP Addresses With Postfix

Corrupted image_captcha In Drupal

2016-04-23

I have noticed that the image_captcha Drupal module has been showing empty images on some of the websites I administer. When checking the cause of this I tried to view the image directly and got:

Read More - Corrupted image_captcha In Drupal

Moving A Magento Instance To A New Domain

2016-04-21

Quick one here, when you move a Magento instance to a new domain or URL it will keep redirecting to the old address. There is a quick fix

Read More - Moving A Magento Instance To A New Domain

Bootstrapping PKGNG From Your Own Repository

2015-03-13

I’ve been building my own PKGNG repositories with Poudriere lately. Some of the benefits include:

Read More - Bootstrapping PKGNG From Your Own Repository

HOWTO: Small Mail Server With Salt, Dovecot, And OpenSMTPD

2015-01-26

Update: Sadly OpenSMTPD version 5.4.4 on FreeBSD broke the passwd table, I’m checking the Gills to get this fixed.

Update2: I am no longer using OpenSMTPD. I’ve switched to dma for servers that only need to send emails and went back to Postfix for servers that require an actual MTA. Not that OpenSMTPD is bad, I just prefer Postfix. I might reconcider in the future when OpenSMTPD is more mature.

Read More - HOWTO: Small Mail Server With Salt, Dovecot, And OpenSMTPD

Perl One-liner To Generate htpasswd Passwords

2014-12-29

Update: An easier way to do it that doesn’t require you to install anything special (Works with nginx)

openssl passwd -apr1

Instead of having to install Apache or use an untrusted website just to generate the required password, you can use the following perl one liner

perl -e 'chomp($password=<>);chomp($salt=`tr -dc A-Za-z0-9 </dev/urandom | head -c 1024`); print crypt($password,$salt)."\n";'

Using Your Own Router With The New @orangejo Modem

2014-12-03

Update: I have since moved to Damamax and am MUCH happier with their service. Their network is more reliable, faster, and their support staff is wonderful. It’s a bit more expensive but considering the advantages I highly recommend switching if they cover your area.

Read More - Using Your Own Router With The New @orangejo Modem

Recursively Upgrade Package Dependencies With pkgng

2014-11-11

Update: I now just use pkg upgrade since I have better control over my package repo and it is a much better way to upgrade.

Read More - Recursively Upgrade Package Dependencies With pkgng

Simulating Cron Runs On The Command Line

2014-10-15

Does this sound familiar?

You write a new script, start it from the command line, everything works properly, you add that script to your crontab then go home, the next day, nothing. So you end up setting up a schedule to run this script the next minute, the script fails, you change something, update the schedule, rinse and repeat.

Read More - Simulating Cron Runs On The Command Line

About Me

Dev gone Ops gone DevOps. Any views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.

twitter linkedin