forked from smfreegard/Haraka
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored plugins to use the name next() instead of callback()
- Loading branch information
Matt Sergeant
committed
Apr 7, 2011
1 parent
6e3a3e8
commit 5a3d335
Showing
21 changed files
with
124 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// Check whether an email has a Message-Id header or not, and reject if not | ||
|
||
exports.hook_data_post = function (callback, connection) { | ||
exports.hook_data_post = function (next, connection) { | ||
if (connection.transaction.header.get_all('Message-Id').length === 0) { | ||
callback(DENY, "Mails here must have a Message-Id header"); | ||
next(DENY, "Mails here must have a Message-Id header"); | ||
} | ||
else { | ||
callback(CONT); | ||
next(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// I don't allow MAIL FROM:<> on my server, because it's all crap and I send | ||
// so little mail anyway that I rarely get real bounces | ||
|
||
exports.hook_mail = function (callback, connection, params) { | ||
exports.hook_mail = function (next, connection, params) { | ||
var mail_from = params[0]; | ||
if (mail_from === '<>') { | ||
return callback(DENY, "No bounces accepted here"); | ||
return next(DENY, "No bounces accepted here"); | ||
} | ||
return callback(CONT); | ||
return next(); | ||
} |
Oops, something went wrong.