Command line mail reading and kmail

Posted by Administrator (mikee) on May 17 2010
Blog >>

I wanted a terminal client to read my mail when away from my computer, plus I wanted to use my laptop to read my mail using kmail. 

The main issue is that kmail picks up my mail using pop3, sorts it into subdirs, runs the spam filter and virus scanner.  All this mail end up in ~/Mail in maildir format.  The obvious move the laptop problem is to use IMAP, I chose dovecot as it's easy to set up, allegedly.  As for the terminal client I chose pine, now called alpine, simply because I had used it previously, long ago when Linux was a little more rudamentary.  Nothing wrong with mutt, it just meant I had to relearn a new thing.  You also get pico with the alpine install, which is a very simple text editor.

As this is a Fedora system the varous installs were easy, "yum install alpine dovecot", done.  Setting up dovecot was also relatively simple and most of the relevant facts are at, http://www.dovecot.org/list/dovecot/2006-January/010968.html.  Except since I was using maildir format the mail_location lines looks like:

mail_location = maildir:~/Mail/:INBOX=~/Mail/inbox:LAYOUT=fs:INDEX=~/Mail/.indexes

The INDEX part just hides the various indexes away from kmail's view.  Setting up IMAP mail in kmail is trivial so I won't explain it here.  So just setup pine by editing .pinerc to change the inbox-path to read ;

inbox_path={localhost}~/Mail/inbox

Everything else is in the page referred to above.

Another issue regarding kmail mailbox++ format is that subdirs created in kmail are physically created as say, .gnucash.directory with the sctual subdirs inside that.  Dovecot doesn't like this format, it needs the subdirs to reside inside the parant dir.  A simple link fixes this.  Luckily I only have a couple of dirs with sub-dirs so manual linking was OK for me.  If there had been many of these I'd have written a Python script to make the links automajically.

I could have used fetchmail and procmail but since I'd already set up filters, spam and virus scanning in kmail I lleft it to do the work of getting and sorting the mail.  Sometimes life's too short for reinventing wheels.

 

Last changed: May 17 2010 at 1:28 PM

Back

Comments

None Found

Add Comment