<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Jason Seifer - Latest Comments in Receiving Email with Rails</title><link>http://jasonseifer.disqus.com/</link><description></description><atom:link href="https://jasonseifer.disqus.com/receiving_email_with_rails/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 13 Jan 2010 13:04:32 -0000</lastBuildDate><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-29655045</link><description>&lt;p&gt;After looking at this we went with a model where we had a daemon that would just sit there and poll frequently to an IMAP server. We are using a google apps account to do this and it makes this much easier. You dont have to run your own mail server, you can just poll as frequent or non frequent as you want and if you really want instant you can turn on IMAP IDLE support and then you can get the mail as they come in. Since there is only one daemon running we no longer have this problem. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phegaro</dc:creator><pubDate>Wed, 13 Jan 2010 13:04:32 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-29654296</link><description>&lt;p&gt;Is this true?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Me</dc:creator><pubDate>Wed, 13 Jan 2010 12:55:33 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-22462483</link><description>&lt;p&gt;I have several webapps needing this service hosted on the same server (each app receiving mail sent to a different domain).&lt;/p&gt;&lt;p&gt;I'm thinking of creating a separate Rails project just to do the mail receiving.  The domain info would be stored in the model so the webapps can separate their mail from each other.&lt;/p&gt;&lt;p&gt;Does this sound reasonable?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jose</dc:creator><pubDate>Mon, 09 Nov 2009 13:42:14 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-21945919</link><description>&lt;p&gt;Great article. Only I would use an unless statement, rather than if and a boolean negation operator. more ruby like and more readable IMHO.&lt;/p&gt;&lt;p&gt;i.e.,&lt;/p&gt;&lt;p&gt;unless mail.to.nil?&lt;br&gt;  BEANSTALK = Beanstalk::&lt;a href="http://Pool.new" rel="nofollow noopener" target="_blank" title="Pool.new"&gt;Pool.new&lt;/a&gt;(['127.0.0.1:11300'])&lt;br&gt;  …&lt;br&gt;end&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Stevie Graham</dc:creator><pubDate>Thu, 05 Nov 2009 11:43:45 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-17390335</link><description>&lt;p&gt;I thought the mail_receiver.rb file will be lauched for each email received and then will stick the email in the queue. I realize that it does not do much but it is creating a ruby process and letting it exit for each email. Is that a high overhead on a system?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phegaro</dc:creator><pubDate>Fri, 25 Sep 2009 14:37:24 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-17369607</link><description>&lt;p&gt;Doing it this way specifically avoids spinning up a new process each time as you're running it as a daemon.  You wind up having one process running constantly that processes each one as they come in.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jason Seifer</dc:creator><pubDate>Fri, 25 Sep 2009 07:43:57 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-17360937</link><description>&lt;p&gt;Some of the other information that i have read talks about how doing it this way means that a new ruby process is started and killed for each email that comes into the system. According to the math above that would mean that you have about 833 processes being created/deleted per minute on the server. Are you guys having issues with that model?&lt;/p&gt;&lt;p&gt;It seems the polling model avoids this but not sure if the tradeoff for less processes is worth the loss in responsiveness and can we just poll more often to get rid of the issue? Like once ever minute?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">phegaro</dc:creator><pubDate>Fri, 25 Sep 2009 03:40:10 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-8640535</link><description>&lt;p&gt;how do you guys deal with stripping the quoted original message out of the reply?&lt;br&gt;in one of my apps users can reply to message notifications by e-mail and the mail processor parses out their comments and posts them in the thread. we've taken to writing a new regexp every time we come across a new e-mail client and falling back on cutting everything after something like "=== Post your comments above this line ===". any better ideas?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">morgancurrie</dc:creator><pubDate>Fri, 24 Apr 2009 03:36:06 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-8640516</link><description>&lt;p&gt;Piping emails to a ruby process can present some scaling issues.  Each email is basically another ruby process that loads rubygems, tmail, mms2r, etc.  It's probably better to just have postfix dump emails to a maildir and have tmail read them in a little ruby daemon: &lt;a href="http://tmail.rubyforge.org/rdoc/classes/TMail/Maildir.html" rel="nofollow noopener" target="_blank" title="http://tmail.rubyforge.org/rdoc/classes/TMail/Maildir.html"&gt;http://tmail.rubyforge.org/...&lt;/a&gt; .  I handled all of our email processing fine with ruby pipes for awhile.  But when I moved to our current host, they were quick to suggest using a maildir.&lt;/p&gt;&lt;p&gt;I didn't know about mms2r, but I'll take a look at that.  I think I parse the mail parts manually with tmail right now, blah :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">technoweenie</dc:creator><pubDate>Fri, 24 Apr 2009 03:33:55 -0000</pubDate></item><item><title>Re: Receiving Email with Rails</title><link>http://jasonseifer.com/2009/04/24/receving-email-with-rails#comment-8640331</link><description>&lt;p&gt;hey jason - also check out Astrotrain on github. it receives e-mail and issues xmpp or http in response. blatant plug for my employer but it's what enables Tender to turn e-mails into support discussions. like how Tripit turns e-mails into itineraries automagically.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">giles bowkett</dc:creator><pubDate>Fri, 24 Apr 2009 03:14:59 -0000</pubDate></item></channel></rss>