Friday, January 26, 2018

Logstash Imap input plugin works, but not as described

I've been re-entering the world of Logstash as I attempt to leverage it for workflow automation solutions. If that sounds fun, it's because it is.

However, applications that don't work as described can cause an large amount of non-fun when on boarding them into your operations. Don't get me started on Autotask, for instance (whoa Nelly!).

I will call out the Logstash Imap input plugin here, however. It works, and is awesome. But the description is woefully incorrect-

Descriptionedit

Read mails from IMAP server
Periodically scan an IMAP folder (INBOX by default) and move any read messages to the trash.

So when setting this up for testing I thought it would look at emails in the "INBOX" and act on them via the filter rules and then move them to the trash. But in testing nothing happened at all. I was using two gmail accounts and the Ubuntu server had it's logstash and postfix properly set up. I was debugging and tailing and everything... and nothing was happening.

But send it an email, and then it works. Well, sorta- it acts on that new email via filter rules, but does not move it to the trash. And it leaves all the other emails alone.

I didn't post this to beat up on the Logstash team, I think they're doing wonderful work. It's just that I've perused at least three or four blogposts out in Internetland that show how to use this input... and none of them reference this documentation error. I thought that someone should acknowledge it so others could avoid it.