. mombe.org
home of the mad cow
  Not A Blog
 

Thursday, October 13, 2005

Cyrus, Exim and over-quota messages

We run Exim as our mail transport agent delivering into mailboxes run by the Cyrus IMAP server. We're making use of LMTP to deliver mail from Exim to Cyrus.

One of my little bug-bears about this setup is the way it handles users who're over quota. The typical Cyrus response is to (rightly) refuse to deliver the message, which results in Exim bouncing the message "local delivery failed". There are two problems here — we're immediately bouncing mail for what's likely to be an transient problem, and we're sending it back with an essentially useless error message.

See more ...

posted by guy at: 22:05 SAST | path: /systems | permanent link

Cyrus FUD

A while back, Pierre was trying to add users' mailbox information (new message count, etc) to the studentzone. He had some hair-brained scheme that involved caching the users password clear-text in a cookie. There had to be a better way to do this ...

See more ...

posted by guy at: 17:02 SAST | path: /systems | permanent link

Wednesday, July 13, 2005

Firefox Extensions

This post is really just to remind me what extensions I've got installed in Firefox. This is what suits me:

Googlebar
Provide a Google search interface that includes useful things like a "site search" button and word highlighting.
Bookmarks Synchronizer
Many browsers on many machines, one set of bookmarks
Live HTTP Headers
Want to know what web server that remote site is running, or why your redirect doesn't work. Useful to webmasters and the like.
SwitchProxy Tool
Quickly and easily change proxy configurations. Good for testing that individual proxies in a cluster are behaving properly.
HTML Validator
Validate the HTML code in a page when you view source. Particularly useful for validating dynamic code if you're a web developer.
Tabbrowser Preferences
Make tabbed browsing work right
BugMeNot
Auto complete those stupid "sign up for a free account just so you can view this PDF" forms.

YMMV and all that.

posted by guy at: 14:35 SAST | path: /general | permanent link

Friday, May 13, 2005

So now we can photo blog

D-arb posted an entry to his blog about how he had set up blogging of photos from his phone. It seemed like quite a useful idea and i've just got a new phone (a Sony Ericsson k700i) so I thought I'd give it a bash. This is the result. A blog entry from my phone, complete with obligatory photo of our cat. D-arb's shell script based method seemed overly complicated so this is a short and simple perl script based on MIME::Fast. Works for me :)

Picture(1).jpg

UPDATE 2005/08/25: source code
A couple of people have asked for the code I'm using to do this. YMMV and all that.

posted by at: 21:50 SAST | path: /phone | permanent link

Sunday, March 13, 2005

Perl 5.8 and FindBin

It appears that there is a bug in Perl 5.8.6's FindBin.pm whereby things don't work so well if it doesn't have access to the current working directory.

I picked this up trying to debug MRTG. The program would run just fine from the command line, but not from /etc/crontab. After playing with cron's path and env(1) to try and figure out what was going on, I found the following error from cron:

Use of uninitialized value in string at /usr/local/bin/mrtg line 78.
Empty compile time value given to use lib at /usr/local/bin/mrtg line 78
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 79.
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 703.
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 703.
ERROR: Can't Execute '/rateup'

Looking on line 78 and 79 of the MRTG code I found:

use FindBin;
use lib "${FindBin::Bin}";
suggesting the problem was related to the FindBin Perl module.

Some googling lead me to a similar bug report for RedHat Linux. Their suggested fix was a patch to FindBin.pm.

Since I'm not wildly keen on altering bits of my Perl installation (I forsee problems later when I try and upgrade and have forgotten why I did it), I decided to try for a simpler, less invasive solution. Since it appears that the problem is related to permissions on the current working directory, and I'm not sure what cron's current working directory is by default, I decided to try setting it explicitly. So I changed my cron entry from

*/5 * * * * stats /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
to
*/5 * * * * stats cd /tmp; /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg
and lo and behold things started to work properly again.

Anyway, I just thought I'd share this simple solution in case anyone else bumps their head against the same problem.

posted by guy at: 12:21 SAST | path: /systems | permanent link

Bloxsom Powered

© 2002-2005, webmaster@mombe.org
 
 
RSS Valid XHTML 1.0!

Creative Commons License