-
Notifications
You must be signed in to change notification settings - Fork 6
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
new features: username formats, user_id lookup, application column / docs #11
base: main
Are you sure you want to change the base?
Conversation
…mall fixes NEW FEATURES: - Support a variety of username formats, or same username. - ap4rc_strict_userid_lookup: Lookup user by id / username. - ap4rc_show_application: show/hide application column. FIXES: - Fix php warning "undefined variable $out" - Various indentation / spacing
Hi Rob, As it combines quite some different changes, I'd ask if you would mind if I just cherry-picked some of them to get them merged quickly? Background: My current thought is, that I'd prefer a really dynamic format definition and get our and your special use-cases out of the code and rather move them to be configuration data. For another instance that I am running, I have a similar need - so lets work together on this. |
Sure! To be honest, 3 + 4 are mostly experimental anyway as I was looking for different ways to get it to work with Dovecot, which has a very limited ability to extract substrings of usernames. (e.g. it can only seem to extract fixed widths, or from a given position to the end etc.) but not really any "split everything before/after/between this character" or regex match/extract capability. https://doc.dovecot.org/configuration_manual/config_file/config_variables Doing this, I have learned the following:
Nice idea to make it a "template" config format. Though it would then be possible to configure something that dovecot actually cannot match, and Dovecot's documentation is very lacking examples in this area. We could provide a few examples and matching dovecot config snippets though. If you are not very, very careful with dovecot's auth config, It's possible to configure something which "works", and looks like a nice idea, but is insecure or otherwise broken (e.g. any user's password is accepted for any other user. Or any password is accepted for ANY known user. Whoops.) Caveat emptor! It seems the modern "convention" is that most email clients expect the username to be an email address, and try to "auto-discover" the correct settings using a variety of methods and/or just guessing from what it finds in the DNS, and trying different port numbers etc. until a login succeeds. |
well if you want we can provide you the details we use for our setups IIRC we extra the username from the the |
In my case, the usernames are email addresses. I already have The usernames end up looking like:-
In which case, what happens is that "
You can do something like:
Which turns The docs don't suggest you can do much else here, other than permanently strip or add the domain part and do some simple translations. I guess in the original ap4rc username format, I just tested with the original ap4rc code and username format. Presumably the correct query should use
It uses
I'd be interested to know if you've done anything interesting with |
NEW FEATURES:
ap4rc_strict_userid_lookup
: Lookup user by id / username.ap4rc_show_application
: show/hide application column.FIXES: