# Logstash input imap plugin 3.2.1 No server greeting

**URL:** <https://discuss.elastic.co/t/logstash-input-imap-plugin-3-2-1-no-server-greeting/354027>\
**Category:** Logstash\
**Created:** [February 24, 2024, 6:29am UTC](https://discuss.elastic.co/t/logstash-input-imap-plugin-3-2-1-no-server-greeting/354027 "2024-02-24T06:29:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatdragon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fatdragon/32/132051_2.png) [@fatdragon](https://discuss.elastic.co/u/fatdragon)\
**Post date:** [February 24, 2024, 6:29am UTC](https://discuss.elastic.co/t/logstash-input-imap-plugin-3-2-1-no-server-greeting/354027/1 "2024-02-24T06:29:58Z")

</div>

Installed version 3.2.1 logstash-input-imap on Elastic/logstash 8.11.1 and I get this error:  
ERROR][logstash.inputs.imap][main][b9cf826e6bcb4a03aae915640362d7e31ff45aa3980afc12c3cca2a437c6e280] Encountered error Net::IMAP::Error {:message=\>"No server greeting - connection closed", :backtrace=\>["/opt/logstash/vendor/bundle/jruby/3.1.0/gems/net-imap-0.4.10/lib/net/imap.rb:2598:in `get_server_greeting'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/net-imap-0.4.10/lib/net/imap.rb:2588:in `start\_imap\_connection'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/net-imap-0.4.10/lib/net/imap.rb:914:in `initialize'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/net-imap-0.4.10/lib/net/imap/deprecated_client_options.rb:74:in `initialize'", "org/jruby/RubyClass.java:917:in `new'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-input-imap-3.2.1/lib/logstash/inputs/imap.rb:128:in `connect'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-input-imap-3.2.1/lib/logstash/inputs/imap.rb:143:in `check_mail'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-input-imap-3.2.1/lib/logstash/inputs/imap.rb:136:in `block in run'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/stud-0.0.23/lib/stud/interval.rb:20:in `interval'", "/opt/logstash/vendor/bundle/jruby/3.1.0/gems/logstash-input-imap-3.2.1/lib/logstash/inputs/imap.rb:135:in `run'", "/opt/logstash/logstash-core/lib/logstash/java\_pipeline.rb:414:in `inputworker'", "/opt/logstash/logstash-core/lib/logstash/java_pipeline.rb:405:in `block in start\_input'"]}

dovecot IMAP is running without ssl and logstash config has secure and verify ssl to false.

logstash-input-imap 3.0.7 works on elasticsearch 7.x just fine with same dovecat server!

I even created a sever greeting on dovecat. Something is not right with the logstash input imap plugin.

---

<div class="post-metadata">

**Author:** ![fatdragon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fatdragon/32/132051_2.png) [@fatdragon](https://discuss.elastic.co/u/fatdragon)\
**Post date:** [February 24, 2024, 3:33pm UTC](https://discuss.elastic.co/t/logstash-input-imap-plugin-3-2-1-no-server-greeting/354027/2 "2024-02-24T15:33:07Z")

</div>

logstash config same in both cases:

```auto
input {
  imap {
  host => "xxxx.xxxxxxxx.com"
  password => "xxxxxx"
  user => "xxxxxxxxx"
  port => 993
  check_interval => 10
  secure => "false"
  verify_cert => "false"
  folder => "Inbox"
  add_field => {"parser" => "logstash"}
       }
      }

filter {
  mutate {
    remove_field => [ "message", "content-transfer-encoding" , "date" , "return-path" , "@version" , "m
ime-version", "from" , "@timestamp" , "message-id", "x-original-to" , "received" , "delivered-to" , "to
" ]
  }
}

output {
  stdout { codec => rubydebug }
  elasticsearch {
  index => "emails"
  hosts => ["localhost:9200"]
                }
       }

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 23, 2024, 3:33pm UTC](https://discuss.elastic.co/t/logstash-input-imap-plugin-3-2-1-no-server-greeting/354027/3 "2024-03-23T15:33:21Z")

</div>

Closed on March 23, 2024, 3:33pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
