Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

smtp-server

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smtp-server - npm Package Compare versions

Comparing version 1.16.1 to 1.17.0

examples/readme.md

4

lib/smtp-connection.js

@@ -569,3 +569,3 @@ 'use strict';

if (this._server.options.size) {
features.push('SIZE ' + this._server.options.size);
features.push('SIZE' + (this._server.options.hideSize ? '' : ' ' + this._server.options.size));
}

@@ -1007,3 +1007,3 @@

if (this._server.options.size && parsed.args.SIZE && Number(parsed.args.SIZE) > this._server.options.size) {
if (!this._server.options.hideSize && this._server.options.size && parsed.args.SIZE && Number(parsed.args.SIZE) > this._server.options.size) {
this.send(552, 'Error: message exceeds fixed maximum message size ' + this._server.options.size);

@@ -1010,0 +1010,0 @@ return callback();

{
"name": "smtp-server",
"version": "1.16.1",
"version": "1.17.0",
"description": "Create custom SMTP servers on the fly",

@@ -21,4 +21,4 @@ "main": "lib/smtp-server.js",

"grunt-mocha-test": "^0.13.2",
"mocha": "^3.0.2",
"smtp-connection": "^2.12.1"
"mocha": "^3.2.0",
"smtp-connection": "^2.12.2"
},

@@ -25,0 +25,0 @@ "engines": {

@@ -16,3 +16,3 @@ # smtp-server

* **[smtp-server](https://github.com/andris9/smtp-server)** – add SMTP server interface to your application
* **[smtp-server](https://github.com/nodemailer/smtp-connection)** – connect to SMTP servers from your application
* **[smtp-connection](https://github.com/nodemailer/smtp-connection)** – connect to SMTP servers from your application
* **[zone-mta](https://github.com/zone-eu/zone-mta)** – full featured outbound MTA built using smtp-connection and smtp-server modules

@@ -47,2 +47,3 @@

* **options.size** optional maximum allowed message size in bytes, see details [here](#using-size-extension)
* **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)

@@ -342,2 +343,12 @@ * **options.authOptional** allow authentication, but do not require it

size: 1024, // allow messages up to 1 kb
onRcptTo: function (address, session, callback) {
// do not accept messages larger than 100 bytes to specific recipients
var expectedSize = Number(session.envelope.mailFrom.args.SIZE) || 0;
if (address.address === 'almost-full@example.com' && expectedSize > 100) {
err = new Error('Insufficient channel storage: ' + address.address);
err.responseCode = 452;
return callback(err);
}
callback();
},
onData: function(stream, session, callback){

@@ -344,0 +355,0 @@ stream.pipe(process.stdout); // print message to console

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc