IM status and email

Volume 12, Issue 16; 09 May 2009; last modified 08 Oct 2010

At the intersection of chat status and email, more useful functionality for both.

For years, my strategy for email has been to download it using IMAP or POP, as appropriate, with Fetchmail, run it through procmail, and deliver it locally. Gnus then picks it up from the local spool and does the right thing with it. Since I never interact with the IMAP folders in any other way, I delete mail from the server when I download it. Maybe this isn't strictly necessary, but it's what I do.

The download script runs every five minutes, displaying what it collected via Growl. This all works like a charm.

Since I got my iPhone, it's also possible for me to look at my inbox on my phone. So, if I step away from my desk for something, it's still possible for me to check my mail.

Except, every five minutes my laptop grabs the mail and so there's nothing there for the iPhone to see.

Something else that runs on my laptop is Adium. Now, I've never been very good about setting my status in Adium. I tend to just leave it “available” all the time. The trouble with setting it to “Away” is that I never remember to reset it when I return.

Then this morning I had a thought…if my “getmail” script was sensitive to my chat status then I could check mail on my phone when I was away and when I returned, I'd be reminded to reset my status.

Ten minutes of fiddling with AppleScript to read my status, three or four lines of Perl, and it works like an even better charm.

If my chat status is “Available”, then everything works just like it always has. Otherwise, it doesn't collect mail but sends the Growl notice “Skipping mail, not available for chat”.

So, if I set my status appropriately before I step away, then my friends and colleagues know I'm away and I can check my messages on my phone. If I forget to reset my status when I return, my mail checking script will remind me.

Sometimes it's the little things…


If you want something simple, you may want to check out Proximity:

It scans for a particular Bluetooth device every X seconds (user configurable), and runs scripts went it goes out of range and re-enters it.

I also ran across MarcoPolo, which is similar but more option-full/advanced/complicated than Proximity:

It can use Bluetooth devices for actions, but also many other criteria as well.

—Posted by David Magda on 10 May 2009 @ 02:26 UTC #

I'm guessing most of this is Apple based Norm? I was interested till that thought crossed my mind? Perhaps you could tag these apple so we can recognise them as such please (for the non-apple readers)? TIA DaveP

—Posted by Dave Pawson on 10 May 2009 @ 12:42 UTC #

Tracking status automatically based on the presence of my phone, that is a clever idea. I had been using MarcoPolo for a while, but when I decided to conceal my home network's SSID, I didn't really have much use for it anymore. Maybe I'll give this a try.

—Posted by Norman Walsh on 10 May 2009 @ 01:15 UTC #

Hi Dave,

I don't think there's anything Mac specific here. I happen to use Adium, but I expect you could do this with Pidgin. And there must be something equivalent to Growl, though I don't know what it is off the top of my head.

—Posted by Norman Walsh on 10 May 2009 @ 01:17 UTC #

Bummer. Apparently the iPhone BT services are insufficient unto the day.

—Posted by Norman Walsh on 10 May 2009 @ 01:32 UTC #

DaveP, Norm is right.

This can actually be done on (say) Linux as well, as shown by this short Perl script:

It leverages the hcitool to scan for devices:

Not sure if there's an equivalent 'scan' utility for OS X.

—Posted by David Magda on 10 May 2009 @ 02:11 UTC #

This post has really raised my curiosity and my 'OCD' has caused be to search for a solution to this "problem". :)

Seems that BluePhoneElite may be a possibility:

—Posted by David Magda on 10 May 2009 @ 05:43 UTC #

You seem to be overthinking this. Many pop clients can be configured to leave the mail on the server for n days to solve this problem of having more than one machine from which you check email (and also to delete mail locally when deleted from the server). The one thing you lose this way is that all the mail visible from the iphone will appear unread, even if you've read it from the other machine. On the other hand, having 24 hours worth of mail visible from the iphone would let you reply to mail that you had already seen but not replied to, letting you make good use of time in the commode.

—Posted by David on 11 May 2009 @ 01:59 UTC #

You day "overthinking" like it's a bad thing. :-)

—Posted by Norman Walsh on 11 May 2009 @ 02:03 UTC #

Proximity, makes everything pretty easy, and scans real fast. Check it out.

—Posted by cruz on 05 Jan 2010 @ 07:36 UTC #