Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

kaare (663)

  (email not shown publicly)

Journal of kaare (663)

Friday October 31, 2008
05:06 AM

Perl Mail Server

[ #37771 ]

I installed qpsmtpd (journal entry a while ago. It is fun, you can mess with separate bits and pieces the usual Perl way, and qpsmtpd has a very low ressource consumption on the system.

So, just a thought. Why not implement a full-feature mail system in Perl? At least it would be nice to know if all the different mail server elements exist in Perl.

A quick look turns up rather mixed. Perl email modules mostly look dead, but so did Qpsmtpd until I started looking.

SMTP Server
Short answer: Qpsmtpd

Local delivery
You can manage your sieve scripts with Net::Sieve. Perhaps there could be a Qpsmtpd plugin for delivery using Sieve scripts.

I only found Tipjar::MTA. Doesn't support ESMTP according to the POD. Doesn't seem to be actively developed. But then again, I saw a patch to Qpsmtpd supporting tipjar recently.

IMAP Server

POP3 Server
POP3 is not a necessity in my world, but I know people who still use it. I haven't found any (recently active) Perl POP3 Server yet.

Mail storage
Email::Store (and PostgreSQL)
Even if it seems to be Abandonware like the rest of Perl Email Project ( (it hasn't been touched for the last two years), it has at leas the notion of headers, body, attachment et al. There's also a database backend, which is a nice touch. With a proper database you would avoid the problem that the server could choke after only a few thousand emails in a folder. Also you could use all of the advanced features of your database. Full text search, for example, if you use Postgres.

Text search
PostgreSQL fulltext search
Other options: Use a text indexer, e.g. Xapian.

Mailing lists
and more. I'm sure there are more modules you could fit into a mail server. I didn't find a ready-to-use mailing list implementation, but it wouldn't be too hard to make one from scratch or from already existing modules.

Why would you want an all-Perl Mail Server? Well, you don't necessarily. But it would be easy to plug in some module to process an email for whatever reason it could support your personal or professional needs. Perhaps you would like specialized statistics on your email storage or email usage? Mail archiving? Easy program / email interaction?

This was just a thought experiment. I do wonder what happened to the Perl Email Project, though.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Here is a big sample of code from my cpan dir:

    Email-Abstract-2.134                  16 Nov 2007
    Email-Address-1.889                   19 Dec 2007
    Email-ARF-0.003                       23 Mar 2007
    Email-Date-1.103                      30 Nov 2007

    • s/most/much/

      Clearly I should not post when pissed off.

      • For the record, as soon as I read that, I thought “quick, someone tell RJBS!” But it didn’t seem productive to act upon it, so I didn’t respond nor did I ping you.

    • Thanks for your feedback.

      I'm referring to a wiki that hasn't been touched for a long time (OK 1½ years, not two years. Still forever in Internet - and especially Perl time).

      But I'm happy to see that there's a lot of later activity elsewhere.