I've been having problems with Firefox and Thunderbird doing DNS lookups recently. The lookups were taking much longer than they should have been, around 5 seconds for each lookup. This becomes highly annoying very quickly. DNS resolution from the machine using nslookup or host seemed ok.
Tracked it down to the network.dns.disableIPv6 setting (firefox - about:config). This was set to False, thus an IPV6 lookup was attempted each time before an IPV4. Setting this to True fixed the problem for Firefox, and seems to have had the same effect on Thunderbird (didn't know they shared these settings?).