# Logstash imap plugin read a lot of Duplication email

**URL:** <https://discuss.elastic.co/t/logstash-imap-plugin-read-a-lot-of-duplication-email/256150>\
**Category:** Logstash\
**Created:** [November 20, 2020, 3:59pm UTC](https://discuss.elastic.co/t/logstash-imap-plugin-read-a-lot-of-duplication-email/256150 "2020-11-20T15:59:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawn\_sun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shawn_sun/32/72735_2.png) [@shawn\_sun](https://discuss.elastic.co/u/shawn_sun)\
**Post date:** [November 20, 2020, 3:59pm UTC](https://discuss.elastic.co/t/logstash-imap-plugin-read-a-lot-of-duplication-email/256150/1 "2020-11-20T15:59:28Z")

</div>

version： logstash7.8.0 and elasticsearch7.8.0  
When I use Logstash imap input plugin to read email from IMAP server，The elasticsearch recive many repeat email

this is logstash.conf

```auto
 input {
	imap {
	 	host => "imap.mailhost.com"
	 	user => "user@mailhost.com"
	 	password => " ****"
	 	content_type => "text/plain"
	 	secure => true
	 	port => 993
	 	check_interval => 10
	 	folder => "Inbox"
	}
}
 
output {
	stdout { codec => rubydebug }
 
 	elasticsearch {
 		index => "emails"
 		document_type => "_doc"
 		hosts => "172.31.27.212:9200"
		user => "elastic"
		password => " ****"
	}
}

```

When I perform "./bin/logstash -f logstash.conf “ ，meanwhile send a test email, I Can see many repeat email print in the console.

Please help me location the problem, Thanks.

---

<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 18, 2020, 3:59pm UTC](https://discuss.elastic.co/t/logstash-imap-plugin-read-a-lot-of-duplication-email/256150/2 "2020-12-18T15:59:30Z")

</div>

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