Open smfreegard opened 9 years ago
Is this now closed due to https://github.com/haraka/Haraka/pull/1430? If not, what needs to be done?
It's still open. It needs a mechanism within Haraka to ask, "is this domain name local?" Because "local" domains are typically defined in plugins, it's more than a trivial task. In my case, I have "local" domains defined in smtp_forward.ini and externally (via qmail-deliverable), so Haraka accepts mails for domains it knows nothing of. Hence, the stall.
For something like this to work reliably, we'd almost need a plugin like known-senders except as known-recipients
and all it would do is listen on the rcpt_ok
hooks and keep a redis DB populated with domains that we accept messages for. Or something like that...
For something like this to work reliably, we'd almost need a plugin like known-senders except as known-recipients and all it would do is listen on the rcpt_ok hooks and keep a redis DB populated with domains that we accept messages for. Or something like that...
There are a couple of plugins, that if loaded (e.g. rcpt_to.in_host_list and relay) that could probably do this without a Redis DB as the domains are defined in their configuration. It would just have to skip anything else.
I was just looking at the bounce plugin as I had a new idea for a test and I noticed that non_local_msgid:
Additionally - when I gave this a quick test using the plugin test mode; it blew up immediately because I didn't surround the Message-ID in <>'s:
And when I did; the regexps pulled out the wrong values because:
domains.push(res[0].substring(1, (res[0].length -2)));
is off-by-one. It would be better to use a regexp capture instead of the substring IMO anyway.