For assorted reasons, I've been contemplating putting together a sort of proxy for email. It would use Mail::POP3Client to retrieve stuff from the real server, possibly filter it, possibly annotate it with a header, and store it (probably one file for each message in a directory for each user account) along with some metadata (e.g., when it was pulled down from the server, which clients have retrieved it, and so forth) and then allow real mail clients to retrieve the messages. The messages would be permanently stored but would not be given to the same client app twice. (Thus, I could get my mail on more than one PC, test out beta mail clients, and so forth.) I would be writing it in a modular and hopefully extensible fashion so that it could be reused for things like spam filtering. As an added bonus, it could retrieve from the server on a cron job and so keep the ISP account from filling up if you take to long getting around to getting your mail (say, if you go away on vacation).

The part I need help with is serving out the mail. I tried to search CPAN for a mail server module, but I didn't find one. Maybe I used the wrong search words? I found an SMTP server module, but that won't help; I need POP3 or IMAP -- ideally both. My code can handle the logic of determining what messages are available and retrieving them from storage and so on, but I was hoping to find a module to handle the actual protocol(s). There's plenty of code on CPAN for the client side of these protocols, but I'm not finding POP3 or IMAP servers. There's Net::Server, of course, but do I really have to bite the bullet and implement the protocol RFCs?


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Modules for _serving_ email by jonadab

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.