Wilson's Landing RSS

Archive

Aug
28th
Thu
permalink

How to search anything for free

I want to build a simple rails application that downloads email from a imap account and places its contents into a table in a MYSQL Database. I’d like this database to be searchable on any of the variables it stores. 

http://www.slashdotdash.net/articles/2007/08/06/rails-searching-with-sphinx

http://www.datanoise.com/articles/2007/3/23/acts_as_sphinx-plugin

Dont forget # It looks like the UltraSphinx plugin requires edge Rails (thanks Evan)!

http://railspikes.com/tags/pop - How to daemonize our mail fetcher.

http://blog.phusion.nl/2008/08/25/daemon_controller-a-library-for-robust-daemon-management/ - How our mail fetcher and sphinx indexer should be triggered. 

cron job calls a bash script that curls a URL of a page on the site that uses calls some ruby that uses daemon_controller from phusion to check if the mail fetcher is running, if not start it, and if there are any errors email them to the system admin. http://blog.phusion.nl/2008/08/25/daemon_controller-a-library-for-robust-daemon-management/

We’ll use http://railspikes.com/tags/pop to create a mail_fetcher daemon 

We’d use Actiomailer with IMAP support for archiving at http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer

http://codeclimber.blogspot.com/2008/06/using-ruby-for-imap-with-gmail.html

There should be:

attachments:(attachments are stored once)

hash_id:

validation_hash_id: unique

belongs_to_many_or_one: emails

emails: (each actual email the system downloads)

hash_id:

indexed_on: recipients

validation_hash_id: unique

email_accounts: (an IMAP or POP account that the mailfetcher should check)

have_many: emails

users: (a user has a username and password on the system)

security_level:

have_many: email_accounts

accounts: (each account is like one customer)

have_many: users