About Archive Tags RSS Feed

 

lumail is complete

9 July 2013 21:50

So, writing an email client, how did that turn out? Pretty damn well as it happens.

My views continue to range from "email is easy" to "email is hard". But I'm now using my home-grown mail-client for 100% of my personal mail-handling.

Writing a mail client did seem a little crazy when I started, but the problem breaks down into a few distinct steps and individually they're not so hard:

  • Display a list of folders.
  • Display a list of messages.
  • Display a single message.

Once you've got that you're almost 80% complete. You're just missing things like "delete", "reply", "compose", and those things are pretty simple to implement.

I definitely made the right call in making it scriptable with Lua, because I've been able to write so many functions for working with mail. For example marking messages in all folders matching a regular expression.

The code is pretty well structured, and now I've got TAB-completion support on all primitives and user-additions I'm finding it a lot nicer to use.

The future? I'm not sure. But right now I'm very happy.

| 15 comments

 

Comments on this entry

icon Jon at 22:18 on 9 July 2013

Congrats.

Never thought you would finish it so quickly!

icon Steve Kemp at 22:20 on 9 July 2013

I'm sure there will be more things added over time, as I spot issues with different MIME-types, character sets, etc.

But unless people report issues I think it is "done enough". I'll keep working on it, as I spot things that are annoying, but it is usable and has been for a while now.

icon Nux at 07:33 on 16 July 2013
http://www.nux.ro

Hi Steve and congrats on the job.
Would you say snapshot 0.121 is stable enough?

[1] - http://lumail.org/download/lumail-0.12.tar.gz

icon Steve Kemp at 07:58 on 16 July 2013
http://www.steve.org.uk/

I'd say 0.12 is good, but 0.13 will be better and that will be released this evening!


icon Nux at 11:09 on 16 July 2013
http://www.nux.ro

Hello again, I noticed 0.13 is already available, but I'm having problems building it, check my mock build.log:
http://paste.fedoraproject.org/25622/73972689/
(the seds are there because there's no lua5.1 in Centos 6 and the path for the header files is wrong).

0.12 gives a different error:
http://paste.fedoraproject.org/25623/73972859/

Any pointers?

icon Nux at 11:09 on 16 July 2013
http://www.nux.ro

Hello again, I noticed 0.13 is already available, but I'm having problems building it, check my mock build.log:
http://paste.fedoraproject.org/25622/73972689/
(the seds are there because there's no lua5.1 in Centos 6 and the path for the header files is wrong).

0.12 gives a different error:
http://paste.fedoraproject.org/25623/73972859/

Any pointers?

icon Steve Kemp at 11:12 on 16 July 2013
icon Nux at 12:11 on 16 July 2013
http://www.nux.ro

Thanks, that seems to fix the screen.cc issue, but hit another build problem, pcre (v7.8) related:

http://paste.fedoraproject.org/25638/39766071/


icon Steve Kemp at 12:17 on 16 July 2013
http://www.steve.org.uk/

Seems like you have " -lcurses -lmimetic", which causes it to link to curses and libmimetic, respectively.

You're missing "-lpcrecpp -lpcre".

The supplied makefile calls this:

shelob ~ $ pcre-config --libs-cpp
-L/usr/lib/x86_64-linux-gnu -lpcrecpp -lpcre

So it looks like you're missing a pcre-config command, and that is silently causing you to not link to pcre.

Does that help point you in the right direction?

icon Nux at 12:33 on 16 July 2013
http://www.nux.ro

Steve,

Seems like the problem is the bundled pcre-config does not know about --libs-cpp parameter, probably too old version.
Can you suggest any workarounds?

[mockbuild@rpmbuilder lumail-0.13]$ pcre-config --libs-cpp
Usage: pcre-config [--prefix] [--exec-prefix] [--version] [--libs] [--libs-posix] [--cflags] [--cflags-posix]

icon Steve Kemp at 12:34 on 16 July 2013

The obvious thing to try would either be using "--libs", or just hard-wiring the libraries in the Makefile.

icon Nux at 12:40 on 16 July 2013
http://www.nux.ro

Yes, I already tried just --libs, forgot to mention it, does not fix the problem.
Hard-wiring the libs in the Makefile seems a bit over my knowledge, I'd appreciate any help here.

icon Steve Kemp at 12:45 on 16 July 2013

Well the error is clear; you're getting undefined references to pcre-code.

So we need to link to libpcre. I'd try adding "-lpcre -lpcrecpp". This is assuming you've got libpcre3-dev, or whatever the package is called, present.

If that doesn't fix it I'm a little stumped because I'm not familiar with Fedora.

It doesn't feel like it should be too hard to fix, but without access to such a system I'm running out of things to suggest..

icon Nux at 12:57 on 16 July 2013
http://www.nux.ro

Thanks, Steven, that worked.
Do you think the "official" Makefile can be modified to fix this issue or should I add one more sed line to my spec file?


icon Steve Kemp at 13:00 on 16 July 2013

I suspect the best thing to do is to setup flags via pcre-config, and if that fails just default to "-lpcre -lpcrecpp".

I'll think it over tonight.

Glad you got there though; and if you hit problems do report them in the github tracker / mail me directly.