Git Product home page Git Product logo

haraka-alias-forward's People

Contributors

chadsmith avatar dhrp avatar gcollic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

haraka-alias-forward's Issues

connection.relaying = true

I'm one of the Haraka committers and I just stumbled across your plugin.

In your plugin you're setting connection.relaying = true to force the use of Haraka's outbound module to deliver the mail to the aliases destination address. Whilst this might work, it's wrong to do it like this because you can easily create a security hole if your hook_rcpt function return's next() for any reason.
Your plugin is OK because it does a next(DENY) if the alias doesn't match, but if someone customized this, they could easily create this issue.

connection.relaying is a connection level variable, meaning once it is set - it persists across the lifetime of the connection.

The 'correct' way to do this is to remove the connection.relaying = true line and then add yourself a custom queue hook which does this:

var outbound = require('./outbound');
var constants = require('./constants');
exports.hook_queue = function (next, connection) {
    var txn = connection.transaction;
    outbound.send_email(txn, function(retval, msg) {
        switch(retval) {
            case constants.ok:
                return next(OK, msg);
                break;
            case constants.deny:
                return next(DENY, msg);
                break;
            default:
                return next(DENYSOFT, msg);
        }
    });
}

That way you can safely fall through hook_rcpt with next() without creating an open relay.

Thank you!

Hi Chad!

I just wanted to say thank you!, for writing this script. i've spent too much time on getting started with Haraka, mostly because I expected 'aliases' to just work. But it turns out it doesn't do so without auth..

Your script does exactly what I want it to do. Perhaps you would like to officially contribute it to Haraka?

No relay on auth

When this plugin is used, you can only send mails to recipients in the rcpt_to.* modules.
The relay method not working. (for example - when AUTH is enabled and passed).

Plugin is failing with rspamd integration

I am using your plugin, merely the @guoyiang s fork (because of #5) and i have noticed that it doesn't play very well with haraka-plugin-rspamd. When i enable both plugins, rspamd fails. Since rspamd doesn't fail, when i enable alias-forward, i think it could have something to do with this plugin as well.

Please notice haraka/haraka-plugin-rspamd#5

@guoyiang if you will receive this, it would be great if you could open up the issues section on your fork, since it is a bit different of @chadsmith s implementation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.