-
Hello Haraka community, I already use Haraka for some different projects and I love it. For a new incoming mail filtering gateway project, I decided to use Haraka instead of postfix and I have a question about recipient verification. The project is quite simple, I have a few mail servers of different kind and would like to use the filtering gateway I'm building in front of them. To begin with, I used Then, one of the important component I need for this project is to drop the recipient if the target RCPT TO does not match an existing mailbox on the target server for the domain. Like for example a mail to [email protected] would be rejected if validtargetdomain.com is a ... valid target domain, but the mailbox doesn't exists on the target server. At first I thought the Still, I wrongly imagined that the plugin would verify that the mailbox really exists by first connecting to the target server and checking if the mailbox exists, by doing a MAIL FROM / RCPT TO to do the check. That's what I currently use with another setup using postfix, using the address verification procedure: I'm looking to achieve the same with Haraka. Before reinventing the wheel, Is that something already existing in a plugin ? I guess if it doesn't exists yet, maybe I should write a plugin, maybe using I would really appreciate any comments, hints, questions :) Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
You have exactly described what haraka-plugin-recipient-routes does. It validates full email addresses.
That is correct. That plugin expects the user to populate either files or a redis DB with the valid email addresses. This was a purposeful design choice because the SMTP next hop was a personal appliance that was "thinly" connected to the internet. Think: user devices with non-static IPs. Doing a SMTP callout to verify users would have been problematic. Extending the plugin to support learning of email addresses, caching the results to redis, and then having some robust logic for expiring / re-testing email address so the validation data doesn't get too stale would be a good approach. |
Beta Was this translation helpful? Give feedback.
-
Yep. There are two types of functions in async languages, sync and async. Any time a function does an asynchronous event in node, you have to |
Beta Was this translation helpful? Give feedback.
-
Hello @msimerson, I came up with a first version of the plugin, if you want to take a look at it :) https://github.com/sriccio/haraka-plugin-recipient-routes-probe It probably lacks some stuff but it is working quite well in my setup for now. |
Beta Was this translation helpful? Give feedback.
You have exactly described what haraka-plugin-recipient-routes does. It validates full email addresses.
That is correct. That plugin expects the user to populate either files or a redis DB with the valid email addresses. This was a purposeful design choice because the SMTP next hop was a personal app…