You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Workers auto-restart on crash; accounts are reassigned to available workers
85
85
- BullMQ queues distribute jobs to webhooks, submit, and documents workers
86
86
87
+
### SMTP Server
88
+
89
+
The SMTP server (`workers/smtp.js`) is a built-in Message Submission Agent (MSA) that allows legacy applications to send emails through EmailEngine using standard SMTP protocol. Messages are queued for asynchronous delivery via the Submit worker.
90
+
91
+
**How it works:**
92
+
1. Client connects and optionally authenticates via SMTP AUTH
93
+
2. Client sends message with MAIL FROM, RCPT TO, and DATA commands
94
+
3. Server queues message for delivery through the associated EmailEngine account
95
+
4. Returns queue ID and scheduled send time
96
+
97
+
**Authentication methods:**
98
+
- With auth enabled (`smtpServerAuthEnabled`):
99
+
- Username: Account ID
100
+
- Password: Global password (`smtpServerPassword`) or 64-char hex token with `smtp` scope
101
+
- Without auth: Specify account via `X-EE-Account` header in message
102
+
103
+
**Configuration** (settings or environment variables):
104
+
-`smtpServerEnabled` / `EENGINE_SMTP_ENABLED` - Enable the server
105
+
-`smtpServerPort` / `EENGINE_SMTP_PORT` - Listen port (default: 2525)
- Max message size: 25MB (configurable via `EENGINE_MAX_SMTP_MESSAGE_SIZE`)
118
+
- Asynchronous delivery only (messages queued, not sent immediately)
119
+
- Account must have valid SMTP or OAuth2 credentials configured
120
+
87
121
### IMAP Proxy
88
122
89
123
The IMAP proxy (`lib/imapproxy/`) allows standard IMAP clients to access EmailEngine-managed accounts. It abstracts OAuth2 complexity, enabling legacy clients to connect to Gmail, Microsoft 365, and other OAuth2-only providers.
0 commit comments