# Imap emails attachments

**URL:** <https://discuss.elastic.co/t/imap-emails-attachments/131924>\
**Category:** Logstash\
**Created:** [May 15, 2018, 12:09pm UTC](https://discuss.elastic.co/t/imap-emails-attachments/131924 "2018-05-15T12:09:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rouchad\_rouchad](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@rouchad\_rouchad](https://discuss.elastic.co/u/rouchad_rouchad)\
**Post date:** [May 15, 2018, 12:09pm UTC](https://discuss.elastic.co/t/imap-emails-attachments/131924/1 "2018-05-15T12:09:15Z")

</div>

i use elasticSearch 6.2 i want transfer my database(emails) from my gmail to elasticsearch  
the probleme is that elastcisearch can't read the emails which contains attachements like PDF , XML files  
i found that i need install : ingest plugin attachement  
i have installed it  
and when i start logstash i got this error :  
[2018-05-15T12:31:25,411][ERROR][logstash.pipeline] A plugin had an unrecoverable error. Will restart this plugin.  
Pipeline\_id:main  
Plugin: \<LogStash::Inputs::IMAP host=\>"[imap.gmail.com](http://imap.gmail.com)", password=\>, user=\>"rouchad767@gmail.com", port=\>993, secure=\>true, fetch\_count=\>15, check\_interval=\>10, folder=\>"Inbox", id=\>"5b54a6cc24ec8207c02a599c52899e0822d819c18ab6fea278f09e1ea2a56e8b", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_7ddc0b5d-4cbd-4467-9945-c7e6005478ac", enable\_metric=\>true, charset=\>"UTF-8"\>, verify\_cert=\>true, lowercase\_headers=\>true, delete=\>false, expunge=\>false, strip\_attachments=\>false, content\_type=\>"text/plain"\>  
Error: Can not decode an entire message, try calling #decoded on the various fields and body or parts if it is a multipart message.  
Exception: NoMethodError  
Stack: C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/mail-2.6.6/lib/mail/message.rb:1903:in decoded' C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:119:inparse\_mail'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:88:in block in check\_mail' org/jruby/RubyArray.java:1734:ineach'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:82:in block in check\_mail' org/jruby/RubyArray.java:1778:ineach\_slice'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:80:in check\_mail' C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:69:inblock in run'  
C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/stud-0.0.23/lib/stud/interval.rb:20:in interval' C:/elk/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-input-imap-3.0.6/lib/logstash/inputs/imap.rb:68:inrun'  
C:/elk/logstash/logstash-core/lib/logstash/pipeline.rb:516:in inputworker' C:/elk/logstash/logstash-core/lib/logstash/pipeline.rb:509:inblock in start\_input'

please i need your help  
thanks

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [May 17, 2018, 9:02am UTC](https://discuss.elastic.co/t/imap-emails-attachments/131924/2 "2018-05-17T09:02:05Z")

</div>

@rouchad_rouchad

Can you share the following:

- The logstash.conf which includes your input, filter, output for such email ingest.
- the logstash.yml
- the output of `bin/logstash-plugin list`

---

<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:** [June 14, 2018, 9:02am UTC](https://discuss.elastic.co/t/imap-emails-attachments/131924/3 "2018-06-14T09:02:45Z")

</div>

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