views:

205

answers:

1

Hi,

I'll rewrite a different question of mine, because the problem case somewhat changed:

If I want to get mails from my mailserver (different machine) into my Rails App to process it there, what is faster:

  • Connecting via net/Pop or net/imap to download the mails
  • Storing the Mails on the Mailserver in a MySQL Database (using something like DBMail) and then connecting directly to the MySQL Database
  • Or is there a third option I'm not seeing yet? Maybe letting the mailserver itself post the Mail to the Rails App?

Thanks for your advice!

+1  A: 

There is not just third option, there are many :) You could for example mount mailserver's mailbox dir into your Rails app server. Then it would act like local folder and you can directly work with mailboxes, that would be probably the fastest solution as no IMAP/POP server software is not involved.

And if you are not obsessed with ActiveRecord, you can also use DataMapper's IMAP adapter. But I have no experience with that and don't know if it even works.

skrat