Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

undefined method `each' for "\"lvivol ict (Групи Google)\" <noreply@googlegroups.com>":String #94

Open
bartezic opened this issue Feb 6, 2014 · 1 comment

Comments

@bartezic
Copy link

bartezic commented Feb 6, 2014

In script/mailman_server:

#!/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
require "mailman"

Mailman.config.logger = Logger.new("log/mailman.log")

Mailman.config.pop3 = {
  server: 'pop.gmail.com', port: 995, ssl: true,
  username: '',
  password: ''
}

Mailman::Application.run do
  to 'bartezic@gmail.com' do
    begin
      puts message.inspect
    rescue Exception => e
      Mailman.logger.error "Exception occurred while receiving message:\n#{message}"
      Mailman.logger.error [e, *e.backtrace].join("\n")
    end
  end
end

Just executed like a script chmod +x script/mailman_server and run script/mailman_server.

In few seconds i received next error:

/home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/route/conditions.rb:21:in `match': undefined method `each' for "\"lvivol ict (Групи Google)\" <noreply@googlegroups.com>":String (NoMethodError)
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/route.rb:29:in `block in match!'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/route.rb:28:in `each'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/route.rb:28:in `match!'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/router.rb:48:in `block in route'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/router.rb:47:in `each'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/router.rb:47:in `route'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/message_processor.rb:23:in `block in process'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/middleware.rb:33:in `call'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/middleware.rb:33:in `block in run'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/middleware.rb:38:in `call'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/middleware.rb:38:in `run'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/message_processor.rb:22:in `process'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/receiver/pop3.rb:43:in `block in get_messages'
    from /home/voleksyn/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/pop.rb:665:in `each'
    from /home/voleksyn/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/pop.rb:665:in `each_mail'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/receiver/pop3.rb:42:in `get_messages'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/application.rb:133:in `block in polling_loop'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/application.rb:130:in `loop'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/application.rb:130:in `polling_loop'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/application.rb:83:in `run'
    from /home/voleksyn/.rvm/gems/ruby-2.0.0-p247@mc/gems/mailman-0.7.0/lib/mailman/application.rb:11:in `run'
    from script/mailman_server:14:in `<main>'

Can you help? How I can fix it?

@Mic92 Mic92 added the bug label Dec 21, 2014
@Mic92
Copy link
Contributor

Mic92 commented Dec 21, 2014

Can you provide an example email, where this happens?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants