Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,61 @@ | ||
ReceiveD | ||
======== | ||
Yet another way for receiving mail with Rails. ReceiveD is almost RFC2033 compliant LMTP server. | ||
The receive daemon will listen on TCP or UNIX socket, and write the mail to the backend storage. | ||
|
||
Currently only MongoDB is supported, but writing another backend (MySQL, Redis, etc.) is trivial. | ||
ReceiveD is yet another way for receiving mail with Rails. | ||
Why have yet another subsystem (like IMAP), when you can deliver the mail | ||
directly to your data store? | ||
|
||
ReceiveD is almost [RFC2033][1] compliant LMTP server built around | ||
[eventmachine][2] and as such should be quite fast. | ||
|
||
The receive daemon will listen on TCP or UNIX socket, and write the mail | ||
to the backend storage. | ||
|
||
Currently only [MongoDB][3] is supported, but writing another backend | ||
(MySQL, Redis, etc.) is trivial. | ||
|
||
|
||
Installation | ||
------------ | ||
`sudo gem install received` | ||
|
||
Modify your postfix configuration to deliver mail to unix socket. | ||
Modify your [Postfix][4] configuration to deliver mail via LMTP to TCP or UNIX socket. | ||
|
||
Example main.cf: | ||
virtual_transport = lmtp:192.168.2.106:1111 | ||
virtual_mailbox_domains = example.com | ||
|
||
Create a YAML configuration file which has the following parameters: | ||
{'production'=>{'host'=>hostname, 'database'=>db, 'collection'=>col}} | ||
|
||
The mongoid.yml will do, just add the name of collection, i.e. | ||
<pre> | ||
production: | ||
<<: *defaults | ||
database: foo_production | ||
collection: inbox | ||
</pre> | ||
|
||
The default environment is 'production', you can specify other environment using RAILS_ENV environment variable. | ||
|
||
production: | ||
<<: *defaults | ||
database: foo_production | ||
collection: inbox | ||
|
||
The default environment is *production*, but you can specify other environment | ||
using RAILS_ENV environment variable. | ||
In this case, make sure you have the relevant key in your configuration file. | ||
|
||
|
||
Running | ||
------- | ||
Check -h for help, port/unix socket path and config file are required. | ||
|
||
|
||
Bugs and missing features | ||
------------------------- | ||
|
||
* ReceiveD wasn't really tested for compliance with RFC2033 | ||
* As such, it doesn't perform validation of the provided input, e.g. LHLO, MAIL FROM, RCPT TO | ||
* It doesn't implement [RFC2034][5] (ENHANCEDSTATUSCODES), because Postfix doesn't seem to care | ||
* It doesn't perform any validation of the provided input, e.g. LHLO, MAIL FROM, RCPT TO | ||
|
||
[1]: http://tools.ietf.org/html/rfc2033 | ||
[2]: http://rubyeventmachine.com/ | ||
[3]: http://www.mongodb.org/ | ||
[4]: http://www.postfix.org/ | ||
[5]: http://tools.ietf.org/html/rfc2034 | ||
|
||
Copyright (c) 2011 Roman Shterenzon, released under the MIT license |