PostfixAdmin – Virtual Vacation warning: connect to transport vacation

When trying to enable vacation/out-of-office support to our PostfixAdmin setup, I came across an error in /var/log/maillog:

Jun 19 11:52:10 host postfix/qmgr[5084]: warning: connect to transport vacation: No such file or directory

Turns out there is a typo in VIRTUAL_VACATION/INSTALL.txt. It tells you to add a service named “filter” to your master.cf file, but it should actually be named “vacation” like so:

vacation unix - n n - - pipe
flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl

Cookies with PHP’s setcookie() and Safari

I’ve come across a little inconsistency between browsers and the way they handle cookies. Using the examples from PHP’s online manual, I was unable to get Safari to remove cookies using setcookie(). All other browsers would clear the cookie with no problems. It turns out that Safari will only delete cookies if both the cookie name AND the cookie path match.

In other words, this won’t work:

setcookie('TestCookie', 'somevalue', time()+3600, '/somepath/'); // Set cookie
setcookie('TestCookie', '', time()-3600); // Delete cookie

But this will work:

setcookie('TestCookie', 'somevalue', time()+3600, '/somepath/'); // Set cookie
setcookie('TestCookie', '', time()-3600, '/somepath/'); // Delete cookie

Basically, if you set a cookie using a path, you must also specify the path when deleting the cookie. Safari won’t remove the cookie otherwise. This is probably a good thing.

Retrospect Express HD for Maxtor OneTouch: Assertion failure at tree.cpp-2528

My nightly backups kept failing with the following error:

Retrospect has encountered a serious error:
Assertion failure at tree.cpp-2528
 
A log of this error has been written to the file "assert_log.utx".
 
Please dell Dantz about this problem.

As with all Retrospect problems, the fix is easy. Simply remove X:\Retrospect Restore Points\RestorePoint.rbc (where ‘X’ is your external drive’s letter) and let Restrospect re-create it. This will often take several hours, so be patient. Once Retrospect has finished re-indexing everything, your backups should resume as normal.

Any time I have had a problem with Retrospect, it can always be fixed by re-building the .rbc file.

PostgreSQL: Determine if a column exists or not.

Here’s a quick query you can run to determine whether or not a particular column in a table exists or not:

SELECT attname FROM pg_attribute WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = 'YOURTABLENAME') AND attname = 'YOURCOLUMNNAME';

Of course, replace YOURTABLENAME and YOURCOLUMNNAME with the proper values. If a row is returned, a column with that name exists, otherwise it does not.

Squirrelmail and Very Large (Big-Ass) Inboxes

We have an account with a VERY large inbox (over 80,000 emails), and when logging into Squirrelmail the main pane would not load. Instead we’d be prompted by the browser to download a right_main.php file. Accounts with smaller inboxes would load fine, so I figured it had something to do with system resources. This is an easy fix. Open up your php.ini file, and increase the memory_limit value to something larger than the default 8M. Restart Apache and try opening your big-ass inbox again. If it still doesn’t work, increase memory_limit again. Repeat until your inbox will load, but be careful if you have little RAM. I was able to load my 80,000+ inbox by setting memory_limit = 32M.

iPod on Windows XP: Delayed Write Failed (UPDATED)

A couple years ago I posted about a fix for Delayed Write Failed errors when updating an iPod on Windows XP. While my suggestions in that post worked for the most part, I still encountered the error from time to time.

So it’s been a couple years and now I NEVER receive this error. Here’s how I did it:

I used to connect my iPod to my PC via USB. However, I had purchased an external Firewire hard drive which required me to install a Firewire card into a PCI slot on my machine. The card had 4 Firewire inputs, and I needed to free up a USB port for some other peripherals that needed them. So I decided to move my iPod connection from USB to my new Firewire card (Koutech KW-582V2 – cost me $21 bucks from NewEgg).

Ever since then I have NEVER received the Delayed Write error. So if you’re having trouble updating your iPod and get the “Delayed Write Failed” error, perhaps it is your USB connection. Try moving your iPod to another USB port, and if you’re using a USB hub, try bypassing the hub and plug your iPod directly into your computer’s USB port. If THAT doesn’t work, try a Firewire port. If you don’t have one, grab yourself a Firewire card. You can get them cheap and are much more valuable than all the hair you’re pulling out trying to fix your Delayed Write Failed.