[Haskell-cafe] Stack space overflow in HaskellNet

Donn Cave donn at avvanta.com
Wed Jul 27 19:49:03 CEST 2011

Quoth Manfred Lotz <manfred.lotz at arcor.de>,

> In the end the only thing I need is to get the full message because I
> want to feed bogofilter to learn that a message is ham or spam.
> For the time being I decided to write my own program to fetch the data
> because it is a good exercise for a Haskell beginner as I am.

Sure, for a very limited case where you don't have to support any
options at all, it's as easy as you want it to be.  All the responses
are one line only and only one to a line, so you can read line by line
(and then switch to block read after a line that ends with {count}.)

The way I understand it, though, you do not need the full message,
you would be better off with the first part only.  The following
parts in a multipart/mixed message will just be reams of byte64
encoded nonsense for bogofilter's purposes, true?  If you fetch
"BODY[1]", you may once in a while get more than you need - both
text and HTML versions of a multipart/alternative sub-part - but
that won't happen often.


More information about the Haskell-Cafe mailing list