# Logstash imap input plugin. Want to trash mail. Error: undefined local variable or method \`id\_set'

**URL:** <https://discuss.elastic.co/t/logstash-imap-input-plugin-want-to-trash-mail-error-undefined-local-variable-or-method-id-set/66502>\
**Category:** Logstash\
**Created:** [November 18, 2016, 7:58am UTC](https://discuss.elastic.co/t/logstash-imap-input-plugin-want-to-trash-mail-error-undefined-local-variable-or-method-id-set/66502 "2016-11-18T07:58:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kjellgrb](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@kjellgrb](https://discuss.elastic.co/u/kjellgrb)\
**Post date:** [November 18, 2016, 7:58am UTC](https://discuss.elastic.co/t/logstash-imap-input-plugin-want-to-trash-mail-error-undefined-local-variable-or-method-id-set/66502/1 "2016-11-18T07:58:38Z")

</div>

Hi

I want the IMAP plugin to delete mail. I found undocumented settings

delete =\> true  
expunge =\> true

But then I get

Plugin: \<LogStash::Inputs::IMAP host=\>"xxxxxx", password=\>, user=\>"xxxxxx", secure=\>false, type=\>"imap", delete=\>true, expunge=\>true, id=\>"2669af6baf02b6bf8e3f352858bbbaef65814f4c-13", enable\_metric=\>true, codec=\>\<LogStash::Codecs::Plain id=\>"plain\_832f7c10-a7f9-4d39-98df-53d738776fa4", enable\_metric=\>true, charset=\>"UTF-8"\>, verify\_cert=\>true, folder=\>"INBOX", fetch\_count=\>50, lowercase\_headers=\>true, check\_interval=\>300, strip\_attachments=\>false, content\_type=\>"text/plain"\>  
Error: undefined local variable or method `id\_set' for #LogStash::Inputs::IMAP:0x77365167

Anybody that have manage to get the imap plugin to delete mails ?

I am running Logstash 1:5.0.1-1 on Ubuntu

Benny

---

<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:** [December 16, 2016, 7:59am UTC](https://discuss.elastic.co/t/logstash-imap-input-plugin-want-to-trash-mail-error-undefined-local-variable-or-method-id-set/66502/2 "2016-12-16T07:59:43Z")

</div>

Closed on December 16, 2016, 7:59am UTC

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