# 'mailread' considered dangerous?

**URL:** <https://www.ruby-forum.com/t/mailread-considered-dangerous/72790>\
**Category:** Ruby\
**Created:** [February 24, 2006, 1:59pm UTC](https://www.ruby-forum.com/t/mailread-considered-dangerous/72790 "2006-02-24T13:59:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_SSWeber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@Martin\_SSWeber](https://www.ruby-forum.com/u/Martin_SSWeber)\
**Post date:** [February 24, 2006, 1:59pm UTC](https://www.ruby-forum.com/t/mailread-considered-dangerous/72790/1 "2006-02-24T13:59:14Z")

</div>

Hoi rubyists,

just wanted to state my opinion about mailreader. Imo it’s freaking  
dangerous  
to include something in the core distribution which doesn’t get emails  
right 🙂

It might be amusing to parse and look some at your emails, but if you  
want  
to seriously work with them, you can’t just use it. Neither is there any  
order  
of headers preserved (as is not required but asked for by rfc2822), nor  
is  
the storage of headers in a hash appropriate (you can have multiple  
headers  
with the same key and you shouldn’t be losing them). There’s probably  
more  
serious problems in there.

I’m aware this package is a ‘basic’ mail parsing capability, yet even  
though  
it’s ‘basic’ it should be _correct_! Next thing included is an Integer  
class  
whose ‘+’ method works ok if the number is even but does a ‘-’ when the  
number  
is odd ? (grmbl) _goes off junking half of his code to test rubymail  
now_

Thanks for listening.

-Martin

---

<div class="post-metadata">

**Author:** ![Martin\_SSWeber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@Martin\_SSWeber](https://www.ruby-forum.com/u/Martin_SSWeber)\
**Post date:** [February 27, 2006, 5:11pm UTC](https://www.ruby-forum.com/t/mailread-considered-dangerous/72790/2 "2006-02-27T17:11:42Z")

</div>

On Feb 24, 2006, at 7:56 AM, Martin S. Weber wrote:

> Next thing included is an Integer class  
> whose ‘+’ method works ok if the number is even but does a ‘-’ when  
> the number  
> is odd ? (grmb

I don’t know anything about MailRead, but what do you mean in the above?

---

<div class="post-metadata">

**Author:** ![Martin\_SSWeber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@Martin\_SSWeber](https://www.ruby-forum.com/u/Martin_SSWeber)\
**Post date:** [February 27, 2006, 5:30pm UTC](https://www.ruby-forum.com/t/mailread-considered-dangerous/72790/3 "2006-02-27T17:30:01Z")

</div>

On Tue, Feb 28, 2006 at 01:10:09AM +0900, Logan C. wrote:

> On Feb 24, 2006, at 7:56 AM, Martin S. Weber wrote:
> 
> > Next thing included is an Integer class  
> > whose ‘+’ method works ok if the number is even but does a ‘-’ when  
> > the number  
> > is odd ? (grmb
> 
> I don’t know anything about MailRead, but what do you mean in the above?

It’s a sarcastic analogy for mailread working fine for some kinds of  
inputs and just performing plain wrong for other kinds of inputs and the  
fact that this fact is just ignored with its inclusion in the standard  
distribution.

Would you expect a standard arithmetic package to get exponentation  
wrong?

Would you expect a standard email parser package to get email headers  
wrong?

-Martin

---

<div class="post-metadata">

**Author:** ![Martin\_SSWeber](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9dc877/32.png) [@Martin\_SSWeber](https://www.ruby-forum.com/u/Martin_SSWeber)\
**Post date:** [March 1, 2006, 7:12pm UTC](https://www.ruby-forum.com/t/mailread-considered-dangerous/72790/4 "2006-03-01T19:12:49Z")

</div>

Looks like this has recently been discussed on ruby-core…

start of thread  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6828](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6828)

mention of dropping headers which may appear multiple times  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6858](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/6858)

I don’t see that anything has been committed to CVS since… though I  
could be wrong.

-A
