# Not able to create index after first index uisng imap input plugin

**URL:** <https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810>\
**Category:** Logstash\
**Created:** [August 24, 2016, 11:32am UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810 "2016-08-24T11:32:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 24, 2016, 11:32am UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/1 "2016-08-24T11:32:26Z")

</div>

Hi All

I created a index using imap plugin. It went through successfully first time  
Then i realized i should change some fields type using template and i deleted the index

I re ran the logstash using same config file without doing any changes, but it is not creating index.

I suspect there is something like sincedb\_file in imap also. But don't know where it is

Here is my imap config file

```
input {
  imap {
    host => "imap.gmail.com"
    user => "abc@gmail.com"
    password => "abc"
    port => 993
    secure => true
  }
}

output {  
stdout { codec => rubydebug}
    elasticsearch { 
	   action => "index"
       hosts => "127.0.0.1:9200"	   
       index => "emailtest"       
       workers => 1
    }
 }
```

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 24, 2016, 2:32pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/2 "2016-08-24T14:32:00Z")

</div>

No one facing this problem?

I think this is common problem with all plugins in 2.3.4 logstash

I solved the problem of file using sincedb\_file, but how to solve for imap?

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 24, 2016, 6:08pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/3 "2016-08-24T18:08:16Z")

</div>

Hi All

I tried again downloaded brand new ES and Logstash and repeated the steps.  
I am able to create index for first time

after deleting and recreating the index is not possible

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 25, 2016, 3:10am UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/4 "2016-08-25T03:10:32Z")

</div>

Anyone have solution for this????

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 25, 2016, 5:48am UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/5 "2016-08-25T05:48:27Z")

</div>

AFAICT the imap input only processes unread messages, so to reprocess messages you'd have to mark them an unseen on the IMAP server.

> Anyone have solution for this????

Please have patience.

---

<div class="post-metadata">

**Author:** ![rkhapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rkhapre/32/48333_2.png) [@rkhapre](https://discuss.elastic.co/u/rkhapre)\
**Post date:** [August 25, 2016, 3:56pm UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/6 "2016-08-25T15:56:38Z")

</div>

Yes, this is working perfectly now

The mails should be unread to make it work.

Thanks a lot

---

<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:** [July 6, 2017, 4:41am UTC](https://discuss.elastic.co/t/not-able-to-create-index-after-first-index-uisng-imap-input-plugin/58810/7 "2017-07-06T04:41:35Z")

</div>


