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
// Authentication against a MySQL server | |
var net_utils = require('./net_utils'); | |
var mysql = require('mysql'); | |
var crypto = require('crypto'); | |
exports.register = function() { | |
this.inherits('auth/auth_base'); | |
} | |
exports.hook_capabilities = function(next, connection) { |
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 outbound = require('./outbound'); | |
var constants = require('./constants'); | |
exports.hook_queue = function (next, connection) { | |
var transaction = connection.transaction; | |
outbound.send_email(connection.transaction, function(retval, msg) { | |
switch(retval) { | |
case constants.ok: | |
return next(OK, msg); |
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
[Unit] | |
Description=Haraka SMTP service daemon | |
After=syslog.target network.target spamassassin.service [email protected] | |
Conflicts=postfix.service sendmail.service exim.service | |
[Service] | |
LimitNOFILE=infinity | |
# The ?'s are to allow the process_title plugin enough room | |
# to rewrite the process title and not run out of space. | |
ExecStart=/usr/bin/haraka -c /etc/haraka ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
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 Address = require('./address').Address; | |
var rewrite_to = '[email protected]'; | |
exports.hook_data = function (next, connection) { | |
var txn = connection.transaction; | |
// Use outbound... | |
connection.relaying = true; | |
var addr = new Address(rewrite_to); | |
txn.rcpt_to = [ addr ]; | |
return 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
"use strict"; | |
var line = '" John Stirling & Jeremy Bray <[email protected]>'; | |
console.log('before match'); | |
var match = /^("(?:[^"\\]+|\\.)*")\s*/.exec(line); | |
console.log('after match'); |
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 net = require('net'); | |
var server = net.createServer(function (client) { | |
var addr = client.server.address(); | |
client.write(JSON.stringify(addr, null, '\t')); | |
client.end(); | |
}); | |
server.listen(1234, function () { | |
var addr = server.address(); |
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 Stream = require('stream').Stream; | |
exports.hook_queue = function (next, connection) { | |
// MongoDB configuration settings. | |
var databaseUrl = "localhost"; | |
var collections = ["email"]; | |
var db = require("mongojs").connect(databaseUrl, collections); | |
// basic logging so we can see if we have an email hitting the stack | |
this.loginfo("New inbound email detected, inserting into mongodb"); |
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
Subject: multipart test | |
Content-Type: multipart/mixed; boundary=--=_boundary_1 | |
MIME-Version: 1.0 | |
prolog | |
----=_boundary_1 | |
Content-Type: multipart/alternative; boundary=--=_boundary_2 | |
----=_boundary_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
Nov 21 18:42:26 mail1-ec2 haraka[29858]: [INFO] [FE497A00-20A4-4C94-9A05-EDBA3EADC025.1] [queue/smtp_forward] forwarding to 127.0.0.1:2525 | |
Nov 21 18:42:26 mail1-ec2 haraka[29858]: [INFO] [FE497A00-20A4-4C94-9A05-EDBA3EADC025.1] [core] hook=queue plugin=queue/smtp_forward function=hook_queue params="" retval=OK msg="2.0.0 qALIemCN030226 Message accepted for delivery (FE497A00-20A4-4C94-9A05-EDBA3EADC025.1)" | |
Nov 21 18:42:26 mail1-ec2 haraka[29858]: [INFO] [FE497A00-20A4-4C94-9A05-EDBA3EADC025.1] [core] hook=queue_ok plugin=queue/discard function=hook_queue_ok params="2.0.0 qALIemCN030226 Message accepted for delivery (FE497A00-20A4-4C94-9A05-EDBA3EADC025.1)" retval=OK msg="" | |
Nov 21 18:42:26 mail1-ec2 haraka[29858]: [NOTICE] [FE497A00-20A4-4C94-9A05-EDBA3EADC025.1] [core] queue code=OK msg="2.0.0 qALIemCN030226 Message accepted for delivery (FE497A00-20A4-4C94-9A05-EDBA3EADC025.1)" | |
Nov 21 18:42:26 mail1-ec2 haraka[29858]: [WARN] [FE497A00-20A4-4C94-9A05-EDBA3EADC025.1] [core] client ch1ehsobe002.messaging.micros |
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
Date/Time: Wed, 14 Nov 2012 17:01:53 GMT | |
ID : 14D54B2C-E2DE-4367-A837-E349568738E2.1 | |
Host/IP : 188-223-62-1.zone14.bethere.co.uk [188.223.62.1] | |
Auth User: [email protected] | |
Sender : [email protected] | |
Detail : Message is infected with Eicar-Test-Signature | |
From: "MAILER DAEMON" <[email protected]> | |
To: <[email protected]> | |
Subject: Administrative Alert | |
MIME-Version: 1.0 |