发布个插件:elasticsearch-river-email
最近发现vps上面跑的用来收邮件的python脚本占用了30%的cpu,并且一直就有写个邮件river的想法,不过一直没有付诸行动,今天下班抽空完成了这个插件,理论支持的协议: /** now support: imap imaps pop3s pop3 */ 不过只有时间测试了pop3协议,正常收取。 地址:https://github.com/medcl/elasticsearch-river-email 创建river的方式:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ curl -XPUT 'localhost:9200/_river/google/_meta' -d '{ "type": "email", "email": { "config" : [ { "host": "pop.exmail.qq.com", "port": 110, "type":"pop3", "username":"river@infinitbyte.com", "password":"ail?sid=9UL", "check_interval": 5000, "skip_count": 1, } ] }, "index":{ "index":"google", "type":"gmail" } }' |
RTF已经包含该插件,并测试通过: https://github.com/medcl/elasticsearch-rtf/tree/master/elasticsearch/plugins/river-email