# Ruby IMAP with Cyrus server

**URL:** <https://www.ruby-forum.com/t/ruby-imap-with-cyrus-server/71632>\
**Category:** Ruby\
**Created:** [October 10, 2006, 2:45pm UTC](https://www.ruby-forum.com/t/ruby-imap-with-cyrus-server/71632 "2006-10-10T14:45:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/c5a1d2/32.png) [@fox](https://www.ruby-forum.com/u/fox)\
**Post date:** [October 10, 2006, 2:45pm UTC](https://www.ruby-forum.com/t/ruby-imap-with-cyrus-server/71632/1 "2006-10-10T14:45:56Z")

</div>

Hi All,  
I’m trying to authenticate to my imap server using the Net::IMAP  
library.  
i’m doing this:

require ‘net/imap’  
imap = Net::IMAP.new(‘[my.server.com](http://my.server.com)’)  
#i get an imap object back  
imap.authenticate(‘LOGIN’,‘user’,‘password’)  
and at that point there’s a pause then i get:  
Net::IMAP::NoResponseError: encryption needed to use mechanism

my imap server is set to accept these sasl authentications:  
plain login

and my cyrus log says this:  
LOGIN [SASL(-16): encryption needed to use mechanism: security flags do  
not match required]

any ideas how to enable the correct authentication methods on this?

many thanks for reading,  
cheers.  
fox

---

<div class="post-metadata">

**Author:** ![fox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/c5a1d2/32.png) [@fox](https://www.ruby-forum.com/u/fox)\
**Post date:** [October 10, 2006, 7:46pm UTC](https://www.ruby-forum.com/t/ruby-imap-with-cyrus-server/71632/2 "2006-10-10T19:46:28Z")

</div>

On Oct 10, 2006, at 5:45 AM, Fox Ph wrote:

> Net::IMAP::NoResponseError: encryption needed to use mechanism
> 
> my imap server is set to accept these sasl authentications:  
> plain login
> 
> and my cyrus log says this:  
> LOGIN [SASL(-16): encryption needed to use mechanism: security  
> flags do  
> not match required]
> 
> any ideas how to enable the correct authentication methods on this?

You probably need to use an SSL connection. LOGIN sends a  
recoverable password.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)
