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
"use strict"; | |
var cluster = require("cluster"); | |
if (process.env.NODE_ENV == 'production' && cluster.isMaster) { | |
// this is the master control process | |
console.log("Control process running: PID=" + process.pid); | |
// fork as many times as we have CPUs | |
var numCPUs = process.env.NPROCS || require("os").cpus().length; |
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 databaseUrl = "localhost"; | |
//var collections = ["email"]; | |
//var db = require("mongojs").connect(databaseUrl, collections); | |
var MongoClient = require('mongodb').MongoClient; | |
exports.hook_data = function (next, connection) { | |
// enable mail body parsing | |
connection.transaction.parse_body = 1; | |
next(); |
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
root@li102-105:/home/matt# ls -l /var/lib/barman/main/wals/ | |
total 180456 | |
-rw------- 1 barman barman 16777216 Aug 26 19:45 000000010000001500000000 | |
-rw------- 1 barman barman 16777216 Aug 26 19:46 000000010000001500000001 | |
-rw------- 1 barman barman 321 Aug 26 19:46 000000010000001500000001.00000028.backup | |
-rw------- 1 barman barman 16777216 Aug 26 21:03 000000010000001500000002 | |
-rw------- 1 barman barman 16777216 Aug 26 21:08 000000010000001500000003 | |
-rw------- 1 barman barman 16777216 Aug 26 21:13 000000010000001500000004 | |
-rw------- 1 barman barman 16777216 Aug 26 21:18 000000010000001500000005 | |
-rw------- 1 barman barman 16777216 Aug 26 21:20 000000010000001500000006 |
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 render = exports.render = function (name, data, cb) { | |
// console.log("Rendering " + name + ".jade"); | |
jade.renderFile(__dirname + '/../views/emails/' + name + '.jade', data, function (err, template_output) { | |
if (err) return cb(err); | |
if (juice) return juice.juiceContent(template_output, juice_options, cb); | |
return cb(null, template_output); | |
}); | |
} |
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
$ telnet localhost 587 | |
Trying 127.0.0.1... | |
Connected to localhost. | |
Escape character is '^]'. | |
220 emailitin.com ESMTP Haraka 2.5.0 ready | |
EHLO foo.com | |
250-emailitin.com Hello Unknown [127.0.0.1], Haraka is at your service. | |
250-PIPELINING | |
250-8BITMIME | |
250-SIZE 0 |
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
2014-08-05T18:58:25.556Z loglevel: LOGPROTOCOL | |
2014-08-05T18:58:25.556Z Starting up Haraka version 2.5.0 | |
2014-08-05T18:58:25.556Z [INFO] [-] [core] Loading plugins | |
2014-08-05T18:58:25.556Z [INFO] [-] [core] Loading plugin: rcpt_to.in_host_list | |
2014-08-05T18:58:25.556Z [INFO] [-] [rcpt_to.in_host_list] loading host_list | |
2014-08-05T18:58:25.556Z [INFO] [-] [rcpt_to.in_host_list] loading host_list_regex | |
2014-08-05T18:58:25.556Z [DEBUG] [-] [core] registered hook mail to rcpt_to.in_host_list.hook_mail | |
2014-08-05T18:58:25.556Z [DEBUG] [-] [core] registered hook rcpt to rcpt_to.in_host_list.hook_rcpt | |
2014-08-05T18:58:25.556Z [INFO] [-] [core] Loading plugin: test_queue | |
2014-08-05T18:58:25.556Z [DEBUG] [-] [core] registered hook queue to test_queue.hook_queue |
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
body | |
//- Your stuff here... | |
//- At the end of your body tag, add this: | |
if (initial_data) | |
script!= 'var _initial_data = ' + JSON.stringify(initial_data) + ';' | |
else | |
script= 'var _initial_data = {};' |
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
#!/usr/bin/perl -w | |
use strict; | |
open(my $grep, "-|", "grep", @ARGV) || die $!; | |
my %uuids; | |
while (<$grep>) { | |
if (/^[^\[]*\[(\w+)\]\s+\[([A-F0-9-]+)(?:\.\d+)?\]/) { | |
$uuids{$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
May 12 09:31:38 dev3 haraka[22485]: [INFO] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] Attempting to deliver to: 216.200.145.235:25 (0) (1) | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] S: 220 dm0218.mta.everyone.net ESMTP EON-INBOUND\r\n | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] C: EHLO smtp.fused.com | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] S: 250-dm0218.mta.everyone.net\r\n | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] S: 250-PIPELINING\r\n | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] S: 250-SIZE 50000000\r\n | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outbound] S: 250-AUTH PLAIN LOGIN\r\n | |
May 12 09:31:38 dev3 haraka[22485]: [PROTOCOL] [ECD608C5-C989-4E68-91CE-F545F81985D2.1] [outboun |
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
"use strict"; | |
var pattern = '("(?:\\\\\"|[^"])*?")\\s*=>\\s*((?:"(?:\\\\\"|[^"])*?")|NULL)'; | |
var re = new RegExp(pattern,'gi'); | |
exports.json_to_hstore = function json_to_hstore (json) { | |
if (typeof json == 'string') json = JSON.parse(json); | |
var hstore = []; | |
for (var key in json) { | |
var value = json[key]; |