Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spf calling next() multiple times when several MX lookups fail #23

Open
celesteking opened this issue Mar 15, 2021 · 1 comment
Open

Comments

@celesteking
Copy link

celesteking commented Mar 15, 2021

Basically,

[core] Error
    at callback (/Haraka/plugins.js:482:34)
    at Plugin.exports.return_results (Haraka/plugins/spf.js:295:20)
    at ch_cb (Haraka/plugins/spf.js:214:16)
    at mech_chain_caller (Haraka/spf.js:316:28)
    at QueryReqWrap.callback (Haraka/spf.js:507:56)
    at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:10)

This is happening because of the following events chain:

        net_utils.get_mx(domain, (err, mxes) => {
            for (let a=0; a<mxes.length; a++) {
                dns[resolve_method](mx, (err4, addrs) => {
                            default:            return cb(null, self.SPF_TEMPERROR);

When there are multiple MX, and some of them fail (or maybe even when some fail, some succeed), we invoke CB which doesn't put a stopper on further invocations.

System Info:

2.8.27

@celesteking
Copy link
Author

celesteking commented Mar 15, 2021

Thinking this further, if some mechs fail and others succeed, shouldn't we consider it a success instead of temperror or whatever? What is some lookups inside a mech fail, but others produce a MATCH, shouldn't we consider the same? A question to someone who's read RFC.

@msimerson msimerson transferred this issue from haraka/Haraka Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant