tkbiff

http://expect.nist.gov/tkbiff/

http://expect.sourceforge.net/tkbiff/ (2011-01-11)

tkbiff is a mail notification program. Besides doing what it is supposed to, tkbiff is also a nice example of a polished Tcl/Tk application. It's wonderfully configurable, well documented, and also serves as a Rosetta Stone for IMAP, POP, and file-based mail servers. Tkbiff is also portable to all of UNIX, Win, and MacOS and there's a fair amount of code to make that happen just right. (The Tcl language is portable but that doesn't mean that all programs are trivially portable!)


LES: Eh, looks good. But what a totally blunt approach. It created a .tkbiff file in my home folder, but it's not just configuration. It's the entire program! Someday I'll get around to reading all that and making it work. :-(


DL: I'm not sure 'blunt' is the right word to describe it but it certainly doesn't follow the traditional approach of making everything a pre-defined Preference. Instead, the entire GUI is there in your .tkbiff file! This reason for taking this approach is explained in Q1 of the FAQ: http://expect.nist.gov/tkbiff/FAQ.html#q1

While deciding if you agree, I ask you to think about your present email checker and ask yourself - Is there anything about it you'd like it would do differently but are unable to because there is no Preference to change it?


jima (2006-08-24): How about connecting to gmail from tkbiff?

Does anyone know if that is possible? (I am trying but not getting it to work).

RLH Is POP access enabled for your gmail account?

jima Yes it is, I checked it by using Outlook on it. I am getting help from DL, perhaps I am not setting the configuration properly.

DL It's either a bug in tls (I'm using 1.5.0) or my understanding of how to use it! I'll demonstrate:

Try entering the following 3 lines into tkcon:

 % package require tls
 % proc w {f} {fconfigure $f -blocking 0;fileevent $f readable {set ::event 0};vwait ::event}
 % set f [tls::socket -async pop.gmail.com 995]; w $f; puts [read $f]

All that code does is to open a secure connection to pop.gmail.com. But it hangs waiting for an event. Forever.

If I run the same code (without the tls stuff) to a non-ssl pop server, it works fine. I see the pop greeting immediately. (I don't know of any public non-secure pop hosts; you'll have to substitute your own in the code below.)

 % proc w {f} {fconfigure $f -blocking 0;fileevent $f readable {set ::event 0};vwait ::event}
 % set f [socket -async pop.localhost.com 110]; w $f; puts [read $f]

If I open a connection to gmail WITHOUT the fileevent/vwait, it works (although it takes about a minute to complete the read):

 % package require tls
 % set f [tls::socket -async pop.gmail.com 995]
 % read $f

And if I point it at my company's secure pop server, it hangs!

I'm thoroughly confused but it sure looks like a tls issue.

deb I've never been able to get TLS connections to work in tkbiff, but using a pipe to the openssl connect command works fine for me with GMail and other servers. Here is the key line of my .tkbiff file:

 set protocol(connect) {open "|openssl s_client -connect $protocol(host):$protocol(port) -quiet 2> /dev/null" RDWR}

So I can connect to GMail okay, but it turns out to be not so useful anyway. The problem I find is that once it is presented a message through the POP interface, GMail seems to forget about it. The next time I poll, all the messages that showed up the previous time disappear, as if I had emptied the mailbox. I'm no expert on POP, but I think their server is not honoring RETR or something. Disappointing, because I love tkbiff.

DKF: Maybe consider using an IMAP interface instead, if one is supported? (I do not pretend to be knowledgable about GMail…)