def check_quirks
    return unless @conn &&
        @conn.greeting.kind_of?(Net::IMAP::UntaggedResponse) &&
        @conn.greeting.data.kind_of?(Net::IMAP::ResponseText)

    if @conn.greeting.data.text =~ /^Gimap ready/
      @quirks[:gmail] = true
      debug "looks like Gmail"

    elsif host =~ /^imap(?:-ssl)?\.mail\.yahoo\.com$/
      @quirks[:yahoo] = true
      debug "looks like Yahoo! Mail"
          
    elsif host =~ /emailsrvr\.com/
      @quirks[:rackspace] = true
      debug "looks like Rackspace Mail"
    end
  end
def check_quirks
    return unless @conn &&
        @conn.greeting.kind_of?(Net::IMAP::UntaggedResponse) &&
        @conn.greeting.data.kind_of?(Net::IMAP::ResponseText)

    if @conn.greeting.data.text =~ /^Gimap ready/
      @quirks[:gmail] = true
      debug "looks like Gmail"

    elsif host =~ /^imap(?:-ssl)?\.mail\.yahoo\.com$/
      @quirks[:yahoo] = true
      debug "looks like Yahoo! Mail"
          
    elsif host =~ /emailsrvr\.com/
      @quirks[:rackspace] = true
      debug "looks like Rackspace Mail"
    end
  end
Tries to identify server implementations with certain quirks that we'll need
 to work around.