New Module: Request for Input -- Mail::Maildir

From: Edward L. Abrams (edward.abrams_at_corp.terralycos.com)
Date: 06/21/04

  • Next message: Eric Olson: "Re: Nested hash conversion to HTML"
    Date: 21 Jun 2004 10:21:02 -0700
    
    

    Hello,

    I have written a first version of a Mail::Maildir module. Before I
    submit the module to PAUSE, I thought I would briefly discuss my
    module here, and solicit some input.

    "Maildir" and "Maildir++" are the names of a particular folder and
    file format for storing internet email. The original specification
    for the format can be found here: http://cr.yp.to/proto/maildir.html.
    The updated specification for Maildir++ can be found here:
    http://www.inter7.com/courierimap/README.maildirquota.html.

    There is prior art for this module: http://www.leapster.org/maildir/
    offers a Mail::Maildir package that was (to my knowledge) not
    submitted to PAUSE and cannot (to my knowledge) be found on CPAN.
    This module offers a fairly simple API to Maildir and does not appear
    to include full Maildir++ support. The author claims the package is
    "badly coded" and "may not be necessarily stable or bug-free." The
    package does not include any automated testing.

    Another interesting package is Mail::Folder, which includes an
    implementation of Maildir, again, not Maildir++. This fundamental
    strategy of the Mail::Folder module appears to be to implement a
    *Folder Reader* -- for example, upon calling open() for
    Mail::Folder:Maildir, various activities happen automatically, such as
    cleaning messages from tmp, moving messages from new to cur and
    modifying/adding message headers (AFAICT).

    Then there is the successor to Mail::Folder, Mail::Box. This would be
    the intuitively ideal place to put my module in some respects.
    Mail::Box contains a very light implementation of Maildirs that
    appears to primarily revolve around Maildir create/delete/isValid, and
    a message iterator with the intelligence to move things from tmp, new
    and cur in the appropriate fashion. This functionality *does* overlap
    with what is released in my module. However, Mail::Box does not
    include an implementation of Maildir++ AFAICT. In particular, I
    cannot find code that permits the manipulation of maildirsize files,
    nor code that creates folders with maildirfolder files. It also has
    an implementation of folders for Maildir that I do not understand,
    since Maildir does not permit folders, and Maildir++ folders are
    somewhat different than what is implemented. This may be simply a
    misunderstanding on my part.

    Mail::Maildir, the package I have written, departs in some ways from
    all of the above. Rather than providing a *Maildir Reader* sort of
    interface like Mail::Folder and Mail::Box, I have opted to tackle
    merely the folder management aspect of Maildir and Maildir++. So, for
    example, here is a partial list of the API call types that are
    supposed to be publicly available from my module:

    * open
    * create
    * delete
    * upgradeToPlusplus
    * setFolder
    * createFolder
    * createNamedTmpMessage
    * moveTmpToNew
    * moveNewToCur
    * trashMessage
    * getQuotaBytes
    * getQuotaMessages
    * setQuota
    * getMaildirUsage
    * calculateMaildirSize
    * listFolders
    * listMessages

    The purposes one might use Mail::Maildir for include the following:

    * mail injection scripts
    * Maildir management UIs
    * quota management

    I continue to believe that Mail::Maildir would be a useful perl
    package independently of Mail::Box, primarily because it need not be
    as heavy as that larger package for basic Maildir management
    functions. Perhaps I also believe that the general strategy of having
    the actual filesystem level abstraction in separate, independent
    packages, and the Reader implementation somewhere else that can
    consume those separate, independent packages, is a sound one.

    But I'm not sure. So I am actively soliciting your comments,
    suggestions, and input in the hopes that I can find a useful way to
    contribute this functionality.

    Thanks,

    -Eddie
    edward ((dot)) abrams {{at}} corp ((dot)) terralycos ((dot)) com


  • Next message: Eric Olson: "Re: Nested hash conversion to HTML"

    Relevant Pages

    • Re: Need help configuring folders in pine
      ... Anything you like (e.g. Maildir Collection) ... maildir type folders and directories. ... However, the old sent-mail, postponed-msgs and saved-messages ... or saved-messages folder be in maildir format. ...
      (comp.mail.pine)
    • Re: Need help configuring folders in pine
      ... :): All incoming mail is being tagged by Spamassassin. ... and I just need to set up pine for this setup. ... Anything you like (e.g. Maildir Collection) ... maildir type folders and directories. ...
      (comp.mail.pine)
    • Fwd: Re: postfix
      ... Mihira Fernando schrieb: ... That error message means the pop server cannot open the maildir directory ... the path where Postfix saves the ... forst send the user a test mail so that the maildor folders ...
      (Debian-User)
    • Re: [opensuse] SPAM filter in openSUSE 11.1
      ... My stumbling block is the fact that the mail is in MailDir ... I guess I would need the cron job to: ... Get the contents of some MailDir folders into, say, mbox format ... I guess there are tools for moving the mail from one format to another ...
      (SuSE)
    • Re: Imap
      ... Nate Duehr wrote: ... >> also parse and relocate existing mbox folders. ... Maildir in their home directory. ...
      (Debian-User)