Google

Filtering duplicate emails with procmail

June 20th, 2006
We have a few departments on campus and each user has a username in at least one department plus the top level domain. This means that if an email is sent to username@dept.company.net and there is a cc to username@company.net Then username will get the email twice. After playing around I found that procmail can track the messageid’s of emails in a file, so i have this simple rule to filter out.
PMDIR=$HOME/.procmail
 
:0 Whc: msgid.lock
| formail -D 4096 $PMDIR/idcache
:0 a:
Mail/duplicates

:0 Whc: msgid.lock This sends the headers to formail and makes a carbon copy of the mail and creates a lock file while we are doing this. | formail -D 4096 $PMDIR/idcache This pipes the output of the previous line to formail, formail will append the msgid of the message to the file idcache if it doesn’t already exist. If the msgid exists, then it will exit with success, if it does not then it will append the msgid to the file (removing anything over 4096 bytes) and return failure. :0 a: We use the a: to see if there was success on the previous rule. Mail/duplicates We then send the message to the folder Mail/duplicates. We could send to /dev/null, but I’m too chicken for that…

lvscan lvdisplay lvm after cluster install without configuring cluster

June 9th, 2006
After installing the cluster stuff (GFS), lvscan and lvdisplay stopped working with the following error:
[uphill@zürich]: lvscan
  connect() failed on local socket: Connection refused
  Locking type 2 initialisation failed.
Read the rest of this entry »

.Xdefaults app-defaults not applying automatically

June 6th, 2006
In RHEL4 and possibly other distros. The .Xdefaults file is not used, the file is now called .Xresources In /etc/X11/xinit/xinitrc-common, xrdb is passed .Xresources _after_ /etc/X11/Xresources. You can make systemwide changes in /etc/X11/Xresources, but they will be overridden by changes to .Xresources.