I came across an error after upgrading a Plesk server from 8.6 to 9.2.3:
# /usr/local/psa/admin/sbin/mchk –with-spam
==> Checking for: mailsrv_conf_init… ok
==> Checking for: mail_mailbox_restore… ok
==> Checking for: mailsrv_entities_dump… ok
==> Checking for: mail_admin_aliases… ok
==> Checking for: mail_auth_dump… ok
==> Checking for: mailman_lists_dump… ok
==> Checking for: mail_responder_restore… ok
==> Checking for: mail_drweb_restore… ok
==> Checking for: mail_kav_restore… not exsists
Continue reading »
I recently needed to do some testing with sending mail, and needed a host that would accept mails without asking questions, and just discard it. This turned out to be pretty easy with Postfix. Starting with a fresh installation on Debian Lenny, add the following to /etc/postfix/main.cf:
And before I even got to send a test mail, someone had beat me to it:
Yes, I probably should have firewalled out port 25…
Hours spent in front of the TV are essentially a waste of life for me. But once in a while, something happens and my brain actually works for a few seconds. On this particular occasion I was on the couch, TV blaring some insignificant noise at me, browsing on my laptop for my daily information overload.
I remembered that I wanted to check if TED has an rss feed. Sure they do, so I subscribed using my rss reader. Of course, this gave me 200+ updates, and while browsing through them, I noticed that they contained direct links to mp4 files. Hey! Wait a minute! iTunes should be able to make sense of this feed! So I tried it, and what do you know – I’m now subscribed to the TED’s videos.
So here’s the quick&dirty. Navigate to http://www.ted.com. Scroll down to the rss feed link. Right-click on it and copy the URL. Now open iTunes, click on “Advanced” –> “Subscribe to podcast” and paste the URL into the box. And that’s it! Sit back and let the videos come to you! As a bonus, the videos are the right format for the iPhone. My daily commute just improved a whole lot!
Update (2009/05/05): Of course, the next morning, with a fresh mind, I realised that the TED talks were available as a podcast on the iTunes store.
Today I got tasked with removing duplicate mails from a mail folder with over 100,000 mails in it. Doing this from a mail client is so impractical, it’s not even worth giving any thought at all. Fortunately, the mailbox is on a mail server using Maildir style mailboxes, so I knew this could be done with minimum effort.
I discovered the ‘reformail’ utility, part of courier-imap, and after a few trial runs, I settled on the following:
# cd /path/to/mailbox/Maildir/cur
# for i in `find . -type f`; do reformail -D 10000000 /tmp/duplicates <$i && rm $i; done
-D looks for, and deletes duplicates.
10000000 is the length of the temporary file where a list of message IDs will be written
/tmp/duplicates is the aforementioned temporary file.
The temporary file needs to be big enough to accommodate the message ID of each mail. In this particular case, I have found the average length to be 54 characters, but I would suggest using around double that to be safe. So adjust to your needs.
In a big mail folder, and especially on ext3, this will take a long time to complete.
From time to time, Squirrelmail gives this error on a Plesk machine:
Error opening /var/lib/squirrelmail/prefs/default_pref
Could not create initial preference file!
/var/lib/squirrelmail/prefs/ should be writable by user apache
Please contact your system administrator and report this error.
Squirrelmail depends on safe_mode being off. Let’s see if this is the case:
# grep ^safe_mode /etc/php.ini
safe_mode = On
Since this is a multi-domain system, we want to make changes only to the effected subdomain, in this case the webmail.* subdomain. But changing the Plesk config won’t help, since Plesk will just overwrite it. So we create a second file, that will load after, and thus override the Plesk file:
# vi /etc/httpd/conf.d/zz011_squirrelmail_safemode_fix.conf
And add the following:
<Directory “/usr/share/squirrelmail”>
php_admin_flag safe_mode off
</Directory>
Now check your apache config and restart gracefully:
# httpd -t
OK
# apachectl graceful
Reload Squirrelmail in your browser – it should work now
After doing some updates on my Debian Lenny workstation, I noticed that KDE’s Konsole is no longer able to find the “Console” font, and upon trying to install it, I’m greeted with an error saying:
Could not install console8×16.pcf.gz into fonts:/Personal/
Fortunately, this is easily fixable. As root, run the following:
# dpkg-reconfigure fontconfig-config
Choose the default option to all but the question about bitmap fonts – choose YES here. This will enable support for bitmap fonts. Then do:
# dpkg-reconfigure fontconfig
This will update the font cache. Now restart your Konsole, and your fonts should be back to normal.
Update 2009/03/07: I had this happen to me again today (did a dist-upgrade to Squeeze) and after running the above fix, only one of the two missing fonts returned. I found that removing the contents of ~/.fontconfig/ does the trick.
Update 2009/07/25: I got a new PC at work, and this time did a clean install of Squeeze, which meant getting dumped into KDE4. Again, the font was missing, and the font installer wouldn’t see the pcf file. I had to do the above, and then, using the font installer, had to type *.pcf in the filter field – this installed the font. I also had to set font anti-aliasing to “enabled” instead of “system settings” in the System Settings panel –> Appearance –> Fonts.
I ran into this problem while travelling. I wandered into a camera shop, and asked to try out a Canon 5D they had on display. I took the CF card from my 40D, put it in the 5D, fired off some shots, and then put the card back in my 40D. I quickly viewed the photos – the 40D had no problem displaying the 5D’s images, but the file numbers had changed. I didn’t notice this immediately – only that evening when reviewing the day’s pictures. The 40D was on 5000 odd, and now, all of a sudden, it was counting in the 8000 range.
I realised that this was because the 5D were on that many shots, and my 40D is set to “continuous” – it simply continued where the card stopped. While this makes no difference to the operation of the camera, the continuous file numbering is the only way I have to know how many clicks my shutter has done. So I wanted to fix it. Since I was travelling I didn’t have the tools at hand to make screenshots, etc, so I did this again on purpose, just on a smaller scale. Here’s how to fix it:

