# Heavy e-mail receive

**URL:** <https://www.ruby-forum.com/t/heavy-e-mail-receive/93469>\
**Category:** Rails\
**Created:** [April 3, 2006, 8:22pm UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469 "2006-04-03T20:22:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [April 3, 2006, 8:22pm UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469/1 "2006-04-03T20:22:32Z")

</div>

Performance experts,

Normally to receive e-mails is to pipe their content to script/runner  
individually from a mail server, sendmail or postfix. Doesn’t this  
configuration run like Apache 1.3 with CGI, meaning for each e-mail a  
boot of the entire Rails environment and thus low scalability?

Is there anything working like lighttpd-fcgi or going toward its  
approach?

DD

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [April 4, 2006, 2:37am UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469/2 "2006-04-04T02:37:25Z")

</div>

We’ve solved this problem by writing a little gateway that receives  
SMTP and submits each incoming e-mail to Rails as a HTTP post.

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [April 4, 2006, 5:02am UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469/3 "2006-04-04T05:02:14Z")

</div>

On Apr 3, 2006, at 11:22 AM, Doug D. wrote:

> Normally to receive e-mails is to pipe their content to script/runner  
> individually from a mail server, sendmail or postfix. Doesn’t this  
> configuration run like Apache 1.3 with CGI, meaning for each e-mail a  
> boot of the entire Rails environment and thus low scalability?

You can receive to an account, and retrieve via POP.

–  
– Tom M.

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [April 4, 2006, 7:30pm UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469/4 "2006-04-04T19:30:49Z")

</div>

Pete Y. wrote:

> We’ve solved this problem by writing a little gateway that receives  
> SMTP and submits each incoming e-mail to Rails as a HTTP post.

It sounds great. Is this little gateway open-sourced?

If not, the POP or mail file processing can be a quick performance  
workaround.

Thank you for the hints!

DD

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [April 5, 2006, 2:05am UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469/5 "2006-04-05T02:05:24Z")

</div>

On 05/04/2006, at 3:30 AM, Doug D. wrote:

> Pete Y. wrote:
> 
> > We’ve solved this problem by writing a little gateway that receives  
> > SMTP and submits each incoming e-mail to Rails as a HTTP post.
> 
> It sounds great. Is this little gateway open-sourced?

Sorry, no. It shouldn’t be hard to write your own though. If you have  
your own mail server forwarding email in, then you only need to  
support enough of a subset of SMTP to keep your mail server happy.

Cheers,

Pete Y.

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [April 4, 2006, 6:52pm UTC](https://www.ruby-forum.com/t/heavy-e-mail-receive/93469/6 "2006-04-04T18:52:56Z")

</div>

I have my mail server write the emails to files, and I run a Rails  
daemon  
that processes the files.
