# How to resolve "Can not decode an entire message...." error in logstash while usingImap plugin?

**URL:** <https://discuss.elastic.co/t/how-to-resolve-can-not-decode-an-entire-message-error-in-logstash-while-usingimap-plugin/309114>\
**Category:** Logstash\
**Created:** [July 7, 2022, 12:32pm UTC](https://discuss.elastic.co/t/how-to-resolve-can-not-decode-an-entire-message-error-in-logstash-while-usingimap-plugin/309114 "2022-07-07T12:32:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayush\_Gupta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ayush_gupta/32/99542_2.png) [@Ayush\_Gupta](https://discuss.elastic.co/u/Ayush_Gupta)\
**Post date:** [July 7, 2022, 12:32pm UTC](https://discuss.elastic.co/t/how-to-resolve-can-not-decode-an-entire-message-error-in-logstash-while-usingimap-plugin/309114/1 "2022-07-07T12:32:19Z")

</div>

Hi, I am new to Elasticsearch and logstash when I use imap plugin "Can not decode an entire message...." error appears. I have read many posts, understood a few but still unable to get what to do to resolve these errors while allowing attachments. Following is input configuration of logstash. Logstash version is 8.2.1

```nohighlight
  imap {
    host => "ip"
    user => "username"
    password => "password"
    port => 143
    check_interval => 4
    folder => "Inbox"
    strip_attachments => "false"
    ecs_compatibility => disabled
    secure => false
    content_type => "application/gzip"
    save_attachments => true
 }
}

```

---

<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:** [August 4, 2022, 12:32pm UTC](https://discuss.elastic.co/t/how-to-resolve-can-not-decode-an-entire-message-error-in-logstash-while-usingimap-plugin/309114/2 "2022-08-04T12:32:33Z")

</div>

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