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.16 to 0.1.0-alpha.17

3

config/default.js

@@ -70,3 +70,4 @@ 'use strict';

interfaces: ['feeder'],
rejectSpam: true // if false, then the message is passed on with a spam header, otherwise message is rejected
rejectSpam: false, // if false, then the message is passed on with a spam header, otherwise message is rejected
processSpam: false // if true then drops spam or modifies headers for suspicios messages
},

@@ -73,0 +74,0 @@

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

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

@@ -42,2 +42,26 @@ 'use strict';

if (app.config.processSpam) {
switch (envelope.spam && envelope.spam.default && envelope.spam.default.action) {
case 'reject':
app.logger.info('Queue', '%s DROPPED[spam] (message-id=%s from=%s to=%s)', envelope.id, envelope.messageId, envelope.from, envelope.to.join(','));
// accept message and silently drop it
next({
name: 'SMTPResponse',
message: 'Message accepted'
});
break;
case 'add header':
case 'rewrite subject':
case 'soft reject':
{
let subject = envelope.headers.getFirst('subject');
let score = Number(envelope.spam.default.score) || 0;
score = Math.round(score * 100) / 100;
subject = ('[*** SPAM ' + score + ' ***] ' + subject).trim();
envelope.headers.update('Subject', subject);
break;
}
}
}
if (app.config.rejectSpam && envelope.spam && envelope.spam.default && envelope.spam.default.is_spam) {

@@ -44,0 +68,0 @@ let err = new Error('This message was classified as SPAM and may not be delivered');

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