< December 2006 >
      1 2
3 4 5 6 7 8 9
Fri, 01 Dec 2006:

Somebody has attempting a reality distortion by showing off how shiny smart folders are in Mail.App. As novel as that may seem, what I hadn't realized was that a lot of people don't know that the nearly the same functionality has been available in thunderbird for a while. So, here's a cool feature of Thunderbird 1.5 I've been using for quite a few months now (got me a nightly build, thanks to one bug-fix).

If you look at the thunderbird message pane, you'll notice a combo box named View. You can create custom views with its customize option. For example, here's how one of my custom views look like.

Now, there are a lot of cool things about filters and views. One of my favourite options in there is the Age in Days option. Combine that with a List-Id or [Bug filter, you get interesting sources of information for status reports.

But views are a true bitch to use. The view isn't reset when you switch folders and a view set for a bugs folder makes no sense when you switch back to your Inbox. But that's where this killer feature comes in. The second last option in the View drop-down is titled Save view as a folder - and that's exactly what it does.

Voila ! There you have your smart folder - no swapping views or anything, just visit the folder and you've got everything you need. Well, it does more than just filter a folder - you can even aggregate multiple folders, with this feature. And I hear that there is tagging in thunderbird 2.x - making it truly web two point OH! compatible.

And before you ask, I've become a GUI weenie :)

How do I type "for i in *.dvi do xdvi i done" in a GUI?
                -- comp.os.linux.misc

posted at: 19:19 | path: /misc | permalink | Tags: , ,

Tue, 13 Jun 2006:

Been pissed all day due to the stupid advertisements on Yahoo groups emails. Every mail I read has a very irritating sidebar which I find no use for. So I added the following 3 lines to my ~/.thunderbird/*default/chrome/userContent.css .

#ygrp-sponsor, #ygrp-ft, #ygrp-actbar, #ygrp-vitnav {
	display: none;

Much better. Ad block is one of those things where being the minority is sometimes an advantage.

If we don't watch the advertisments it's like we're stealing TV.
                 -- Homer Simpson

posted at: 15:31 | path: /hacks | permalink | Tags: , , ,

Sat, 04 Mar 2006:

Finally, my Thunderbird bug got fixed - #328935. Now that shouldn't come as a surprise, right ?. But consider the fate of a very similar and older bug - #285880.

Why was that bug ignored, while my bug got prompt attention ? Conclusions are yours to draw.

bug, n:
       A son of a glitch.

posted at: 23:20 | path: /misc | permalink | Tags: ,

Fri, 03 Mar 2006:

Ever since google fixed their code to prevent people from easily using premshree's google unblocker, I've been tunnelling through a couple of boxes in the US to watch the google videos. But for the rest of you stuck with Indian IPs, do not use this small script because it abuses coralcache network to bypass the IP limitations.

And if you want to see how useful it could have been, please do search for hot girls making out on Google Video. The results should astonish you :)

Never let your sense of morals prevent you from doing what is right.
               -- Salvor Hardin, "Foundation"

posted at: 20:44 | path: /hacks | permalink | Tags: , ,

Mon, 27 Feb 2006:

Just for kicks, I did a small XSL hack on my blog feed. Actually it is not completely XSL, there's a bit of javascript in there to change back the xml encoded text into HTML. There is no unescape XPath function, you see. So if you're running Firefox 1.0.3+ or better, give the rss feed a hit with the browser and see what I'm talking about. The XSL style-sheet is in rss2html.xsl.

Clientside XSLT - all the cool kids are doing it.

Never offend people with style when you can offend them with substance.

posted at: 19:44 | path: /hacks | permalink | Tags: ,

Fri, 23 Dec 2005:

Got thunderbird 1.5rc2 compiled and with all the debug options in there.

[tbird@gopalv ~]$ /opt/thunderbird/bin/thunderbird --debug

/usr/bin/gdb /opt/thunderbird//lib/thunderbird-1.5/thunderbird-bin \
             -x /tmp/mozargs.AD6303
(gdb) r
Starting program: /opt/thunderbird/lib/thunderbird-1.5/thunderbird-bin 

Break points in place and broken into

(gdb) break nsImapProtocol::Logout
Breakpoint 1 at 0x238c9a9: file mozilla/mailnews/imap/src/nsImapProtocol.cpp, line 5677.

(gdb) bt
#0  nsImapProtocol::Logout (this=0x9b91f60, shuttingDown=1, waitForResponse=1)
    at ./mozilla/mailnews/imap/src/nsImapProtocol.cpp:5677
#1  0x0237df2a in nsImapProtocol::TellThreadToDie (this=0x9b91f60, 
    at ./mozilla/mailnews/imap/src/nsImapProtocol.cpp:1035
#2  0x0237f8ee in nsImapProtocol::ProcessCurrentURL (this=0x9b91f60)
    at ./mozilla/mailnews/imap/src/nsImapProtocol.cpp:1475
#3  0x0237e4f4 in nsImapProtocol::ImapThreadMainLoop (this=0x9b91f60)
    at ./mozilla/mailnews/imap/src/nsImapProtocol.cpp:1140
#4  0x0237d985 in nsImapProtocol::Run (this=0x9b91f60)
    at ./mozilla/mailnews/imap/src/nsImapProtocol.cpp:931
#5  0x007e9ba2 in nsThread::Main (arg=0x9b91f30)
    at ./mozilla/xpcom/threads/nsThread.cpp:118
#6  0x00288f9e in _pt_root (arg=0x9b9aa90)
    at ./mozilla/nsprpub/pr/src/pthreads/ptthread.c:220
#7  0x001163ae in start_thread () from /lib/tls/libpthread.so.0
#8  0x00672aee in clone () from /lib/tls/libc.so.6
###!!! ASSERTION: syntax error in generic parser: 'PR_FALSE', 
file ./mozilla/mailnews/imap/src/nsIMAPGenericParser.cpp,
line 94

Some progress, at least - we know that somewhere the syntax parser is screwing up :)

(gdb) break nsIMAPGenericParser::SetSyntaxError if error!=0
Breakpoint 4 at 0x233407b: file ./mozilla/mailnews/imap/src/nsIMAPGenericParser.cpp, line 90.

Breakpoint 4, nsIMAPGenericParser::SetSyntaxError (this=0x9c937ac, error=1)
    at ./mozilla/mailnews/imap/src/nsIMAPGenericParser.cpp:90
90        fSyntaxError = error;
(gdb) bt 4
#0  nsIMAPGenericParser::SetSyntaxError (this=0x9c937ac, error=1)
    at ./mozilla/mailnews/imap/src/nsIMAPGenericParser.cpp:90
#1  0x023a2243 in nsImapServerResponseParser::SetSyntaxError (this=0x9c937ac, 
    at ./mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp:2922
#2  0x0239ffcf in nsImapServerResponseParser::msg_obsolete (this=0x9c937ac)
    at .mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp:2122
#3  0x0239cffb in nsImapServerResponseParser::numeric_mailbox_data (
    at ./mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp:1031
(More stack frames follow...)

(gdb) p this->fNextToken
$2 = 0x9bdf13f "NO"
(gdb) p this->fCurrentLine
$6 = 0x9b76f50 "* 1072 NO  message error; can't fetch that message\r\n"

Ok, so the IMAP server returns some error message which my t-bird fails to understand ? bienvenu_ asked me to get an IMAP client side log

export NSPR_LOG_FILE=/tmp/tbird.log

The log file data is a bit interesting, but not really anything to wake anyone up.

112905136[b6562480]: ReadNextLine [stream=b6562750 nb=52 needmore=0]
112905136[b6562480]: b6559af8:us.f318.mail.yahoo.com:S-foss.in:
  CreateNewLineFromSocket: * 1072 NO  message error; can't fetch that message
112905136[b6562480]: b6559af8:us.f318.mail.yahoo.com:S-foss.in:PARSER:
  Internal Syntax Error: %s: * 1072 NO  message error; can't fetch that message
112905136[b6562480]: b6559af8:us.f318.mail.yahoo.com:S-foss.in:SendData:TellThreadToDie: 8 logout
112905136[b6562480]: b6559af8:us.f318.mail.yahoo.com:S-foss.in:TellThreadToDie: close socket connection

Let us move onto the RFC - 2060 (IMAP version 4, revision 1). Scroll down to section 6.4.8. The UID command seems to expect 'NO' as a valid response - but it is not entirely clear whether "* 1072 NO" is valid in the current context. (updated: bienvenu_ told me that's a valid response). Right now, hacking on a quick fix to ignore 'NO' lines in that output.

Index: nsImapServerResponseParser.cpp
RCS file: /cvsroot/mozilla/mailnews/imap/src/nsImapServerResponseParser.cpp,v
retrieving revision
diff -u -r1.122.8.2 nsImapServerResponseParser.cpp
--- nsImapServerResponseParser.cpp	22 Sep 2005 23:29:11 -0000
+++ nsImapServerResponseParser.cpp	23 Dec 2005 02:29:24 -0000
@@ -1027,6 +1027,11 @@
         fFlagState->ExpungeByIndex((PRUint32) tokenNumber);
+    else if(!PL_strcasecmp(fNextToken, "NO"))
+    {
+       /* crude !! */
+       skip_to_CRLF();
+    }

One night's sleep - wasted.

Users who debug, shouldn't be punished for it

posted at: 07:57 | path: /hacks | permalink | Tags: , ,

Managed to do too many things and screwed up everything ... Now I am stuck up shit creek without email.

+++ making chrome /tmp/thunderbird/mozilla/netwerk/resources  => ../../dist/bin/chrome/en-US.jar
error: file '../../toolkit/locales/en-US/chrome/necko/contents.rdf' doesn't exist at ../../config/make-jars.pl line 418.
gmake[4]: *** [libs] Error 2
gmake[4]: Leaving directory `/tmp/thunderbird/mozilla/netwerk/resources'
gmake[3]: *** [libs] Error 2
gmake[3]: Leaving directory `/tmp/thunderbird/mozilla/netwerk'
gmake[2]: *** [tier_9] Error 2

Screwing up - it's my gift, it's my curse...

posted at: 04:12 | path: /rants | permalink | Tags: , ,

Thu, 22 Dec 2005:

Half of today, I've been trying to debug thunderbird. I can't read my mail with it. I have a bunch of unread mails on foss.in lists which fail to show up on the listing. This server is not available to the outside world and therefore I cannot actually get anybody else really interested in this. Here's as far as I've got today - any IMAP4v1 gurus are welcome to jump in and help.

* OK IMAP4rev1 server ready (1.48.6)
1 login "gopalxx" "my-password-is-not-for-you-h4x0rs"
1 OK LOGIN completed
2 select "foss.in"
* 1089 EXISTS
* OK [UNSEEN 1072] Message 1072 is first unseen

2 OK [READ-WRITE] SELECT  completed; now in selected state
3 UID fetch 1:* (FLAGS)
* 1 FETCH (FLAGS (\Seen) UID 29427)
* 2 FETCH (FLAGS (\Seen) UID 29428)

* 1072 FETCH (FLAGS (\Recent) UID 34095)
* 1073 FETCH (FLAGS (\Seen) UID 34119)
* 1075 FETCH (FLAGS () UID 34159)
* 1089 FETCH (FLAGS () UID 34357)

Till here it all looks perfectly ok. Then it starts going bad.

4 UID fetch 34095:34357 (UID RFC822.SIZE.....)
* 1072 NO  message error; can't fetch that message

5 logout
* 1073 FETCH (FLAGS (\Seen) RFC822.SIZE 7658 ...)
X-Apparently-To: yopalv82@gahoo.com via 68.142.207.xx; 
                 Fri, 16 Dec 2005 21:52:01 -0800
X-Originating-IP: [66.94.237.xx]

And thunderbird, refuses to work at all...

The code - nsImapService.cpp, ain't pretty at all... But I can try debugging - devel-power !!!.

We don't need no allocation We don't need no special-nodes No dark bit-flipping for debugging Hey! did you leave those bits alone?            -- "Another Glitch in the Call"

posted at: 19:01 | path: /hacks | permalink | Tags: ,