Welcome to rfc822!

rfc822 is a library for handling RFC822 messages. It is meant as a playground for programmers that start to work with emails, and should be treated as such. It should not serve as a replacement for tools like procmail, nor should it be used to build such replacements at the current stage of development. However, it is built in a way which, I hope, makes it easy to use for quick-and-dirty solutions where speed is not so much the key (it still should be faster than a perl solution), but rapid development.

The rfc822 library is released under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Read ./INSTALL for information regarding compilation and installation. See the ./doc subdirectory for some documentation. The documentation is provided online as well. The ./demo subdirectory contains some sample programs, see below.

Important: In version 0.02 threaded logging classes were introduced. At this point there was the need for some portable threading library. We chose the boost thread library for this as it provides threading support for both Unices and Windows platforms. Please get your copy from http://www.boost.org (and install at least the thread part.)

Feel free to use the code according to the above license. Run it, test it, squeeze it, punch it hard, ... and tell me the results. If you want to include the library or parts of it in a project of your own, but you miss some part, please tell me.

Go here to download the source code.

16-Oct-2001, rebel42@users.sourceforge.net

By the way - if you did not noticed yet: This site is hosted by SourceForge Logo

Sample Applications

Executing make samples builds a number of samples in the current directory. Below is a short description of each of it. Note, that the sample applications can be connected via pipes, as in

cat ~/Mail/importante | cfilter 'from =~ "whitehouse"' | msgcnt

msgcnt [ <condition> ]

parses the mbox input stream, checks each individual message for the condition (if any), and prints the number of messages that pass, sorted by sender name. Some examples:

ufilter <email-addr> [ <email-addr> ... ]

parses the mbox input stream, and writes out all messages that are from the specified email addresses.

cfilter <condition>

parses the mbox input stream, checks each individual message for the condition, and prints out all messages that pass it. Some examples:

Make sure you apply correct shell escaping.