How To Setup a Vacation Autoresponder with Procmail + Sendmail January 8, 2008Posted by devhen in CentOS, Fedora, Linux.
The problem with vacation auto responders like ‘vacation’ for sendmail is that spammers often fake the From: address. Auto responding to these addresses can get your mail server blacklisted. To avoid this you can setup your autoresponder with procmail and, if you are running a spam filter on your machine, you can tell procmail to auto respond only if the X Spam Status header is ‘No.’ To accomplish this copy the following into ~/.procmailrc in the home directory of the user you want auto responses for. Make sure to make any neccessary changes to MAILDIR, SENDMAIL and the three instances of ‘firstname.lastname@example.org’:
# Auto-responder for vacations. Please
# insert text in $MAILDIR/message.txt
* ^X-Spam-Status: No
|(formail -r -A “Precedence: Auto” \
- -I”From: Testy <email@example.com>” \
- -I”Subject: Automated acknowledgement” \
- -A “X-Loop: firstname.lastname@example.org”; \
cat message.txt )| $SENDMAIL -t
Now put your auto response message in ~/mail/message.txt . Don’t forget to turn off the autoresponder when you return:
mv ~/.procmailrc ~/procmailrc_backup
No Mouse Pointer on CentOS 5 May 1, 2007Posted by devhen in CentOS, Fedora, Linux.
There is a bug with numerous NVidia graphics chips that causes the mouse pointer to be invisible in GNOME and GDM (possibly also KDE, I haven’t tried it). I discovered this bug on a fresh install of CentOS 5 but its possible that the issue also applies to CentOS 4 as well as Fedora releases. The fix is relatively easy and solved the problem for me on an nForce motherboard with a built-in GeForce 6100 video card. Edit your xorg.conf file and add the line Option "HWCursor" "off" to your videocard device section so that it looks something like this:
Clearlooks on CentOS 4 March 5, 2007Posted by devhen in CentOS, Linux.
add a comment
The ever-popular, ever-slick Clearlooks GNOME theme is just minutes away for you CentOS users. Its available via the kbs-CentOS-Extras repo. Download this file and pop it into /etc/yum.repos.d/. Then do
yum install gnome-theme-clearlooks gnome-theme-clearlooks-bigpack
You can also install some other GNOME themes with
yum install gnome-themes-extras
or get the package here.
Now you can install other Clearlooks-based themes like Gilouche as well.
HOWTO: Run Internet Explorer on Linux January 8, 2007Posted by devhen in HOWTO, Linux.
The IEs4Linux project makes installing and running Internet Explorer on Linux a cinch. Just follow these simple instructions. Their script will download and install IE6 and, optionally, IE5 and IE5.5 as well. Everything is automated and extremely easy. You can also install Internet Explorer 7 by following these instructions. I was able to get all four versions of IE running on both my CentOS and Fedora machines in no time. There are non distro-specific instructions as well as instructions for the Ubuntu/Xubuntu/Kubuntu, Fedora, Gentoo and Debian distributions. Basically, if you’re running Linux with Wine and cabextract installed you’re good to go. Many thanks to the IEs4Linux project for making this so easy for us. We should all seriously consider donating to the project.
HOWTO: Install Firefox 2.0 on Fedora Core 6 December 18, 2006Posted by devhen in Fedora, HOWTO, Linux.
Due to the popularity of this post I’ve decided to include instructions for all three of the most popular methods for installing Firefox 2 on Fedora Core 6. Read through the three options to decide which works best for you.
Option 1: Via yum with the ‘development’ repo
This command will allow you to upgrade to Firefox 2 via the Fedora Development repo. This is the most commonly recommended option.
Instructions (as root):
# yum --enablerepo=development update firefox
Pros: Uses “official” Fedora packages
Cons: Doesn’t include the (optional) bonuses of option 2
Option 2: Via yum with the ‘remi’ repo
Remi Collet, an “official” Fedora developer, has made available a repo of packages that provides Firefox 2. The repo updates Firefox and those packages that depend on it and also contains a few bonuses such as an updated XChat package (version 2.8).
Instructions (as root):
Now make sure that in your /etc/yum.repos.d/remi.repo file you’ve got enabled=1 and then:
# yum update
Pros: All required packages as well as some extra goodies; new versions of Firefox are automatically installed with yum update
Cons: Not “official” Fedora packages–bugs should not be submitted to the Fedora project
Option 3: Via firefox-2.*.tar.gz from Mozilla.com
I always recommend using RPM packages on Fedora, if possible. However, if you’d like to install Firefox 2 using firefox-2.*.tar.gz from Mozilla.com use this option. One benefit of this option is that Firefox 1.5 remains on your machine so have a choice as to which version to run.
Instructions (as root):
Download firefox-*.tar.gz from Mozilla.com.
# mv firefox-2.*.tar.gz /usr/local/
# cd /usr/local
# tar xvfz firefox-2.*.tar.gz
# mv /usr/bin/firefox /usr/bin/firefox15
# ln -s /usr/local/firefox/firefox /usr/bin/firefox
Firefox 2 will now be your default browser. To run version 1.5 use the command firefox15. I don’t recommend running both versions concurrently because they will be using the same profile which might cause problems.
Pros: Firefox 2 co-exists with version 1.5
Cons: Installation isn’t as straightforward; must be repeated for future releases of Firefox 2
Windows: spoolsv.exe Using 99% CPU December 18, 2006Posted by devhen in Windows.
I don’t find myself interested in Windows very often, or any proprietary operating system for that matter, but I ran into this problem on one of the computers in our office and thought I would share the solution. If you come across the problem of spoolsv.exe using 99% CPU usage, never fear. There is a solution. And its a rather easy one. Click here for the fix. Thanks to Tim for his journal entry pointing this out.
HOWTO: Copy Linux Filesystems June 8, 2006Posted by devhen in HOWTO, Linux.
add a comment
I recently added a hard drive to one of my Linux systems and while searching for the best way to copy my old /home filesystem to the new drive I came upon this command:
/sbin/dump 0f – /home | ( cd /new ; /sbin/restore rf – )
Here my new hard drive is mounted on /new and I’m copying the entire filesystem from /home to /new. On my system (CentOS 4) the dump and restore commands are in /sbin/ but other distros may not be consistent so you’ll want to make changes to the command as needed.
HOWTO: Install fuse + sshfs on CentOS Linux June 8, 2006Posted by devhen in CentOS, HOWTO, Linux.
NOTE: These instruction are for CentOS 4.
The apt-get method of installing sshfs that I had posted here previously did not work for me. I got this error when trying to mount an ssh drive:
shfsmount: shfs filesystem not supported by the kernel
So, I set out to find a different method of installing sshfs (and fuse, which it requires). One, preferably, that would actually work. Well, I found one. Its not the most elegant solution but its effective.
First, download a copy of the fuse source rpm:
Next, install the source rpm and then build the proper fuse rpm’s from the .spec file:
rpm -ivh fuse-2.6.0-1.src.rpm
rpmbuild -bb /usr/src/redhat/SPECS/fuse.spec
Next, install the rpms that you have built:
cd /usr/src/redhat/RPMS/i386 (replace ‘i386′ with your arch, if necessary)
rpm -Uvh fuse-2.6.0-1.i386.rpm fuse-kernel-2.6.0-1.i386.rpm fuse-libs-2.6.0-1.i386.rpm fuse-devel-2.6.0-1.i386.rpm
Now you can install the sshfs-fuse rpm:
rpm -ivh sshfs-fuse-1.6-2.i386.rpm
** You can try building the sshfs-fuse rpm from its source package if your not on i386**
Now comes the ugly part… For some reason the system can’t find the fuse module after installing these packages. So, head over to the fuse project homepage and download fuse-2.6.0.tar.gz. Unpack it and then
and you should be in business. As I said, this is not an elegant solution because you are installing fuse from the tar.gz file on top of the fuse rpms. However, it works for me and that’s all that matters right now because I really needed to mount some ssh drives on my workstation.
Mount an ssh drive like so:
sshfs user@remotesystem:/path/you/want/to/mount/ /mnt/mount-point/ -o allow_other
Don’t forget the trailing /’s on both the source folder and the mount point. -o allow_other will give all users access to the mounted drive. Type sshfs -h for a list of all of sshfs’ options.
The latest stable release of Ubuntu Linux comes with Firefox version 1.0.8 installed. Unfortunately this version is slower than 1.5+ and some of the extensions I use only support 1.5+ so, naturally, I needed to upgrade. I found a page on the Ubuntu Wiki called FirefoxNewVersion that shows you how to install a second copy of Firefox, downloaded from the Mozilla web site, alongside Ubuntu’s default Firefox package. Instructions are included on how to change the /usr/bin/firefox script to use the newly installed version instead of the default. This looked like more work than I wanted for a Firefox upgrade–I wanted to stick with .deb packages and didn’t like the idea of having two versions of Firefox installed. So, I discovered a way upgrade my Firefox package using Debain backports. Read on for more.
HOWTO: Sendmail SMTP Auth May 1, 2006Posted by devhen in HOWTO, Linux, sendmail.
These notes are designed to help a Linux geek setup SMTP auth on a Linux + sendmail server. Without proper SMTP auth settings your server is liable to be used by spammers and spam bots to send out copious amounts of unwanted mail. This can get your server’s IP blacklisted and can really eat up your resources. Needless to say, we need to avoid this. Start by editing your sendmail.mc file (found in /etc/mail). I use the following commands, try replacing the corresponding lines in your mc file with these ones: (Note that lines beginning with ‘dnl’ are essentially considered comments and are ignored)
dnl Accept PLAIN and LOGIN authentications.dnl
define(`confAUTH_MECHANISMS’, `LOGIN PLAIN’)dnl
Now you need to rebuild your sendmail.cf file from the .mc file you’ve just edited:
make sendmail.cf -C /etc/mail
Next we need to make sure saslauthd is running and configured correctly. Edit your saslauthd configuration file (/etc/sysconfig/saslauthd) and replace shadow with pam for the MECH variable like so:
# Mechanism to use when checking passwords. Run “saslauthd -v” to get a list
# of which mechanism your installation was compiled to use.
Restart sendmail and saslauthd
and don’t forget to configure your email clients to use authentication when sending outgoing mail.
For more information and some tips on installing a certificate for secure SMTP connections, try this article:
Read on for a full copy of my sendmail.mc file.