Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var _set_up_redis = function (done) {
this.server = {};
this.plugin = new fixtures.plugin('rcpt_to.routes');
this.connection = fixtures.connection.createConnection();
this.connection.transaction = fixtures.transaction.createTransaction();
this.connection.transaction.results = new fixtures.results(this.connection);
this.plugin.register();
this.plugin.server = { notes: { } };
this.plugin.redisCfg.opts.retry_strategy = function (options) {
return;
};
var t = this;
this.plugin.init_redis_shared(function (err) {
if (err) {
console.error(err.message);
return done();
}
t.plugin.db = t.plugin.server.notes.redis;
t.plugin.redis_ping(function (err2, result) {
function _set_up (done) {
this.plugin = new fixtures.plugin('data.headers');
this.plugin.register();
try {
this.plugin.addrparser = require('address-rfc2822');
}
catch (ignore) {}
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
header: new Header(),
results: new fixtures.results(this.plugin),
rcpt_to: [],
};
done();
}
var _set_up = function (done) {
this.plugin = new fixtures.plugin('access');
this.plugin.config.module_config(path.resolve(__dirname, 'config'));
this.plugin.register();
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
results: new fixtures.results(this.connection),
};
done();
};
this.plugin.register();
this.plugin.whitelist = {
"mail":{"josef@example.com":true},
"rcpt":{"josef@example.net":true},
"ip":[
ipaddr.parseCIDR('123.123.123.234/32'),
ipaddr.parseCIDR('2a02:8204:d600:8060:7920:4040:20ee:9680/128'),
ipaddr.parseCIDR('123.210.123.234/27'),
ipaddr.parseCIDR('2a02:8204:d600:8060:7920:eeee::/96'),
]
};
this.plugin.list = {"dyndom":["sgvps.net"]};
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
results: new fixtures.results(this.connection),
};
done();
}
function _set_up (done) {
this.plugin = new fixtures.plugin('relay_acl');
this.plugin.cfg = {};
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
results: new fixtures.results(this.connection),
};
done();
}
function _set_up (done) {
this.plugin = new fixtures.plugin('rcpt_to.in_host_list');
this.plugin.inherits('rcpt_to.host_list_base');
this.plugin.cfg = {};
this.plugin.host_list = {};
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
results: new fixtures.results(this.connection),
notes: {},
};
done();
}
const _set_up = function (done) {
this.plugin = new fixtures.plugin('rcpt_to.ldap');
this.plugin.inherits('rcpt_to.host_list_base');
this.plugin.cfg = {};
this.plugin.host_list = {};
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
results: new fixtures.results(this.connection),
notes: {},
rcpt_to: [new Address('test@test.com')]
};
done();
};
const _set_up = function (done) {
this.plugin = new fixtures.plugin('mail_from.is_resolvable');
this.plugin.register();
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
notes: {},
results: new fixtures.results(this.plugin),
};
done();
}
setUp (callback) {
this.plugin = new fixtures.plugin('relay');
this.plugin.cfg = { relay: { dest_domains: true } };
this.connection = fixtures.connection.createConnection();
this.connection.transaction = {
results: new fixtures.results(this.connection),
};
callback();
},
'relay.dest_domains=false' (test) {
bad_rcpt: true,
non_local_msgid: true,
},
reject: {
single_recipient:true,
empty_return_path:true,
non_local_msgid:true,
},
invalid_addrs: { 'test@bad1.com': true, 'test@bad2.com': true },
};
this.connection = Connection.createConnection();
this.connection.remote.ip = '8.8.8.8';
this.connection.transaction = {
header: new Header(),
results: new fixtures.results(this.plugin),
};
done();
}