- Cluster support
- Monitoring (including cluster monitoring)
- Bounce handling
- Per recipient domain settings
This file contains hidden or 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
for (var i=0,l=cluster_modules.length; i < l; i++) { | |
var matches; | |
if (/^\w+:/.test(cluster_modules[i])) { | |
var parts = cluster_modules[i].split(':'); | |
var module = parts.shift(); | |
c.use(cluster[module].apply(cluster, parts)); | |
} | |
else if (matches = /^(\w+)\s+(\{.*\})\s*$/.exec(cluster_modules[i])) { | |
var module = matches[1]; | |
console.log("Loading cluster module " + module + "( " + matches[2] + ")"); |
This file contains hidden or 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
for (var i=0,l=cluster_modules.length; i < l; i++) { | |
var matches = /^(\w+)\s*(?::\s*(.*))?$/.exec(cluster_modules[i]); | |
if (!matches) { | |
Server.logerror("cluster_modules in invalid format: " + cluster_modules[i]); | |
continue; | |
} | |
var module = matches[1]; | |
var params = matches[2]; | |
if (params) { | |
c.use(cluster[module](JSON.parse(params))); |
This file contains hidden or 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
logger.log = function (level, data) { | |
var include_stack = config.get('log_includes_trace'); | |
if (include_stack) { | |
var stack = (new Error()).stack; | |
var matches = stack.match(/^.*\n.*\n.*\n.*\(.*\/(.*):(\d+):\d+\)/); | |
if (matches) { | |
if (matches[1] === 'plugins.js') { | |
// likely in a plugin, get the next line instead. | |
var new_matches = stack.match(/^.*\n.*\n.*\n.*\n.*\((.*):(\d+):\d+\)/); | |
if (new_matches) { |
This file contains hidden or 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
Cleaning /tmp...xargs: xargs.c:450: main: Assertion `bc_ctl.arg_max <= (131072-2048)' failed. | |
/etc/init.d/bootclean: line 89: 3044 Broken pipe find . -depth -xdev $TEXPR $EXCEPT ! -type d -print0 | |
3045 Aborted | xargs -0r rm -f -- | |
failed (bootclean: Failure cleaning /tmp). | |
Cleaning /var/run...xargs: xargs.c:450: main: Assertion `bc_ctl.arg_max <= (131072-2048)' failed. | |
/etc/init.d/bootclean: line 153: 3051 Broken pipe find . ! -xtype d ! -name utmp ! -name innd.pid -print0 |
This file contains hidden or 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
var oldPrep = Error.prepareStackTrace; | |
Error.prepareStackTrace = function (error, structuredStackTrace) { | |
Error.prepareStackTrace = oldPrep; | |
if (structuredStackTrace.length < 4) { | |
return ''; | |
} | |
var pos = 2; | |
if (/\/plugins.js/.test(structuredStackTrace[pos].getFileName())) { // && /run_next_hook/.test(structuredStackTrace[pos].getFunctionName())) { | |
pos = 3; | |
} |
This file contains hidden or 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
var qmailq = childproc.spawn('/var/qmail/bin/qmail-queue'); | |
qmailq.on('exit', function (code) { | |
console.log("qmail-queue exited with: " + code); | |
}); | |
qmailq.stdin.write( | |
"Subject: foo\n" + | |
"From: Matt <[email protected]>\n" + | |
"\n" + |
This file contains hidden or 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
matt@ip-:~$ xopen | |
No command 'xopen' found, did you mean: | |
Command 'gopen' from package 'gnustep-gui-runtime' (universe) | |
Command 'open' from package 'console-tools' (universe) | |
Command 'open' from package 'kbd' (main) | |
Command 'open' from package 'open.app' (universe) | |
Command 'wopen' from package 'gworkspace.app' (universe) | |
Command 'mopen' from package 'moonlight-tools' (universe) | |
xopen: command not found | |
matt@ip-:~$ xdg-open |
This file contains hidden or 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
var white_regex = | |
this.config.get('mail_from.access.whitelist_regex', 'list', | |
function (re_list) { | |
if (re_list.length) { | |
return new RegExp('^(?:' + re_list.join('|') + ')$', 'i'); | |
} | |
}); |
This file contains hidden or 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
exports.execute = function (sql, binds, cb) { | |
// TODO: query via memcached first (?) | |
if (!this.db) { | |
// db not ready yet | |
if (this.loop_count && this.loop_count > 10) { | |
throw "Database connection timed out"; | |
} | |
this.loop_count = this.loop_count || 0; | |
this.loop_count++; |