[Dovecot] strip realms and force lowercasing of usernames?
Is it possible for dovecot to strip realms and force lowercasing of usernames?
We have a lot of dumb customers who try logging in to pop3 with crap like UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is hard and is a significant and costly support burden.
It would be nice if dovecot could handle this in some way.
-Dan
Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames?
We have a lot of dumb customers who try logging in to pop3 with crap like UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is hard and is a significant and costly support burden.
It would be nice if dovecot could handle this in some way.
-Dan
Hi Dan,
In your default_mail_env if you use %n instead of %u you will get the domains stripped. As for lowercase that is a feature I would like to see, I will see if I can code it tonight.
Regards Andrew
-- Andrew Hutchings (A-Wing) Linux Guru - Netserve Consultants Ltd. - http://www.domaincity.co.uk/ Admin - North Wales Linux User Group - http://www.nwlug.org.uk/ BOFH excuse 370: Virus due to computers having unsafe sex.
On 160, 06 09, 2005 at 01:25:41PM +0100, Andrew Hutchings wrote:
Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames?
We have a lot of dumb customers who try logging in to pop3 with crap like UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is hard and is a significant and costly support burden.
It would be nice if dovecot could handle this in some way.
-Dan
Hi Dan,
In your default_mail_env if you use %n instead of %u you will get the domains stripped. As for lowercase that is a feature I would like to see, I will see if I can code it tonight.
Quoting from doc/variables.txt:
You can apply a modifiers for each variable (eg. %Lp = pop3):
%L - lowercase %U - uppercase %E - escape '"', "'" and '\' characters by inserting '\' before them.
-- Andrey Panin | Linux and UNIX system administrator pazke@donpac.ru | PGP key: wwwkeys.pgp.net
Andrey Panin wrote:
On 160, 06 09, 2005 at 01:25:41PM +0100, Andrew Hutchings wrote:
Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames?
We have a lot of dumb customers who try logging in to pop3 with crap like UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is hard and is a significant and costly support burden.
It would be nice if dovecot could handle this in some way.
-Dan
Hi Dan,
In your default_mail_env if you use %n instead of %u you will get the domains stripped. As for lowercase that is a feature I would like to see, I will see if I can code it tonight.
Quoting from doc/variables.txt:
You can apply a modifiers for each variable (eg. %Lp = pop3):
%L - lowercase %U - uppercase %E - escape '"', "'" and '\' characters by inserting '\' before them.
Now here is a good case where I should RTFM :)
Regards Andrew
-- Andrew Hutchings (A-Wing) Linux Guru - Netserve Consultants Ltd. - http://www.domaincity.co.uk/ Admin - North Wales Linux User Group - http://www.nwlug.org.uk/ BOFH excuse 430: Mouse has out-of-cheese-error
I have patched the test70 release to force the lowercase username after input. Rather than using my patch, I'd like to use the existing dovecot functionality. Has anyone used these modifiers in production systems? Any problems with them?
Jeff Graves, MCSA Customer Support Engineer Image Source, Inc. 10 Mill Street Bellingham, MA 02019
508.966.5200 - Phone 508.966.5170 - Fax jeff@image-src.com - Email www.image-src.com
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Andrey Panin Sent: Thursday, June 09, 2005 8:31 AM To: Andrew Hutchings Cc: Dan Hollis; dovecot@dovecot.org Subject: Re: [Dovecot] strip realms and force lowercasing of usernames?
On 160, 06 09, 2005 at 01:25:41PM +0100, Andrew Hutchings wrote:
Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames?
We have a lot of dumb customers who try logging in to pop3 with crap like
UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is
hard and is a significant and costly support burden.
It would be nice if dovecot could handle this in some way.
-Dan
Hi Dan,
In your default_mail_env if you use %n instead of %u you will get the domains stripped. As for lowercase that is a feature I would like to see, I will see if I can code it tonight.
Quoting from doc/variables.txt:
You can apply a modifiers for each variable (eg. %Lp = pop3):
%L - lowercase %U - uppercase %E - escape '"', "'" and '\' characters by inserting '\' before them.
-- Andrey Panin | Linux and UNIX system administrator pazke@donpac.ru | PGP key: wwwkeys.pgp.net
On Tue, 14 Jun 2005, Jeff Graves wrote:
I have patched the test70 release to force the lowercase username after input. Rather than using my patch, I'd like to use the existing dovecot functionality. Has anyone used these modifiers in production systems? Any problems with them?
The modifiers dont work for authentication.
-Dan
On Thu, 9 Jun 2005, Andrew Hutchings wrote:
Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames? We have a lot of dumb customers who try logging in to pop3 with crap like UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is hard and is a significant and costly support burden. It would be nice if dovecot could handle this in some way. In your default_mail_env if you use %n instead of %u you will get the domains stripped. As for lowercase that is a feature I would like to see, I will see if I can code it tonight.
No no no :-) default_mail_env only specifies the _mailspool location_.
What I want is for dovecot to strip realms and force lowercase of usernames _before passing them to pop3-login or pam for authentication_
So if a user tries to login as "SoMEuSERNAme@msn.com" it actually authenticates them as "someusername". Stripping the realm and lowercasing the name _before checking it against the passwd/shadow files_.
Other pop3 servers like teapop have explicit support for this.
-Dan
On Thu, 2005-06-09 at 13:21 -0700, Dan Hollis wrote:
What I want is for dovecot to strip realms and force lowercase of usernames _before passing them to pop3-login or pam for authentication_
So if a user tries to login as "SoMEuSERNAme@msn.com" it actually authenticates them as "someusername". Stripping the realm and lowercasing the name _before checking it against the passwd/shadow files_.
Other pop3 servers like teapop have explicit support for this.
Sounds pretty ugly and kludgy feature. If you used SQL database to store users, you could easily do this.
On Fri, 10 Jun 2005, Timo Sirainen wrote:
On Thu, 2005-06-09 at 13:21 -0700, Dan Hollis wrote:
What I want is for dovecot to strip realms and force lowercase of usernames _before passing them to pop3-login or pam for authentication_ So if a user tries to login as "SoMEuSERNAme@msn.com" it actually authenticates them as "someusername". Stripping the realm and lowercasing the name _before checking it against the passwd/shadow files_. Other pop3 servers like teapop have explicit support for this. Sounds pretty ugly and kludgy feature. If you used SQL database to store users, you could easily do this.
No more ugly and kludgy than default_mail_env.
All that's needed is something to mangle logins. In fact the logic would be very similar to default_mail_env.
We don't use SQL database to store users and moving to such would incur great time and effort (and require major reworking of all our mail system). So it's a non-option.
Like I said, other pop3 servers like teapop have explicit support for this. It would be nice if we could move to dovecot without loss of functionality.
-Dan
(05.06.09 kl.15:53) Dan Hollis skrev följande till Timo Sirainen:
On Fri, 10 Jun 2005, Timo Sirainen wrote:
On Thu, 2005-06-09 at 13:21 -0700, Dan Hollis wrote:
What I want is for dovecot to strip realms and force lowercase of usernames _before passing them to pop3-login or pam for authentication_ So if a user tries to login as "SoMEuSERNAme@msn.com" it actually authenticates them as "someusername". Stripping the realm and lowercasing the name _before checking it against the passwd/shadow files_. Other pop3 servers like teapop have explicit support for this. Sounds pretty ugly and kludgy feature. If you used SQL database to store users, you could easily do this.
No more ugly and kludgy than default_mail_env.
All that's needed is something to mangle logins. In fact the logic would be very similar to default_mail_env.
We don't use SQL database to store users and moving to such would incur great time and effort (and require major reworking of all our mail system). So it's a non-option.
Like I said, other pop3 servers like teapop have explicit support for this. It would be nice if we could move to dovecot without loss of functionality.
I think this should be possible to implement as a PAM module.
/Jens
-Dan
'This mail automatically becomes portable when carried.'
Jens Låås Email: jens.laas@data.slu.se
Department of Computer Services, SLU Phone: +46 18 67 35 15
Vindbrovägen 1
P.O. Box 7079
S-750 07 Uppsala
SWEDEN
On Tue, 7 Jun 2005, Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames?
We have a lot of dumb customers who try logging in to pop3 with crap like UsERNAmE and bla@nonexistentdomain.com. All our usernames are lowercase and we have no realms. Trying to get hundreds of customers to fix this is hard and is a significant and costly support burden.
It would be nice if dovecot could handle this in some way.
One solution would be to run an POP/IMAP proxy - perdition is capable of doing this, for example.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks Computing Officer, IT Services University Of Strathclyde, Glasgow, UK
On Mon, 13 Jun 2005, Jethro R Binks wrote:
On Tue, 7 Jun 2005, Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames? One solution would be to run an POP/IMAP proxy - perdition is capable of doing this, for example.
Well thats just getting into the realm of silliness... having to use another complete pop3/imap application to prop up dovecot's shortcomings.
A pam module would make more sense really... :/
-Dan
On Mon, 13 Jun 2005, Dan Hollis wrote:
On Mon, 13 Jun 2005, Jethro R Binks wrote:
On Tue, 7 Jun 2005, Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames? One solution would be to run an POP/IMAP proxy - perdition is capable of doing this, for example.
Well thats just getting into the realm of silliness... having to use another complete pop3/imap application to prop up dovecot's shortcomings.
Excuse me for making a suggestion of a means to work around your issue until dovecot itself supports what you want.
A pam module would make more sense really... :/
That rather depends on whether you have other reasons for running a proxy, which we do. Try opening your mind to alternative solutions. It works for us.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks Computing Officer, IT Services University Of Strathclyde, Glasgow, UK
Dan Hollis wrote:
On Mon, 13 Jun 2005, Jethro R Binks wrote:
On Tue, 7 Jun 2005, Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames?
One solution would be to run an POP/IMAP proxy - perdition is capable of doing this, for example.
Well thats just getting into the realm of silliness... having to use another complete pop3/imap application to prop up dovecot's shortcomings.
A pam module would make more sense really... :/
-Dan
If Timo wrote in every feature that every person wanted, dovecot would be hundreds of meg in size, unstable and never finished. I take it you have gcc and a text editor, write the feature yourself and if it is any good submit it as a public patch. Dovecot is not a 'me too' package, it probably won't incorporate every feature that some other IMAP servers have, it does the job and does it very well while still being very lean, modular package.
Regards Andrew
-- Andrew Hutchings (A-Wing) Linux Guru - Netserve Consultants Ltd. - http://www.domaincity.co.uk/ Admin - North Wales Linux User Group - http://www.nwlug.org.uk/ BOFH excuse 426: internet is needed to catch the etherbunny
On Mon, 2005-06-13 at 16:22 -0700, Dan Hollis wrote:
On Mon, 13 Jun 2005, Jethro R Binks wrote:
On Tue, 7 Jun 2005, Dan Hollis wrote:
Is it possible for dovecot to strip realms and force lowercasing of usernames? One solution would be to run an POP/IMAP proxy - perdition is capable of doing this, for example.
Well thats just getting into the realm of silliness... having to use another complete pop3/imap application to prop up dovecot's shortcomings.
A pam module would make more sense really... :/
PAM module only works for PAM passdb, Dovecot still does userdb lookup from /etc/passwd or wherever you have it.
participants (8)
-
Andrew Hutchings
-
Andrey Panin
-
Dan Hollis
-
Dan Hollis
-
Jeff Graves
-
Jens Laas
-
Jethro R Binks
-
Timo Sirainen