Linux

creating a password hash for /etc/shadow (sha512,sha256,md5)

I've run into this enough times that I thought I'd write a little script to do the work for me.
It's just a simple one line call to python, but I wrapped it with some argument parsing.

It's a python script that takes a password and returns the salted sha512 hash by default. sha256 and md5 can be specified with switches.

Wordpress category: 

hardlinking rpms in multiple directories

We maintain multiple repositories, many of which have the same rpms repeated in different locations. In order to save space we use hardlinking extensively. The hardlink command does an ok job of finding things to link, but we are only really interested in rpms and don't want repomod.xml or comps getting linked so I wrote a little python script to hard link all the rpms based on a checksum. The script is over at my github. hardlink_rpms

Wordpress tag: 
Wordpress category: 

using procmail with mdbox in dovecot (deliver or dovecot-lda)

When using an mdbox or maildir mailbox, you need to use the dovecot-lda to deliver the message and not allow procmail to do this directly. I had a few issues getting this to work properly, here are the details of getting it going.

Wordpress category: 

using exim to filter aliases with #exim filter

Our aliases are spammed like any other account, but filtering on them would require making a real account. I wanted to be able to filter aliases without creating accounts for everything. My first solution was to create an account and filter on that one, then using $original_local_part I could forward to a filtered alias. This works but if someone discovers the filtered alias, they can bypass the filtering.

Wordpress category: 

gnarwl vacation queryfilter with vacationStart and vacationEnd times checked

We are using gnarwl for vacation notification and I would like gnarwl to only reply if the current time is in the vacationStart vacationEnd window.

Here is the queryfilter to do that using the following information:


$recepient - receiver of the message
$time - current time in seconds since the epoch

Wordpress tag: 
Wordpress category: 

Pages