Tuesday, July 29, 2008
Zimbra
Well-respected and popular blog TechCrunch recently published a review of new version of Zimbra desktop e-mail client; as blog authors put it, Zimbra Releases Version 3 Of Open Source Email Client, And It’s Awesome.
OK, I tried playing a little bit with Zimbra and I think that the concept is OK, application is responsive and useful. However, there are a few things that must be fixed or improved before it could indeed outplace Thunderbird on my desktop. In no particular order, these are:
- Account setup is strange. Software insists that SMTP server must be specified and available at the time of the setup, or else it refuses to allow you to proceed. Why is that? What's wrong with using Zimbra to simply read e-mail from one of my IMAP servers, or e.g. setup SMTP server later?
- It refuses to show you any information at all about a folder unless it is "synchronized", that is, completely copied to the local machine and indexed. Without doing that (which can take hours and gigabytes in traffic) you can't even (in Zimbra) figure out if there is anything in this folder which is worth your time (you can of course start synchronization and then cancel it);
- Spellchecker options are nowhere no be found, but this does not actually mean that spellchecking is completely unavailable: since Zimbra UI is really nothing more than a "headless" Mozilla browser (they call this technology "Mozilla Prism") and Mozilla now has built-in spellchecker, you will see incorrectly spelled words underlined in red, except that you can neither see list of corrections (since Zimbra overrides RMB) nor change the language (for the same reason);
- Zimbra is trying to use (by default) "conversation" mode, which is to say, combine together in the list of messages deemed (based on subject) to belong to the same thread. This is actually done very nicely from the UI standpoint (although GMail is still much better), but background engine which generates "conversations" is faulty; it constantly fails to realize that messages with subjects "foo" and "Re: foo" belong to the same conversation;
- Zimbra is allowing custom-made tags, but for some reason only one tag per message. Why?
Update. This is incorrect, you can assigned as many tags as you want to a message. - When retrieving message headers from IMAP server, in the message list Zimbra shows column "Received" which is actually the time when IMAP server registered the message, and not date of the message itself. Most people probably won't notice the difference, but since I am using my IMAP server as a backup for various other sources (e.g., GMail) and copy email there only occasionally, it is highly inconvenient for me;
- I really like the concept of searches and conversations working across the IMAP folders. However, why not across separate "accounts"?
- Unlike Thunderbird, "search" folders and (probably using same internal implementation) "tag" folders do not display number of unread messages inside them in the folder tree; I have to manually click on each of them to see if there are any new messages;
- Also regarding search folders, and also unlike Thunderbird, there is no way to edit existing search folder, you can only remove it and re-create;
- Working with contacts and address books is painful. Zimbra does not support any kind of LDAP queries and uploading complete corporate address book is buggy; even after I wrote a special tool to re-order and re-name properly fields in CSV file, ZImbra import missed about half of e-mails (why only e-mails?) from the import. Worse, I could not manually edit these contacts to add missing emails; the only possibility was to delete these contacts and then manually add (identical) new ones. This kind of worked....
- For the life of me, I can't figure out where sent messages disappear to; I can't see anything in "Sent" folder (and I am not even mentioning a capability to push sent messages to server). I guess the only available workaround is to always sent a copy to myself...
- And last but not the least, after a while Zimbra simply stopped updating some of my folder as new messages continued to show up on server. Till now, I couldn't say what specifically triggered this behavior.
Honestly, I can probably live with all these bugs and shortcomings - on a technical side, that it. But there is a bigger issue here of a psychological conformability. When I select a IMAP folder without any filters or adjustment - I expect my mail client to show me just that, folder, precisely as IMAP server reports it to be. If, instead, my e-mail client inserts some intermediate logical layers between me and my folder, even if these layers are supposed to be completely transparent, I know that in practice I can never be really sure that what I see is indeed my folder "as is" and not some internally generated skewed view of it. And that's the problem - for me, anyway.
P.S. Some clarification on the last problem of Zimbra not auto-updating some or all folders.
First, problem was likely triggered by an attempt to synchronize with some "weird" Microsoft Exchange folders which did not really have "messages" as such;
Second, you can get dome useful debugging info (mostly Java tracebacks) from <...>/zimbra/zdesktop/log/mailbox.log, (especially) if you checked "enable debug trace" in account setup.
Labels: mail, web-services, yahoo
Tuesday, May 08, 2007
Using getmail/procmail to peek into IMAP server
I am using IMAP (in fact, Microsoft Exchange) server to read my mail. Now, I want some automated tool to take a sneak peek at all new e-mails which come my way and if these e-mails deemed "important", let's say, forward them to another e-mail account.
This could be easily done on a UNIX platform using getmail/procmail combination, but there is a fair amount of configuration required to achieve this goal, including patching getmail source in the process, so let me for the future reference underline the steps required and give some examples of configuration files I used.
1. Install procmail.,/p>
Currently, the latest version is 3.22 and source code can be copied directly from here (September 2001)
To install, you can do
make make installbut before you do, make sure that your /bin/sh is in fact bash (install it if necessary) and not regular Unix sh; if not, replace first line of file initmake with #! /bin/bash.
After installation, make sure "man procmailrc" works for you (you will need it!) and if not, adjust your $MANPATH and/or copy all *.[15] files from "new" to an appropriate location.
2. Install getmail.
Currently, the latest version 4.7.4 is available here (April 2007). Note that you must have Python installed as getmail is Python-based.
Before you build/install getmail, make one change to file getmailcore/_retrieverbases.py : replace line
return self._getmsgpartbyid(msgid, '(RFC822)')with line
return self._getmsgpartbyid(msgid, '(BODY.PEEK[])')as suggested in this e-mail thread, in order to prevent your new messages from being marked as "read' ('seen' in IMAP language).
sub deny_seeing {
my($self, @msgs) = @_;
if ( ref($msgs[0]) =~ /ARRAY/ ) { @msgs = @{$msgs[0]} };
$self->unset_flag('\\Seen', @msgs);
}
sub unset_flag {
my($self, $flag, @msgs) = @_;
if ( ref($msgs[0]) =~ /ARRAY/ ) { @msgs = @{$msgs[0]} };
$flag =~ /^\\/ or $flag = "\\" . $flag
if $flag =~ /^(Answered|Flagged|Deleted|Seen|Draft)$/i;
$self->store( join(",",@msgs), "-FLAGS.SILENT (" . $flag . ")" );
}to understand that in Python this probably could have been done by calling doing something like that (untested):
imap.store (message_set, "-FLAGS.SILENT (\\Seen)" )
python setup.py build python setup.py install
3. Make new directory ~/.getmail and create there file getmailrc like that:
[retriever]
type = SimpleIMAPRetriever
server = imap.myservername.com
username = myusername
port = 143
password = mypassword
mailboxes = ("Inbox",)
[destination]
type = MDA_external
path = /usr/bin/procmail
arguments = ('~/.getmail/procmailrc',)(fill out proper IMAP server credentials). If you need help with getmail configuration file, see here.
4. In the same directory ~/.getmail, create new file procmailrc like that :
PMDIR=$HOME/.getmail # Put ## before LOGFILE if you want no logging (not recommended) LOGFILE=$PMDIR/log # Set to yes when debugging VERBOSE=yes # Remove ## when debugging; set to no if you want minimal logging LOGABSTRACT=all :0: procmail.lock * ^From:.+(Petya|Vasya|Kolyan|president@kremlin.ru) !myemailaddress@gmail.com :0 /dev/null
(Turn off debugging as per comments in the above file when satisfied). If you need help with procmail configuration files, use "man procmailrc".
5. Test your new setup as needed by using command:
getmail --dont-delete --newand then satisfied, add something like this in your crontable:
1,6,11,16,21,26,31,36,41,46,51,56 * * * * /usr/local/bin/getmail -q -l -n
You are all set!
Labels: getmail, linux, mail, procmail, server
Monday, February 26, 2007
Extracting MIME content from e-mail
Even the best Web-based and standalone e-mail clients, like gmail or thunderburd, do not allow users to directly access MIME parts of an e-mail message (though some simpler clients like KMail do).
To solve this problem, many special utilities exist. One such utility is mimedump from Benjamin Elijah Griffin.
Get it here: http://www.cpan.org/authors/id/E/EL/ELIJAH/mimedump.75
Install all required CPAN packages, especially File::NFSLock;
and use it like that
mimedump.pl /tmp/output_dir message_file
