Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #6696

imap localhost: Unsupported authentication mechanism.

Newsgroups comp.lang.ruby
Date 2012-12-14 03:55 -0800
Message-ID <573ce29a-77aa-4195-8260-e161f7e4f316@googlegroups.com> (permalink)
Subject imap localhost: Unsupported authentication mechanism.
From Thufir <hawat.thufir@gmail.com>

Show all headers | View raw


How do you login to localhost imap?

code:

require 'rubygems'
require 'net/imap'


imap = Net::IMAP.new('localhost')
imap.authenticate('LOGIN', 'thufir', 'password')
imap.examine('INBOX')
imap.search(["RECENT"]).each do |message_id|
  envelope = imap.fetch(message_id, "ENVELOPE")[0].attr["ENVELOPE"]
  puts "#{envelope.from[0].name}: \t#{envelope.subject}"
end


running the code:

thufir@dur:~/ruby$ 
thufir@dur:~/ruby$ ruby imap.rb 
/home/thufir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/imap.rb:1141:in `get_tagged_response':  Unsupported authentication mechanism. (Net::IMAP::NoResponseError)
	from /home/thufir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/imap.rb:1195:in `block in send_command'
	from /home/thufir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
	from /home/thufir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/imap.rb:1177:in `send_command'
	from /home/thufir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/imap.rb:402:in `authenticate'
	from imap.rb:6:in `<main>'
thufir@dur:~/ruby$ 



I'm using dovecot-postfix and dovecot-imapd on Ubuntu 12.04.  Thunderbird connects to IMAP on localhost and reads fine with the above configuration (different password, of course).

The host is dur.bounceme.net of which bounceme.net is owned and operated by domains@no-ip.com, and which I've registered that FQDN host name.  It doesn't resolve to anything on DNS, it's just to have a FQDN.  I'm not sending nor receiving to the internet at large, everything is on localhost, aka dur.bounceme.net, and, of course, to re-iterate, thunderbird just connects to an IMAP server on localhost (dovecot-imapd) and works fine.

I don't see how it's an  Unsupported authentication mechanism. (Net::IMAP::NoResponseError) given that Thunderbird connects fine.



thanks,

Thufir

Back to comp.lang.ruby | Previous | NextNext in thread | Find similar


Thread

imap localhost:   Unsupported authentication mechanism. Thufir <hawat.thufir@gmail.com> - 2012-12-14 03:55 -0800
  imap localhost:   Unsupported authentication mechanism. Thufir <hawat.thufir@gmail.com> - 2012-12-14 04:06 -0800
    imap localhost:   Unsupported authentication mechanism. Thufir <hawat.thufir@gmail.com> - 2012-12-14 04:23 -0800
      imap localhost:   Unsupported authentication mechanism. Thufir <hawat.thufir@gmail.com> - 2012-12-14 14:47 -0800
  Re: imap localhost:   Unsupported authentication mechanism. 1935blackhawk@gmail.com - 2014-04-16 05:00 -0700
  Re: imap localhost:   Unsupported authentication mechanism. 1935blackhawk@gmail.com - 2014-04-16 05:13 -0700

csiph-web