Wednesday 30 September 2009

Processing Deferred Messages in Postfix

For anyone who's had to cleanup some mail problems with Postfix configuration (or more often with other things, like anti-spam, tied in but not part of postfix), it may be common enough that a large spool of mail gets queued up and needs to be pushed out. The easy way to do this is to do either "postfix flush" or "postqueue -f" which basically force Postfix to re-process pending messages (actually "deferred" usually) and send them out.

However, if either the queue is huge, or you don't really know if you have your problems resolved and want to try a few messages before unleashing the masses, I found it was not clear how this can be done. There is a straight-forward way to do this which is to put everything on hold using "postsuper -h ALL deferred", and then un-hold whichever messages you do want processed with "postsuper -H ".

Tres handy

Friday 11 September 2009

Let's FUSE him with this juice!

Back in the olden days, like a year or two ago, Filesystem in Userspace (FUSE) was a fancy feature that allows users to mount file systems. Using FUSE means that you can create a file system driven by an application rather than a driver (e.g. a kernel module). When I first tried it, it meant customizing your kernel to include this feature and building a bunch of utilities and drivers and generally it was awesome, but not something one does for a "quick fix".

Fast forward to a few months later (or aeons in OSS terms) and there's standard kernels and packages to operate FUSE. You can pull everything you need from your distro's stock repository.

In particular, there is sshfs which is hella tight. "sshfs" is, as you might guess, a file system over SSH, e.g. in FUSE. This means the security and features of SSH including SSH keys and all that good fun. Installing "sshfs" and FUSE is a simple three step process:


  1. yum install sshfs (or aptitude install sshfs for Debian / Ubuntu users)

  2. ?

  3. Profit!



Similarly, once you've installed "sshfs", using it is a simple three step process:


  1. sshfs myhost.example.com:/some/remote/path /some/local/path

  2. ?

  3. Profit!



What could be simpler? If you're finding your virtual file system access in Gnome or KDE produces odd behaviour sometimes, just FUSE your remote file system instead. You get fully functional and secure access to remote file systems.

Oh, and just one last note, you use a FUSE command to disconnect the mount:

fusermount -u /some/local/path

Thanks, Toddz for mentioning FUSE the other day and getting me to revisit it.

Ciao,
- Arch

(title for this post nicked from an Invader Zim quote)

Friday 4 September 2009

Crappy Power

I've had some problems in the somewhat recent past where my UPS goes into panic mode and because the battery was old / crappy, this made things "very bad". I've had no issues since replacing the battery, but now I'm getting a picture of why it was so awful from apcupsd:

Mon Aug 31 11:13:36 PDT 2009  Power is back. UPS running on mains.
Mon Aug 31 11:13:34 PDT 2009 Power failure.
Thu Aug 27 11:20:20 PDT 2009 Power is back. UPS running on mains.
Thu Aug 27 11:20:18 PDT 2009 Power failure.
Sat Aug 22 16:59:32 PDT 2009 Power is back. UPS running on mains.
Sat Aug 22 16:59:29 PDT 2009 Power failure.
Sat Aug 22 16:56:29 PDT 2009 Power is back. UPS running on mains.
Sat Aug 22 16:56:27 PDT 2009 Power failure.
Fri Aug 21 00:12:33 PDT 2009 Power is back. UPS running on mains.
Fri Aug 21 00:12:31 PDT 2009 Power failure.
Fri Aug 21 00:11:52 PDT 2009 Power is back. UPS running on mains.
Fri Aug 21 00:11:50 PDT 2009 Power failure.
... etc


There are a lot of power events going on. Given that the time of the "power failure" is always 2 seconds, my guess is that this just means power is fluctuating. I've lived in places where this happened a bit and where it happened not at all, but this is the worst I've seen.

The only thing I can say is: get a UPS if you don't have one! You may not need battery backup per se, but this is the kind of stuff that will send the power supply unit in your PC to an early grave. And if you're unlucky, the PSU may just take other components of your PC with it.

- Archangel

Popular Posts