Skip to content

Commit

Permalink
Added a mail from blocklist
Browse files Browse the repository at this point in the history
  • Loading branch information
baudehlo committed Apr 11, 2011
1 parent 0cceec1 commit 8027426
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/mail_from.blocklist.js
@@ -0,0 +1,11 @@
// Block mail from matching anything in the list
var utils = require('./utils');

exports.hook_mail = function (next, connection, params) {
var mail_from = params[0];
var list = this.config.get('mail_from.blocklist', 'list');
if (utils.in_array(mail_from, list)) {
return next(DENY, "Mail from you is not allowed here");
}
return next();
}

0 comments on commit 8027426

Please sign in to comment.