-
Notifications
You must be signed in to change notification settings - Fork 368
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
add support for wildcards in allowed_hosts, add tests for allowsHost() #73
Conversation
Thanks for sharing! It's a good idea. At present, there is a major refactoring work in progress, and going through final testing. Once that's merged, it will open an interesting possibility of implementing this change as a component. See preliminary documentation for "processors" here https://github.com/flashmob/go-guerrilla/wiki/About-Backends:-introduction,-configuring-and-extending If implemented as a "processor", you would add wildcard checking for the last item added to the There's a MailDir processor which has a good example, it validates recipients based on a table that is set via the config. You can use that as a template. https://github.com/flashmob/maildir-processor The other comment is that in our use case, there are a few hundred hosts... So doing a So If you're interested in implementing as a processor, that would be ideal. Only update of the docs is left to do, and the branch will be merged soon. #71 |
Thanks for your response! Yes, I'm interested in it, we will probably upgrade to the newest version as well, so I'll implement it then. |
I am interested in the same feature! I'll wait the newest version, the processors idea seems promising. |
Good to know! Currently going through a review & new documentation is being
prepared, should be ready soon :-)
…On 15 Mar. 2017 02:19, "mrcpvn" ***@***.***> wrote:
I am interested in the same feature! I'll wait the newest version, the
processors idea seems promising.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAnmP-_38f87Kz1KZK5Q0x8KzglvZPBsks5rlq_ygaJpZM4MZjVH>
.
|
Hello, I am trying to develop a processor that would validate the recipients in a custom way. |
How about this: add a feature for to allow disabling the default allowed hosts check, by configuring it with a single item containing a ".". Another way would be to do an empty list, however, an administrator may accidentally leave the list empty, so It's better to have something explicit. Here is the PR #76 |
sounds good to me thank you |
Afternoon, I have been testing go-guerrilla, with the wildcard filtering as described in #80. To use wildcard filtering as it is now, a user would have to
I understand the reason for (1), as it defers the filtering logic to that of the processor(s) because the host checking is upstream of the plugins, however, it now means I have would have to push any non-wildcard domains to the wildcard filter, which to me feels a little off. This also means now, the error emitted to the sending server is now: 5.1.1 User unknown in local recipient table no such user and not (the probably more correct) 454 4.1.1 Error: Relay access denied: After playing around with this I think the better move would've been either: add a hook inside 'allowsHost' so that the wildcard processor, can be processed in the right place removing the need for a '.' and allow for mix and matched domains. Adding the hook would mean another person could add a regex based domain check or a plugin that could check REDIS for valid domains addresses instead of having them soft-hardcoded in a config ... (add more examples here). Apologies to the random 2c, I hope it all makes sense. Ps, sorry for the PR hijack, and love the pluggable backends. |
Hi @stuartskelton sorry for the late reply to this. You make a good point, the . fix was really a band aid, and indeed cumbersome to configure and inaccurate error response. It seems like it would be better to support wildcards in the core, also regexes. If using regexes, prefix with a ~ character. Todo:
|
Wildcards will also allow to use subdomains, eliminating the need for PR #81
Wildcards will also allow to use subdomains, eliminating the need for PR #81
In our project we need to allow wide range of hosts and wildcard seems to be pretty good for it, so I thought that someone else might appreciate this feature as well.