Create a settings file ~/.echoimap.json
with the following content:
{
"imap": {
"host": "imap.example.com",
"user": "imapuser",
"password": "imappassword",
"port": 993,
"tls": true,
"tlsOptions": {
"rejectUnauthorized": false
}
},
"exec": {
"command": "tee",
"args": ["mail.log"]
}
"clean": {
"after": {
"days": 7
},
"interval": 300000
}
}
and start receiving mails instantly
git clone https://gist.github.com/6196937.git
cd 6196937
npm install imap moment
npm install -g forever coffee-script
coffee -c echoimap.coffee
forever start -m 5 echoimap.js