authorisation Module¶
This module contains the authorisation classes. They look up user information from various sources and validate a username/password pair against entries in the user table.
Bases: object
Base class for authorisation classes
Create Authorisation object
Parameters: - session (Smtp) –
- config (dict) –
Authorize user with password
Parameters: - username (string) –
- password (string) –
Returns: True if authorized
Config subsection
Session (Smtp)
Bases: pymail.authorisation.Authorisation
Authorisation from users subsection in config file
User accounts are defined in config section authorisation.users. A user definition consists of the following entries:
A key with the username mapping a string with the password, like in:
authorisation: users: jack: box jill: 0v3rth3h177
It should be common sense that this is not the proper place to define user accounts. Use this only for testing or if there are only a handful of users.