$schemarequired | string | URL of this JSON schema, so editors can validate and complete the configuration |
bind | stringdefault "localhost" | Address the SMTP server listens on The default only accepts connections from the local machine: set 0.0.0.0 (IPv4) or :: (IPv6 and IPv4) to listen on every network interface, e.g. when running in a container |
cachePath | stringdefault ".email_${iso8601}_${id}.eml" | Path of the temporary file each received email is written to, its folder is created if needed Variables written as ${name} are replaced: ${iso8601}, ${timestamp}, ${id}, ${from} and ${to} |
filterTimeout | numberdefault 30000 | Timeout in milliseconds for filter execution |
flowsrequired | object | Define email flows |
flows.… | object | Any other option of the underlying SDK or library is accepted |
keepCache | booleandefault false | Keep the temporary email files of cachePath once processed instead of deleting them |
mailHeaders | objectdefault {"x-smtp-relay":"current-version"} | Manipulate headers |
mailHeaders.… | string | Any other option of the underlying SDK or library is accepted |
optionsrequired | object | options defines the behavior of the server options.secure if true, the connection will use TLS. The default is false. If the server doesn’t start in TLS mode, it is still possible to upgrade clear text socket to TLS socket with the STARTTLS command (unless you disable support for it). If secure is true, additional tls options for tls.createServer can be added directly onto this options object. options.name optional hostname of the server, used for identifying to the client (defaults to os.hostname()) options.banner optional greeting message. This message is appended to the default ESMTP response. options.size optional maximum allowed message size in bytes, see details here options.hideSize if set to true then does not expose the max allowed size to the client but keeps size related values like stream.sizeExceeded options.authMethods optional array of allowed authentication methods, defaults to [‘PLAIN’, ‘LOGIN’]. Only the methods listed in this array are allowed, so if you set it to [‘XOAUTH2’] then PLAIN and LOGIN are not available. Use [‘PLAIN’, ‘LOGIN’, ‘XOAUTH2’] to allow all three. Authentication is only allowed in secure mode (either the server is started with secure:true option or STARTTLS command is used) options.authOptional allow authentication, but do not require it options.disabledCommands optional array of disabled commands (see all supported commands here). For example if you want to disable authentication, use [‘AUTH’] as this value. If you want to allow authentication in clear text, set it to [‘STARTTLS’]. options.hideSTARTTLS optional boolean, if set to true then allow using STARTTLS but do not advertise or require it. It only makes sense when creating integration test servers for testing the scenario where you want to try STARTTLS even when it is not advertised options.hidePIPELINING optional boolean, if set to true then does not show PIPELINING in feature list options.hide8BITMIME optional boolean, if set to true then does not show 8BITMIME in features list options.hideSMTPUTF8 optional boolean, if set to true then does not show SMTPUTF8 in features list options.allowInsecureAuth optional boolean, if set to true allows authentication even if connection is not secured first options.disableReverseLookup optional boolean, if set to true then does not try to reverse resolve client hostname options.sniOptions optional Map or an object of TLS options for SNI where servername is the key. Overrided by SNICallback. options.logger optional bunyan compatible logger instance. If set to true then logs to console. If value is not set or is false then nothing is logged options.maxClients sets the maximum number of concurrently connected clients, defaults to Infinity options.useProxy boolean, if set to true expects to be behind a proxy that emits a PROXY header (version 1 only) options.useXClient boolean, if set to true, enables usage of XCLIENT extension to override connection properties. See session.xClient (Map object) for the details provided by the client options.useXForward boolean, if set to true, enables usage of XFORWARD extension. See session.xForward (Map object) for the details provided by the client options.lmtp boolean, if set to true use LMTP protocol instead of SMTP options.socketTimeout how many milliseconds of inactivity to allow before disconnecting the client (defaults to 1 minute) options.closeTimeout how many milliseconds to wait before disconnecting pending connections once server.close() has been called (defaults to 30 seconds) |
options.ALPNProtocols | string[] | Possible ALPN protocols, ordered by priority |
options.allowHalfOpen | booleandefault false | Allow half-opened TCP connections |
options.allowInsecureAuth | boolean | optional boolean, if set to true allows authentication even if connection is not secured first |
options.allowPartialTrustChain | boolean | Treat intermediate (non-self-signed) certificates of the trusted CA list as trusted |
options.authMethods | string[] | optional array of allowed authentication methods, defaults to ['PLAIN', 'LOGIN']. Only the methods listed in this array are allowed, so if you set it to ['XOAUTH2'] then PLAIN and LOGIN are not available. Use ['PLAIN', 'LOGIN', 'XOAUTH2'] to allow all three. Authentication is only allowed in secure mode (either the server is started with secure: true option or STARTTLS command is used) |
options.authOptional | boolean | allow authentication, but do not require it |
options.banner | string | optional greeting message. This message is appended to the default ESMTP response. |
options.ca | string | string[] | PEM encoded CA certificates to trust instead of the default ones, a string starting with file:// is read from that file |
options.cert | string | string[] | PEM encoded certificate chain(s), a string starting with file:// is read from that file |
options.ciphers | string | Cipher suite specification, replacing the default |
options.closeTimeout | number | How many millisceonds to wait before disconnecting pending connections once server.close() has been called (defaults to 30 seconds) |
options.crl | string | string[] | PEM encoded certificate revocation lists |
options.dhparam | string | auto or PEM encoded Diffie-Hellman parameters, required for non-ECDHE perfect forward secrecy
|
options.disableReverseLookup | boolean | optional boolean, if set to true then does not try to reverse resolve client hostname |
options.disabledCommands | string[] | optional array of disabled commands (see all supported commands here). For example if you want to disable authentication, use ['AUTH'] as this value. If you want to allow authentication in clear text, set it to ['STARTTLS']. |
options.ecdhCurve | string | Named curve or colon separated list of curves for ECDH key agreement, auto to select it automatically |
options.enableTrace | booleandefault false | Write TLS packet trace information to stderr |
options.handshakeTimeout | numberdefault 120000 | Abort the connection if the TLS handshake does not finish within this many milliseconds |
options.hide8BITMIME | boolean | optional boolean, if set to true then does not show 8BITMIME in features list |
options.hidePIPELINING | boolean | optional boolean, if set to true then does not show PIPELINING in feature list |
options.hideSMTPUTF8 | boolean | optional boolean, if set to true then does not show SMTPUTF8 in features list |
options.hideSTARTTLS | boolean | optional boolean, if set to true then allow using STARTTLS but do not advertise or require it. It only makes sense when creating integration test servers for testing the scenario where you want to try STARTTLS even when it is not advertised |
options.highWaterMark | number | Readable and writable high water mark of the sockets, in bytes |
options.honorCipherOrder | boolean | Use the cipher suite preferences of the server instead of those of the client |
options.keepAlive | booleandefault false | Enable keep-alive on incoming connections |
options.keepAliveInitialDelay | numberdefault 0 | Initial delay in milliseconds before the first keep-alive probe |
options.key | string | (string | object)[] | PEM encoded private key(s), a string starting with file:// is read from that file |
options.lmtp | boolean | if set to true use LMTP protocol instead of SMTP |
options.loggers | object[]default [{"type":"CONSOLE"}] | Where to write the logs |
options.maxClients | number | sets the maximum number of concurrently connected clients, defaults to Infinity |
options.maxVersion | "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1" | Maximum TLS version to allow |
options.minVersion | "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1" | Minimum TLS version to allow |
options.name | string | optional hostname of the server, used for identifying to the client (defaults to os.hostname()) |
options.noDelay | booleandefault false | Disable Nagle's algorithm on incoming connections |
options.passphrase | string | Passphrase of the private key or of the PFX |
options.pauseOnConnect | booleandefault false | Pause the socket on incoming connections |
options.pfx | string | (string | object)[] | PFX or PKCS12 encoded private key and certificate chain, an alternative to key and cert, a string starting with file:// is read from that file |
options.pskIdentityHint | string | Hint sent to the client to select the identity during TLS-PSK negotiation, ignored in TLS 1.3 |
options.rejectUnauthorized | booleandefault true | With requestCert, reject the clients whose certificate is not signed by a trusted CA |
options.requestCert | booleandefault false | Request a certificate from the clients |
options.secure | boolean | if true, the connection will use TLS. The default is false. If the server doesn't start in TLS mode, it is still possible to upgrade clear text socket to TLS socket with the STARTTLS command (unless you disable support for it). If secure is true, additional tls options for tls. createServer can be added directly onto this options object. |
options.secureOptions | number | Bitmask of the SSL_OP_* options from OpenSSL |
options.secureProtocol | string | Legacy selection of the TLS protocol version, e.g. TLS_method, prefer minVersion and maxVersion |
options.sessionIdContext | string | Opaque identifier so session state is not shared between applications |
options.sessionTimeout | numberdefault 300 | Seconds after which a TLS session is no longer resumable |
options.sigalgs | string | Colon separated list of supported signature algorithms |
options.size | number | optional maximum allowed message size in bytes (see details) |
options.socketTimeout | number | How many milliseconds of inactivity to allow before disconnecting the client (defaults to 1 minute) |
options.useProxy | boolean | string[] | if set to true expects to be behind a proxy that emits a PROXY header (version 1 only), an array lists the proxy addresses the header is expected from |
options.useXClient | boolean | string[] | if set to true, enables usage of XCLIENT extension to override connection properties, an array lists the client addresses allowed to use it. See session.xClient (Map object) for the details provided by the client |
options.useXForward | boolean | string[] | if set to true, enables usage of XFORWARD extension, an array lists the client addresses allowed to use it. See session.xForward (Map object) for the details provided by the client |
port | numberdefault 10025 | Port the SMTP server listens on |
prometheus | object | Configure prometheus metrics |
prometheus.bind | string | Bind to a specific address |
prometheus.defaultLabels | object | Default labels to add to prometheus |
prometheus.nodeMetrics | boolean | Collect node metrics |
prometheus.portNumberrequired | number | Port to bind to serve prometheus metrics |
prometheus.url | stringdefault "/metrics" | Url to use |