[Dovecot] Login with firstname.lastname instead of loginname - WORKING
3 years ago (!) I aksed about this and finally I implemented it today:
# NEW passdb { driver = passwd # firstname.lastname@charite.de:password:uid:gid:(gecos):home:(shell):user=realloginname args = /usr/local/etc/dovecot.login_via_email }
If you're only using it as a passdb, you don't need the uid/gid/home. So an example field would be:
firstname.lastname@charite.de:password::::::user=realloginname
But now I'm encountering problems with users writing
Firstname.Lastname@charite.de instead of firstname.lastname@charite.de (capitalized first letters)
How can I "normalize" the usernames by lowercasing them?
The coolest solution would be to strip realms AND force lowercasing of usernames in one pass
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, Jan 05, 2011 at 09:51:19AM +0100, Ralf Hildebrandt wrote:
But now I'm encountering problems with users writing
Firstname.Lastname@charite.de instead of firstname.lastname@charite.de (capitalized first letters)
How can I "normalize" the usernames by lowercasing them?
The coolest solution would be to strip realms AND force lowercasing of usernames in one pass
Not tested, but hunch tells me something like:
args = username_format=%Ln
should work.
http://wiki2.dovecot.org/Variables
Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAk0kMpkACgkQ+meF/S97aXi84gCeIk7Jg7HDZFCO0i6sdNBTDiWg 2fsAnA7gQID7JvOdiu21YSkxK3tr1/Hk =0/01 -----END PGP SIGNATURE-----
- Thomas Leuxner tlx@leuxner.net:
Not tested, but hunch tells me something like:
args = username_format=%Ln
should work.
Yes, that worked like a charm! Now we were able to switch from an old courier-pop + patched authdaemon to dovecot for ALL services!
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
On 05/01/2011 08:51, Ralf Hildebrandt wrote:
3 years ago (!) I aksed about this and finally I implemented it today:
# NEW passdb { driver = passwd # firstname.lastname@charite.de:password:uid:gid:(gecos):home:(shell):user=realloginname args = /usr/local/etc/dovecot.login_via_email }
Out of curiousity, given a userbase the size you have, why are you using unix users rather than say LDAP or SQL?
Ed W
- Ed W lists@wildgooses.com:
On 05/01/2011 08:51, Ralf Hildebrandt wrote:
3 years ago (!) I aksed about this and finally I implemented it today:
# NEW passdb { driver = passwd # firstname.lastname@charite.de:password:uid:gid:(gecos):home:(shell):user=realloginname args = /usr/local/etc/dovecot.login_via_email }
Out of curiousity, given a userbase the size you have, why are you using unix users rather than say LDAP or SQL?
Traditional reasons. This system was installed over ten years ago and was changed over time.
We first started with courier (I think?) or uw-imap (I have no idea - mists of time and all that)
I just asked a colleague who still had the old docs I wrote ages ago. But those were discarded when he changed offices.
-- Ralf Hildebrandt Geschäftsbereich IT | Abteilung Netzwerk Charité - Universitätsmedizin Berlin Campus Benjamin Franklin Hindenburgdamm 30 | D-12203 Berlin Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962 ralf.hildebrandt@charite.de | http://www.charite.de
participants (4)
-
Ed W
-
Ralf Hildebrandt
-
Thomas Leuxner
-
Willie Gillespie