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

zone-mta

Package Overview
Dependencies
Maintainers
1
Versions
334
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zone-mta - npm Package Compare versions

Comparing version 2.2.1 to 2.3.0

4

CHANGELOG.md
# CHANGELOG
- v2.3.0 2020-06-25
- Added new hook 'sender:connection' that is run for every message, even when using cached connections
- v2.2.0 2020-05-27

@@ -4,0 +8,0 @@

@@ -355,2 +355,8 @@ # Bounce rules list

# 554 5.7.1 Rejected because Bad IP
^554[ \-].* Bad IP,defer,blacklist,Sender IP blacklisted
# 554 Blocked - see https://ipcheck.proofpoint.com/?ip=1.2.3.4
^554[ \-]Blocked,defer,blacklist,Sender IP blacklisted
^4\d\d\b.*Greylist,defer,greylist,Message temporarily Greylisted

@@ -357,0 +363,0 @@ ^4\d\d\b.*try again,defer,greylist,Message temporarily Greylisted

4

lib/sender.js

@@ -793,5 +793,6 @@ 'use strict';

args[0].netConnected = netConnected;
return done(...args);
}
done(...args);
plugins.handler.runHooks('sender:connection', [delivery, args[1]], () => done(...args));
};

@@ -824,2 +825,3 @@

log.info(this.logName, '%s.%s CONNECTING domain=%s port=%s', delivery.id, delivery.seq, delivery.domain, delivery.mxPort);
plugins.handler.runHooks('sender:connecting', [delivery], () => false);

@@ -826,0 +828,0 @@ let startTime = Date.now();

{
"name": "zone-mta",
"private": false,
"version": "2.2.1",
"version": "2.3.0",
"description": "Tiny outbound MTA",

@@ -19,4 +19,3 @@ "main": "app.js",

"gelf": "2.0.1",
"iconv-lite": "0.5.1",
"ioredis": "4.17.1",
"ioredis": "4.17.3",
"isemail": "3.2.0",

@@ -27,6 +26,6 @@ "js-yaml": "3.14.0",

"minimist": "1.2.5",
"mongodb": "3.5.7",
"mongodb": "3.5.9",
"msgpack-js": "0.3.0",
"mx-connect": "1.1.2",
"nodemailer": "6.4.6",
"mx-connect": "1.2.0",
"nodemailer": "6.4.10",
"npmlog": "4.1.2",

@@ -37,5 +36,5 @@ "prom-client": "12.0.0",

"seq-index": "1.1.0",
"smtp-server": "3.6.0",
"smtp-server": "3.7.0",
"srs.js": "0.1.0",
"uuid": "8.1.0",
"uuid": "8.2.0",
"wild-config": "1.5.1"

@@ -45,3 +44,3 @@ },

"ajv": "6.12.2",
"eslint": "7.1.0",
"eslint": "7.3.1",
"eslint-config-nodemailer": "1.2.0",

@@ -53,3 +52,3 @@ "eslint-config-prettier": "6.11.0",

"grunt-eslint": "23.0.0",
"moment": "2.26.0",
"moment": "2.27.0",
"random-message": "1.1.0",

@@ -56,0 +55,0 @@ "zip-stream": "3.0.1"

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

module.exports.title = 'DKIM signer';
module.exports.init = function(app, done) {
module.exports.init = function (app, done) {
let privKey;

@@ -17,3 +17,3 @@

app.addHook('sender:connect', (delivery, options, next) => {
app.addHook('sender:connection', (delivery, options, next) => {
if (!delivery.dkim.keys) {

@@ -25,4 +25,4 @@ delivery.dkim.keys = [];

let fromDomain = from.substr(from.lastIndexOf('@') + 1).toLowerCase();
let headersToSign = app.config.headerFields.join(":") || '';
let additionalHeaderFields = app.config.additionalHeaderFields.join(":") || '';
let headersToSign = app.config.headerFields.join(':') || '';
let additionalHeaderFields = app.config.additionalHeaderFields.join(':') || '';

@@ -34,3 +34,3 @@ delivery.dkim.keys.push({

headerFieldNames: headersToSign,
additionalHeaderFieldNames: additionalHeaderFields,
additionalHeaderFieldNames: additionalHeaderFields
});

@@ -44,3 +44,3 @@

headerFieldNames: headersToSign,
additionalHeaderFieldNames: additionalHeaderFields,
additionalHeaderFieldNames: additionalHeaderFields
});

@@ -47,0 +47,0 @@ }

@@ -49,3 +49,3 @@ # ZoneMTA plugins

```javascript
module.exports.init = function(app, done) {
module.exports.init = function (app, done) {
console.log(app.config['my-value']); // 123

@@ -102,3 +102,3 @@ done();

- **'smtp:connect'** with argument ` session`, called when the client connects to the interface
- **'smtp:connect'** with argument `session`, called when the client connects to the interface
- **'smtp:auth'** with arguments `auth`, `session`, called when AUTH command is issued by the client

@@ -117,6 +117,9 @@ - **'smtp:mail_from'** with arguments `address`, `session`, called when MAIL FROM command is issued by the client

- **'sender:fetch'** with arguments `delivery` called when message is retrieved from queue for delivery
- **'sender:headers'** with arguments `delivery`, `connection` called when message is about to be sent (but before DKIM signing), this is your final chance to modify message headers or SMTP envelope. Do not spend too much time here as the SMTP connection is already open and might timeout. use _'sender:connect'_ hook to perform actions that take more time
- **'sender:connect'** with arguments `delivery`, `options` called before connection is tried to open against the MX. If the options object includes a property socket after hook is finished, then this socket object is used to start the SMTP session
- **'sender:headers'** with arguments `delivery`, `connection` called when message is about to be sent (but before DKIM signing), this is your final chance to modify message headers or SMTP envelope. Do not spend too much time here as the SMTP connection is already open and might timeout. use _'sender:connection'_ hook to perform actions that take more time
- **'sender:connecting'** with arguments `delivery` called when a connection has been requested. This is mainly meant for logging.
- **'sender:connect'** with arguments `delivery`, `options` called before connection is tried to open against the MX. If the options object includes a property `socket` after hook is finished, then this socket object is used to start the SMTP session. Do not use this for tasks that have to be performed for every message as the connection may get cached and reused. This hook may also get called multiple times for a single message if the first MX IP is not accessible.
- **'sender:connected'** with arguments `delivery`, `connection`, `options`, `secure` called when a new connection has been established. This is mainly meant for logging.
- **'sender:connection'** with arguments `delivery`, `connection` called once the system has established a new or reusing an existing connection.
- **'sender:delivered'** with arguments `delivery`, `info` called after a message has been accepted by MX server
- **'sender:tlserror'** with arguments `delivery`, `options` called after a TLS connection failed against the MX
- **'sender:tlserror'** with arguments `delivery`, `options` called after a TLS connection failed against the MX

@@ -240,4 +243,4 @@ ### Errors

```javascript
app.addAPI("GET", "/ping", (req, res, next) => {
res.end("my awesome plugin");
app.addAPI('GET', '/ping', (req, res, next) => {
res.end('my awesome plugin');
next();

@@ -277,3 +280,3 @@ });

module.exports.title = 'My Awesome Plugin';
module.exports.init = function(app, done) {
module.exports.init = function (app, done) {
let state = new WeakMap();

@@ -280,0 +283,0 @@ app.addAnalyzerHook((envelope, source, destination) => {

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