Used to successfully shrink a Microsoft SQL 2000 database.

Note: I do not believe that I have to do all this, but it did work. It did not shrink the log using the DBCC commands below as expected. I will update as learn more, but needed to get this written down, since it did achieve what I had wanted (to reduce the size of the log).

From isql:
DBCC SHRINKFILE(dblogname, size)
BACKUP log dbname WITH TRUNCATE_ONLY
DBCC SHRINKFILE(dblogname, size)

From MSSQL Enterprise manager:

Shrink DB Option in Enterprise Manager

Shrink DB Window

Shrink DB File Window

Postfix address rewriting or delivery test.

sendmail -bv emailaddress

From the sendmail man page:

-bv Do not collect or deliver a message. Instead, send an email
report after verifying each recipient address. This is useful
for testing address rewriting and routing configurations.

How to modify bind order in Windows XP.

This is where you modify the bind order of network interfaces in Windows XP.

Interface Bind Order

It is best to make sure the Remote connections or VPN interfaces are at the bottom to avoid sending unnecessary traffic over the remote connection.

Debugging email address problems in sendmail.

sendmail -bt
3,0 someemailaddress

sendmail -bt -d21.4
3,0 someemailaddress

sendmail -bt -d41.4
3,0 someemailaddress

sendmail -bt -d60.1 -d32.12
3,0 someemailaddress

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/mail.cf. This configures postfix to support SMTP Auth.

vi /etc/postfix/main.cf

# 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 127.0.0.1 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
MECH=”rimap”

# JGZ 4/16/2008 – To send authentication request to remote server.
#FLAGS=
FLAGS=”-O imap.server.name”

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

Example:

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

smbservername:sharename.inetloc

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

Return top

INFORMATION