mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
Merge pull request #783 from bfritz/fix-imap-fetch-nomethoderror
[imap] ignore extra items from imap.fetch() Thanks for making Logstash awesome! :)
This commit is contained in:
commit
30245034d0
1 changed files with 1 additions and 0 deletions
|
@ -61,6 +61,7 @@ class LogStash::Inputs::IMAP < LogStash::Inputs::Base
|
|||
ids.each_slice(@fetch_count) do |id_set|
|
||||
items = imap.fetch(id_set, "RFC822")
|
||||
items.each do |item|
|
||||
next unless item.attr.has_key?("RFC822")
|
||||
mail = Mail.read_from_string(item.attr["RFC822"])
|
||||
queue << parse_mail(mail)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue