15

I've been learning Haskell for some time now and with every new programming language I learn I do a little project that requires working with a mail server and publishing RSS and Atom content. The only problem is, I can't seem to find decent packages for these or at least can't find any reviews of packages.

So I'll ask the community:

Any preferred packages for interacting with a mail server? (IMAP, POP3 etc)

Any preffered packages for publishing an RSS and/or Atom feed? Failing that, any preferred package for general XML?

Any suggestions for a minimalistic, low friction webserver to bind all of that together?

Thanks in advance.

Don Stewart
  • 137,316
  • 36
  • 365
  • 468
Michael
  • 2,910
  • 3
  • 15
  • 26
  • 4
    May I ask why this question was closed? There are other questions on libraries, both Haskell and in other languages and they aren't closed. – Michael Jul 15 '12 at 21:53
  • 1
    The `feed` library is a good choice for serious RSS work. For publishing, I quite like `feed-cli`, or `feed` itself. – Don Stewart Jul 15 '12 at 23:20
  • 2
    @DonStewart we've had problems using the `feed` package to parse feeds in the past, a combination of slow performance, space leaks and incompatibility with real (not exactly RFC compliant) feeds... and so we ended up writing yet another parser based on `xml-enumerator`. One of these days we'll probably port it over to `xml-conduit` and put it up on hackage. – Nathan Howell Jul 16 '12 at 05:04
  • First of all, thanks to everyone who voted to reopen, made my day. Second, @NathanHowell if I don't need parsing capabilities, just publishing, is `feed` good enough? – Michael Jul 16 '12 at 07:50
  • I'd suspect so, but we don't use it for parsing (which we do a whole lot of) or publishing (which we do none of)... I was responding to the "serious" bit of @dons comment. – Nathan Howell Jul 16 '12 at 08:00

1 Answers1

2

Just to answer this question, the feed package is good for producing rss. For email, folks typically just shell out to the sendmail executable directly. The mime-mail package provides a wrapper around this along with some additional tools. If you want to read email, the typical way is to set up procmail or the like, and then use an mbox parser to interact with the generated files directly. Two parsers are mbox and codec-mbox.

If you really want to interact with pop3/imap, you can do the former with pop3-client and the latter with HaskellNet, which is pretty old but apparently works. Example code for using it is available here.

Davorak
  • 7,362
  • 1
  • 38
  • 48
sclv
  • 38,665
  • 7
  • 99
  • 204
  • Thanks for the detailed explanation! Since I only need to do very lightweight work I think I'll use pop3-client but thanks for pointing out the procmail way. – Michael Aug 03 '12 at 17:11