From: James Britt Date: 2004-11-10T10:23:07+09:00 Subject: Re: Ruby and Mozilla? Hal Fulton wrote: > Is there any Ruby code out there that can interact with Mozilla > (email, I mean)? > > I'm interested in both browsing and email, but right now I am > looking at email primarily. > > For example, I'd like to write Ruby code of my own to filter spam. > So I'd like to connect to the remote POP server (pretty easy) and > grab the messages and analyze them. I'm doing something like that myself, with qmail, spamassasin, and Ruby. I have a cron job on the mail server that checks mail and deletes items that meet obvious spam criteria. I have another Ruby script that gets passed mail after spamassasin has rendered judgment. That would be the better place to delete obvious crap, but I don't know how to do this without annoying qmail, which expects to be passed something once Ruby is done with it. I believe there are ways to do some conditional stuff in .qmail files, but I haven't had the time to figure it out. I'm reluctant to experiment too much to soon, for fear of losing mail. > > But then, how do I get the filtered data to Moz? I *could* set up > my own local POP server and forward all messages there... that > seems like overkill. Is this for a machine that does not currently have a mail server running? Or are you looking to pull mail down to your local machine, processes it, and then pass it to Mozilla? I wonder if you can just write the mail to the mail files directly? Or run a local "mail" proxy so that Mozilla thinks it is fetching mail, but is really just getting passed files from disk. James