Standalone ESM-daemon that: - Connects via ImapFlow IDLE to all active Legend mailboxes - Triggers /api/mail/scan-internal on new-mail events (real-time) - Auto-renew IDLE every 25min (RFC 3501 limit), exponential-backoff reconnect - DB-refresh every 5min for new/removed connections Plus deploy-pipeline: - GH-Actions artifact-upload + scp to /srv/rebreak/backend/imap-idle/ - npm install --production on server (imapflow + pg) - pm2 startOrReload via ecosystem.config.js - start-idle-staging.sh wrapper for Infisical secret-injection Replaces 30min-cron polling for Legend tier -- Casino-mails now blocked within seconds, fulfilling Legend tier marketing promise. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19 lines
375 B
JSON
19 lines
375 B
JSON
{
|
|
"name": "rebreak-imap-idle",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "IMAP IDLE Daemon — Real-time Gambling-Mail-Detection für Legend-User",
|
|
"main": "index.mjs",
|
|
"scripts": {
|
|
"start": "node index.mjs"
|
|
},
|
|
"dependencies": {
|
|
"imapflow": "^1.2.18",
|
|
"pg": "^8.16.3"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
}
|
|
}
|