SMTP Auth using saslauthd and IMAP authentication – Redhat/CentOS/Fedora

I used the following procedure to support SMTP Auth on a CentOS5 machine.

Created a name in my DNS to use for the outgoing mail server on remote mail clients. This will allow me to easilly migrate the service to another server or IP address.

Made the following modifications my /etc/postfix/ This configures postfix to support SMTP Auth.

vi /etc/postfix/

# JGZ 4/16/2008 – Begin – To enable SMTP Auth using dovecot (IMAP) authentication.
# Enable SASL Authentication
smtpd_sasl_auth_enable = yes

# Report Authenticated Username In Headers
smtpd_sasl_authenticated_header = yes

# Set Path for SASL Auth (this references the smtpd.conf file created earlier)
smtpd_sasl_path = smtpd

# Support Broken Microsoft Clients
broken_sasl_auth_clients = yes

# Enable on authenticated user to send
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
# JGZ 4/16/2008 – End – To enable SMTP Auth using dovecot (IMAP) authentication.

Reload postfix to implement the changes:
postfix reload

Made a backup copy of my /etc/sysconfig/saslauthd:
cp -p /etc/sysconfig/saslauthd /etc/sysconfig/saslauthd.orig

Modify /etc/sysconfig/saslauthd to support IMAP authentication and specify the remote IMAP server. Note: you can use a name or IP address. Furthermore, you can use is running the IMAP server on the same machine. I used a name to better accommodate changes I might need to make.
vi /etc/sysconfig/saslauthd

# JGZ 4/16/2008 – to authenicate via IMAP server

# JGZ 4/16/2008 – To send authentication request to remote server.

Start saslauthd.
service saslauthd start

Configure saslauthd to start at boot up via ntsysv.

This works well. It is very simple. While the IMAP password is transmitted twice to send and receive mail, the password is encrypted.

How to find files modified in the last 24 hours using find.

I never seem to remember this. I always forget that it is the 0. I have used this on linux and unix.

find . -type f -mtime 0

How to find more than one name pattern:

find /tmp -name *.abc -o -name *.def -o -name *.ghi -o -name *.jkl -type f -print

Protected: Microsoft True Type fonts – Constantia, Corbel, Calibri, Cambria, Candara, Consolas

This content is password protected. To view it please enter your password below:

Add new fonts to CentOS/RedHat/Fedora/Ubuntu

I used the following methodology to add some new TrueType fonts to my CentOS5 machine. The tmpfontdir is a temporary directory where I downloaded the fonts.

cd /usr/share/fonts/
mkdir -p truetype/myfonts
cp tmpfontdir/* /usr/share/fonts/truetype/myfonts
fc-cache -f -v ~/.font

How to block a particular port in MacOSX.

sudo ipfw add 1 deny tcp from any to any portnumber out
sudo ipfw add 2 deny udp from any to any portnumber out


sudo ipfw add 1 deny tcp from any to any 137 out
sudo ipfw add 2 deny udp from any to any 137 out

How I created a link to an smb share in MacOSX (Leopard)

vi /Users/username/Desktop/smbservername\:sharename.inetloc


This worked to map Windows shares on Macs with Netbios disabled.

How to disable Netbios on MacOSX (Leopard)

vi /etc/smb.conf

disable netbios = yes
smb ports = 445

Stop nmbd:

launchctl unload -w /System/Library/LaunchDaemons/nmbd.plist

Note: You may need to do the launchctl command a couple times. Not sure why but it did not always stop nmbd. Below is a portion of the nmbd.plist file. If set correctly to disable Netbios, you will see the KeepAlive instead of Enabled (the default).


How to re-create the Show Desktop icon in the Quick Tray in Windows XP.

Create a file called “Show Desktop.scf.”


Right mouse click and drag the file to your Quick Launch bar and release. Select move.

Samba: joining a Windows Domain.


Samba Joining a Domain

Resizing images via linux command line or script.

Make sure ImageMagick is installed. The convert command is part of the ImageMagick installation.

convert -geometry 240×160 filename newfilename

The following will resize several images in a script:

for x in $(ls)
convert -geometry 240×160 $x new-$x

Return top