Skip to content

Instantly share code, notes, and snippets.

View baudehlo's full-sized avatar

Matt Sergeant baudehlo

View GitHub Profile
var mailgun_smtp = {
auth_user: 'xxx',
auth_pass: 'yyy',
priority: 0,
exchange: 'smtp.mailgun.org',
};
exports.hook_get_mx = function (next, hmail, domain) {
// All relaying goes via mailgun
return next(OK, mailgun_smtp);
matt@Calhorn ~/Development/Haraka$ node -v
v6.2.1
matt@Calhorn ~/Development/Haraka$ node
> var RE2 = require('re2');
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.
==== JS stack trace =========================================
Security context: 0x24ee8ac9e59 <JS Object>#0#
diff --git a/plugins/dkim_verify.js b/plugins/dkim_verify.js
index 9da9b9c..5769bed 100644
--- a/plugins/dkim_verify.js
+++ b/plugins/dkim_verify.js
@@ -19,7 +19,7 @@ exports.hook_data_post = function(next, connection) {
if (err) {
connection.logerror(self, 'error=' + err);
}
- if (!results) return next();
+ if (!results) return;
Delivered-To: [email protected]
Received: by 10.103.98.65 with SMTP id w62csp512966vsb;
Mon, 9 Nov 2015 12:49:14 -0800 (PST)
X-Received: by 10.28.178.69 with SMTP id b66mr26617157wmf.15.1447102154737;
Mon, 09 Nov 2015 12:49:14 -0800 (PST)
Return-Path: <[email protected]>
Received: from r66.web.sophos.com (r66.web.sophos.com. [207.211.34.66])
by mx.google.com with ESMTP id mb3si2831779wjb.107.2015.11.09.12.49.14
for <[email protected]>;
Delivered-To: [email protected]
Received: by 10.25.24.208 with SMTP id 77csp2069254lfy;
Wed, 7 Oct 2015 05:11:11 -0700 (PDT)
X-Received: by 10.112.147.39 with SMTP id th7mr396684lbb.82.1444219871549;
Wed, 07 Oct 2015 05:11:11 -0700 (PDT)
Return-Path: <[email protected]>
Received: from mail-lb0-x244.google.com (mail-lb0-x244.google.com. [2a00:1450:4010:c04::244])
by mx.google.com with ESMTPS id qd5si16132131lbb.83.2015.10.07.05.11.11
for <[email protected]>
var table = "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 500
Delivered-To: [email protected]
Received: by 10.25.24.152 with SMTP id 24csp1331589lfy;
Sun, 9 Aug 2015 11:04:56 -0700 (PDT)
X-Received: by 10.107.3.67 with SMTP id 64mr20910076iod.152.1439143496200;
Sun, 09 Aug 2015 11:04:56 -0700 (PDT)
Return-Path: <[email protected]>
Received: from new-smart.servers800.com (new-smart.servers800.com. [50.28.43.120])
by mx.google.com with ESMTPS id f186si12931085ioe.180.2015.08.09.11.04.55
for <[email protected]>
#!/bin/sh
DIR=`pwd`
exec 2>&1
if [ -z $ENVDIR_RUN ]; then
export ENVDIR_RUN=1
exec chpst -e $DIR/env $0
fi

Haraka running with io.js

matt@IC-iMac 13:49:14 ~/Development/iojs-v1.2.0-darwin-x64$ time /usr/libexec/postfix/smtp-source -c -l 5000 -t testuser@localhost -s 100 -m 10000 127.0.0.1:2525
10000

real	0m10.645s
user	0m0.512s
sys	0m1.585s