Skip to content

Instantly share code, notes, and snippets.

@smfreegard
Created February 2, 2016 21:22
Show Gist options
  • Save smfreegard/aeb9e218d7f6106bab1d to your computer and use it in GitHub Desktop.
Save smfreegard/aeb9e218d7f6106bab1d to your computer and use it in GitHub Desktop.
exports.hook_data_post = function (next, connection) {
var txn = connection.transaction;
// Copy auth notes to transaction notes so they're available in hmail.todo.notes
txn.notes.auth_user = connection.notes.auth_user;
txn.notes.auth_passwd = connection.notes.auth_passwd;
return next();
}
exports.hook_get_mx = function (next, hmail, domain) {
return next(OK, {
priority: 10,
exchange: this.config.get('proxy_host'),
auth_user: hmail.todo.notes.auth_user,
auth_pass: hmail.todo.notes.auth_passwd
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment