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 0.1.0-alpha.12 to 0.1.0-alpha.13

5

lib/queue-server.js

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

}
client.send({
plugins.handler.runHooks('queue:release', [client.zone, data], () => client.send({
req: data.req,
response
});
}));
});

@@ -217,2 +217,3 @@

delivery._lock = req._lock;
zone.releaseDelivery(delivery, err => {

@@ -219,0 +220,0 @@ if (err) {

20

lib/sender.js

@@ -127,4 +127,10 @@ 'use strict';

log.info('Sender/' + this.zone.name + '/' + process.pid, '%s.%s ACCEPTED to=%s mx=%s (%s)', delivery.id, delivery.seq, delivery.recipient, connection.options.servername, this.formatSMTPResponse(info.response));
log.info('Sender/' + this.zone.name + '/' + process.pid, '%s.%s ACCEPTED to=%s mx=%s (%s)', delivery.id, delivery.seq, delivery.recipient, connection.options.servername || delivery.domain, this.formatSMTPResponse(info.response));
delivery.status = {
delivered: true,
mx: connection.options.servername || delivery.domain,
response: this.formatSMTPResponse(info.response)
};
this.releaseDelivery(delivery, err => {

@@ -149,7 +155,8 @@ if (err) {

handleResponseError(delivery, connection, err, callback) {
let bounce;
let maxDeferred = 6;
let bounce = bounces.check(err.response);
let deferredCount = delivery._deferred && delivery._deferred.count || 0;
let smtpResponse = this.formatSMTPResponse(err.response || err.message);
if ((bounce = bounces.check(err.response)).action !== 'reject' || deferredCount > 6) {
if (bounce.action !== 'reject' && deferredCount < maxDeferred) {
let ttl = Math.min(Math.pow(5, deferredCount + 1), 1024) * 60 * 1000;

@@ -171,2 +178,8 @@

delivery.status = {
delivered: false,
mx: connection.options.servername || delivery.domain,
response: smtpResponse
};
return this.releaseDelivery(delivery, err => {

@@ -363,2 +376,3 @@ if (err) {

seq: delivery.seq,
status: delivery.status,
_lock: delivery._lock

@@ -365,0 +379,0 @@ }, (err, updated) => {

{
"name": "zone-mta",
"private": false,
"version": "0.1.0-alpha.12",
"version": "0.1.0-alpha.13",
"description": "Tiny outbound MTA",

@@ -6,0 +6,0 @@ "main": "app.js",

@@ -88,2 +88,3 @@ # ZoneMTA plugins

- **'queue:bounce'** with arguments `bounce` called when a message bounced and is no longer queued for delivery
- **'queue:release'** with arguments `zone`, `data` called when a message was removed from the queue

@@ -90,0 +91,0 @@ **'sender' context**

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