How to configure the Logstash IMAP plugin to receive email from an SMTP server
1 answer
Below is the logstash config below. Please change the settings and output the plugins according to your needs.
logstash.conf
input{
imap{
host => "SERVER_IP"
user => "USERNAME"
password => "************"
port => PORT_NUMBER
secure => true/false
check_interval => INTERVAL_SECONDS
}
}
output{
stdout{
codec => "json"
}
}
Then start logstash using the following command
bin/logstash -f "logstash.conf"
This should check email for every configured check_interval duration in seconds and fire an event.
+2
source to share