Coder Social home page Coder Social logo

fetcher's People

Contributors

dweinand avatar johnhampton avatar look avatar mehakdeep avatar slayer avatar victorbstan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fetcher's Issues

IMAP disconnect error

Got this error while fetching IMAP email via Gmail

/Work/cashboard/site/trunk/vendor/rails/railties/lib/commands/runner.rb:45: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:in shutdown': Socket is not connected (Errno::ENOTCONN) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:indisconnect'
from /Work/cashboard/site/trunk/vendor/plugins/fetcher/lib/fetcher/imap.rb:69:in close_connection' from /Work/cashboard/site/trunk/vendor/plugins/fetcher/lib/fetcher/base.rb:33:infetch'
from (eval):9
from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:284:in lock' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:inattempt'
from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:in catch' from /Library/Ruby/Gems/1.8/gems/lockfile-1.4.3/lib/lockfile.rb:539:inattempt'
... 7 levels...
from /Work/cashboard/site/trunk/vendor/rails/railties/lib/commands/runner.rb:45
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire'
from script/runner:3

Changing the "close_connection" method in imap.rb fixes the error.

# Delete messages and log out
def close_connection
  @connection.expunge
  @connection.logout
  @connection.disconnect unless @connection.disconnected?
end

`syswrite': SSL_write:: ssl handshake failure (OpenSSL::SSL::SSLError)

Ran into a strange one.

This error shows up when connecting to Gmail and trying to create a new folder.

It seems to depend on the capitalization. When I have label names in my mail.yml like this:

in_folder: inbox
processed_folder: processed
error_folder: error

or this

in_folder: INBOX
processed_folder: PROCESSED
error_folder: ERROR

It gives the error.

But when I set them like this:

in_folder: Inbox
processed_folder: Processed
error_folder: Error

It works! Go figure.

Not sure why Gmail cares about the capitalization.

Turning off SSl verification as described here didn't seem to help.
https://github.com/look/fetcher/issues#issue/8

weird socket error

Sometimes I get this error:

Errno::ENOTCONN: Socket is not connected
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:in shutdown' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/imap.rb:288:indisconnect'
from /Users/jnylund/Projects/aras/vendor/plugins/fetcher/lib/fetcher/imap.rb:69:in close_connection' from /Users/jnylund/Projects/aras/vendor/plugins/fetcher/lib/fetcher/base.rb:33:infetch'
from (irb):9

Once I get it, I have to create a new Fetcher to get any more email.

Ruby 1.8.6 (osx) , have the latest fetcher (as of 2 days ago), rails 2.3.5. System Timer 1.0

any ideas?

to and from addresses are prefixed with dashes and spaces

Hi, I was able to fetch from Gmail, but one weird thing I noticed was the to and from address are prefixed with dashes, its very weird. I can trim them off, but was wondering if anyone else had seen this and if there was a fix out there.

looks like this, email between double quotes:

"--- - [email protected]"

thanks
Joel

Fetcher should accept a parameter to ignore bad SSL certificates

I know, I know, it kinda defeats the point of SSL entirely, but there's legitimate cases where this is useful (e.g, Gmail having SSL issues randomly, all you care about is the emails, SSL isn't truly a problem in this case and you don't really care about security).

I implemented a patch for this - the following option would have to be specified in the config parameters:

ssl_verification: false

Then the core file (fetcher/lib/fetcher/imap.rb, around line 40) would be this:

def initialize(options={})
  @authentication = options.delete(:authentication) || 'PLAIN'
  @port = options.delete(:port) || PORT
  @ssl = options.delete(:ssl)
  @ssl_verification = options.delete(:ssl_verification)
  @use_login = options.delete(:use_login)
  @in_folder = options.delete(:in_folder) || 'INBOX'
  @processed_folder = options.delete(:processed_folder)
  @error_folder = options.delete(:error_folder) || 'bogus'
  super(options)
end

# Open connection and login to server
def establish_connection
  timeout_call = (RUBY_VERSION < '1.9.0') ? "SystemTimer.timeout_after(15.seconds) do" : "Timeout::timeout(15) do"

  eval("#{timeout_call}
            @connection = Net::IMAP.new(@server, @port, @ssl, nil, @ssl_verification)
            if @use_login
                @connection.login(@username, @password)
            else
                @connection.authenticate(@authentication, @username, @password)
            end
        end")
end

If I have time I'll fork and make a real patch, but I find myself incredibly busy these days. Figured it's worth noting here for anyone else who runs into this issue, if nothing else.

Google Buzzwords: Ruby, Gmail, IMAP, SSL, Certificates, Verify

SystemTimer with POP?

Just a quick question. I'm running Rails 2.3.8 with Ruby 1.8.7 on Engine Yard. I'm not sure what version of the plugin is installed, but i checked out the code and it looks like it might still be using Timeout.rb for POP, even though IMAP is set to use SystemTimer if it's there.

Should I set POP to use SystemTimer or is that only an IMAP issue? The server has experienced performance issues in the past.

Thanks,
DC

Fetcher and passenger issue?

I'm using Fetcher and monit on a rails app (thanks MMS2R). Monit keeps the process up for days, and Fetcher always grabs emails from the inbox i point it at. However after an unspecified period of time (roughly 6+ hours) after restarting the process, it fails to deliver the mail to my receive method. It still pulls them off the postfix server (verified through email log) but when i check my production database, there are no new entries.

For the first 6-ish hours i do see entries in my production DB, and at any time I can manually go into RAILS_ENV=production script/console and successfully test the receive method and verify entries in my production DB. Has anyone run into something similar?

If this isn't the proper place to address this issue please point me in the right direction. rails 2.2.2, ubuntu hardy, passenger, and ruby 1.8.6 .

noob question- script/generate fetcher_daemon MailerDaemon throws Error

I get this error when I try to generate a daemon. I have ruby 1.8.7 and rails 2.3.8.
I installed the fetcher daemon by doing:

script/plugin install git://github.com/look/fetcher.git

What could I be doing wrong?

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': no such file to load -- rails/generators (MissingSourceFile) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'

Fetcher daemon crashes every few days

I'm not sure what other relevant information to give. But monit seems to be having to relaunch the fetcher daemon between every 1-5 days. I suppose it's crashing, and I'm not sure if this would show up in any logs anywhere.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.