Path: | NEWS |
Last Update: | Sun Jan 03 02:51:51 -0500 2010 |
require 'rmail'
and get all of RubyMail.
The result is that RMail can now be used safely in mail filters without risking damaging cryptographic signatures in the mails.
This keeps RubyMail a small and simple mail package, and provides RubyFilter as an example of how to use RubyMail to write a mail filter.
When parsing a huge message that has a 2 megabyte attachment, RubyMail running under ruby 1.7 is now faster than any email package for ruby, perl or python.
I wrote a benchmark that reads a 2 megabyte email from a file and writes it out again, doing this 100 times. The results are:
ruby 1.7.2 w/rubymail (100 times) 5.96s user 7.98s system 13.94s total ruby 1.6.6 w/rubymail (100 times) 76.91s user 8.62s system 85.53s total ruby 1.7.2 w/tmail 0.10.1 (100 times) 9.85s user 24.21s system 34.06s total ruby 1.6.6 w/tmail 0.10.0 (100 times) 201.89s user 15.75s system 217.64s total python 2.2 w/email (100 times) 76.73 user 15.16s system 91.89s total perl 5.006001 w/mimetools 5.411 (parsing on disk) (100 times) 190.11s user 25.25s system 215.36s total perl 5.006001 w/mimetools 5.411 (parsing in memory) (100 times) 962.69s user 6.77s system 969.46s total
This change also paves the way for streaming large messages to disk when they start to get huge, so RAM isn‘t needlessly used up.
def main lda.save("INBOX") end