Robin Bowes wrote:

We are proposing alternative login methods because the current "login"
method returns all user information after a successful login, yes?


Kind of.


Why not change the behaviour so that "login" does just that - it logs
in, and add another command that returns the information, e.g. "get"

I believe Ken Jones, and possibly others, already have programs that use the login command as it is. I want to avoid making any changes that would require existing programs to change. I'm just about to revert a number of changes I've made in the development branches of vpopmail and qmailadmin because they are too radical and I don't seem to be able to get anyone to try them, so I plan to be slower and much more conservative with future API changes.

I added the compact option to minimize network traffic, and cut the time to load a large list of domains or users in half. It did that, but I did not consider the problem with spaces in passwords. I don't use passwords with spaces in them, so I did not notice. Luckily John did.

Why return the data at all?

As I understand it vpopmaild was designed to allow people to write qmailadmin like programs with any scripting language you prefer, and to run them from machines other than the mail server. Qmailadmin and my pMailAdmin both need to know quite a bit about the user who is logging in to decide what screen to display next, and what to allow them to do. Returning that data as part of the login saves one trip to the server to retrieve data about the user logging in.


So, a system only needing to validate credentials would just need to
login and quit.

Which is what slogin will do. You may not even have to quit. It could just return OK or ERROR, and exit. I'm not sure what John did, but he already has a patch to do it this way.


"get" would take parameters, e.g:

get name
get user_dir

That is user_info



There could also be a "set" command which ... you guessed it!

set name "New Name"
set system_admin_privileges 1

That is mod_user.


What do you think?
The changes might be a good idea if we were designing a new program, but vpopmaild is about two years old, and I believe Ken has been using it on at least one production site almost that long. I suspect there are others.


Rick

Reply via email to