Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| centos:mail_c7:dovecot_6 [30.07.2014 21:07. ] – [10-auth.conf] django | centos:mail_c7:dovecot_6 [18.11.2024 07:08. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 8: | Zeile 8: | ||
| - **GID** : Gruppen-ID, die beim Anlegen des Benutzerkontos, | - **GID** : Gruppen-ID, die beim Anlegen des Benutzerkontos, | ||
| - **Home-Verzeichnis**: | - **Home-Verzeichnis**: | ||
| - | |||
| ===== Authentifizierungsquellen ===== | ===== Authentifizierungsquellen ===== | ||
| Zeile 28: | Zeile 27: | ||
| Authentifizierungs-Anfragen, | Authentifizierungs-Anfragen, | ||
| * **passdb-lookup** : Der passdb-lookup wird von Dovecot immer dann ausgeführt, | * **passdb-lookup** : Der passdb-lookup wird von Dovecot immer dann ausgeführt, | ||
| - | * **userdb-lookup** : Bei einem userdb-lookup ermittelt unser Dovecot-Server die Umgebungsvariablen des genannten/ | + | * **userdb-lookup** : Bei einem userdb-lookup ermittelt unser Dovecot-Server die Umgebungsvariablen des genannten/ |
| Zeile 72: | Zeile 71: | ||
| django: | django: | ||
| - | Der Username **django** kann zwar benutzt werden, nicht aber django@nausch.org | + | Der Username **django** kann zwar benutzt werden, nicht aber django@nausch.org. |
| Über die Konfigurationsdatei // | Über die Konfigurationsdatei // | ||
| Zeile 267: | Zeile 266: | ||
| Build Host : vml000200.dmz.nausch.org | Build Host : vml000200.dmz.nausch.org | ||
| Relocations : (not relocatable) | Relocations : (not relocatable) | ||
| - | Packager | + | Packager |
| Vendor | Vendor | ||
| URL : http:// | URL : http:// | ||
| Zeile 280: | Zeile 279: | ||
| === dovecot-sql.conf.ext === | === dovecot-sql.conf.ext === | ||
| Bei der RPM-Installation unseres Dovecot-Servers, | Bei der RPM-Installation unseres Dovecot-Servers, | ||
| - | # cp / | + | # cp / |
| Die wichtigsten Konfigurationsparameter in dieser Datei, die wir unseren Bedürfnissen nach anpassen müssen sind: | Die wichtigsten Konfigurationsparameter in dieser Datei, die wir unseren Bedürfnissen nach anpassen müssen sind: | ||
| Zeile 412: | Zeile 411: | ||
| # Django : 2013-02-06 | # Django : 2013-02-06 | ||
| # default: unset | # default: unset | ||
| - | password_query = SELECT username AS user, password FROM mailbox WHERE username = ' | + | password_query = SELECT username AS user, password, 10000 AS userdb_uid, 10000 AS userdb_gid, \ |
| + | CONCAT(' | ||
| # userdb query to retrieve the user information. It can return fields: | # userdb query to retrieve the user information. It can return fields: | ||
| Zeile 551: | Zeile 551: | ||
| Nur so ist sichergestellt, | Nur so ist sichergestellt, | ||
| + | === 10-auth.conf == | ||
| + | Zur Aktivierung des Authentifizierungs-Mechanismus **SQL** müssen wir nun nur noch den richtigen **!include** in der Konfigurationsdatei // | ||
| + | # vim / | ||
| + | <code bash>... | ||
| + | |||
| + | #!include auth-deny.conf.ext | ||
| + | #!include auth-master.conf.ext | ||
| + | |||
| + | # Django : 2014-07-30 | ||
| + | # default: !include auth-system.conf.ext | ||
| + | # Umstellung auf den Authentifizierungs-Mechanismus SQL | ||
| + | #!include auth-system.conf.ext | ||
| + | !include auth-sql.conf.ext | ||
| + | #!include auth-ldap.conf.ext | ||
| + | #!include auth-passwdfile.conf.ext | ||
| + | #!include auth-checkpassword.conf.ext | ||
| + | #!include auth-vpopmail.conf.ext | ||
| + | #!include auth-static.conf.ext | ||
| + | </ | ||
| + | |||
| + | Ferner definieren wir in der // | ||
| + | # vim / | ||
| + | <code bash>... | ||
| + | |||
| + | # Space separated list of wanted authentication mechanisms: | ||
| + | # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey | ||
| + | # | ||
| + | # NOTE: See also disable_plaintext_auth setting. | ||
| + | # Django : 2014-05-23 | ||
| + | # default: auth_mechanisms = plain | ||
| + | auth_mechanisms = plain login digest-md5 cram-md5 | ||
| + | |||
| + | ... | ||
| + | </ | ||
| + | |||
| + | Somit ergibt sich folgende komplette Konfigurationsdatei | ||
| + | # vim / | ||
| + | <file bash / | ||
| + | ## Authentication processes | ||
| + | ## | ||
| + | |||
| + | # Disable LOGIN command and all other plaintext authentications unless | ||
| + | # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP | ||
| + | # matches the local IP (ie. you're connecting from the same computer), the | ||
| + | # connection is considered secure and plaintext authentication is allowed. | ||
| + | # See also ssl=required setting. | ||
| + | # | ||
| + | |||
| + | # Authentication cache size (e.g. 10M). 0 means it's disabled. Note that | ||
| + | # bsdauth, PAM and vpopmail require cache_key to be set for caching to be used. | ||
| + | # | ||
| + | # Time to live for cached data. After TTL expires the cached record is no | ||
| + | # longer used, *except* if the main database lookup returns internal failure. | ||
| + | # We also try to handle password changes automatically: | ||
| + | # authentication was successful, but this one wasn' | ||
| + | # For now this works only with plaintext authentication. | ||
| + | # | ||
| + | # TTL for negative hits (user not found, password mismatch). | ||
| + | # 0 disables caching them completely. | ||
| + | # | ||
| + | |||
| + | # Space separated list of realms for SASL authentication mechanisms that need | ||
| + | # them. You can leave it empty if you don't want to support multiple realms. | ||
| + | # Many clients simply use the first one listed here, so keep the default realm | ||
| + | # first. | ||
| + | # | ||
| + | |||
| + | # Default realm/ | ||
| + | # SASL realms and appending @domain to username in plaintext logins. | ||
| + | # | ||
| + | |||
| + | # List of allowed characters in username. If the user-given username contains | ||
| + | # a character not listed in here, the login automatically fails. This is just | ||
| + | # an extra check to make sure user can't exploit any potential quote escaping | ||
| + | # vulnerabilities with SQL/LDAP databases. If you want to allow all characters, | ||
| + | # set this value to empty. | ||
| + | # | ||
| + | |||
| + | # Username character translations before it's looked up from databases. The | ||
| + | # value contains series of from -> to characters. For example "# | ||
| + | # that '#' | ||
| + | # | ||
| + | |||
| + | # Username formatting before it's looked up from databases. You can use | ||
| + | # the standard variables here, eg. %Lu would lowercase the username, %n would | ||
| + | # drop away the domain if it was given, or " | ||
| + | # " | ||
| + | # | ||
| + | |||
| + | # If you want to allow master users to log in by specifying the master | ||
| + | # username within the normal username string (ie. not using SASL mechanism' | ||
| + | # support for it), you can specify the separator character here. The format | ||
| + | # is then < | ||
| + | # separator, so that could be a good choice. | ||
| + | # | ||
| + | |||
| + | # Username to use for users logging in with ANONYMOUS SASL mechanism | ||
| + | # | ||
| + | |||
| + | # Maximum number of dovecot-auth worker processes. They' | ||
| + | # blocking passdb and userdb queries (eg. MySQL and PAM). They' | ||
| + | # automatically created and destroyed as needed. | ||
| + | # | ||
| + | |||
| + | # Host name to use in GSSAPI principal names. The default is to use the | ||
| + | # name returned by gethostname(). Use " | ||
| + | # entries. | ||
| + | # | ||
| + | |||
| + | # Kerberos keytab to use for the GSSAPI mechanism. Will use the system | ||
| + | # default (usually / | ||
| + | # the auth service to run as root to be able to read this file. | ||
| + | # | ||
| + | |||
| + | # Do NTLM and GSS-SPNEGO authentication using Samba' | ||
| + | # ntlm_auth helper. < | ||
| + | # | ||
| + | |||
| + | # Path for Samba' | ||
| + | # | ||
| + | |||
| + | # Time to delay before replying to failed authentications. | ||
| + | # | ||
| + | |||
| + | # Require a valid SSL client certificate or the authentication fails. | ||
| + | # | ||
| + | |||
| + | # Take the username from client' | ||
| + | # X509_NAME_get_text_by_NID() which returns the subject' | ||
| + | # CommonName. | ||
| + | # | ||
| + | |||
| + | # Space separated list of wanted authentication mechanisms: | ||
| + | # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey | ||
| + | # | ||
| + | # NOTE: See also disable_plaintext_auth setting. | ||
| + | # Django : 2014-05-23 | ||
| + | # default: auth_mechanisms = plain | ||
| + | auth_mechanisms = plain login digest-md5 cram-md5 | ||
| + | |||
| + | ## | ||
| + | ## Password and user databases | ||
| + | ## | ||
| + | |||
| + | # | ||
| + | # Password database is used to verify user's password (and nothing more). | ||
| + | # You can have multiple passdbs and userdbs. This is useful if you want to | ||
| + | # allow both system users (/ | ||
| + | # duplicating the system users into virtual database. | ||
| + | # | ||
| + | # < | ||
| + | # | ||
| + | # User database specifies where mails are located and what user/group IDs | ||
| + | # own them. For single-UID configuration use " | ||
| + | # | ||
| + | # < | ||
| + | |||
| + | #!include auth-deny.conf.ext | ||
| + | #!include auth-master.conf.ext | ||
| + | |||
| + | # Django : 2014-07-30 | ||
| + | # default: !include auth-system.conf.ext | ||
| + | # Umstellung auf den Authentifizierungs-Mechanismus passwd-file | ||
| + | #!include auth-system.conf.ext | ||
| + | !include auth-sql.conf.ext | ||
| + | #!include auth-ldap.conf.ext | ||
| + | #!include auth-passwdfile.conf.ext | ||
| + | #!include auth-checkpassword.conf.ext | ||
| + | #!include auth-vpopmail.conf.ext | ||
| + | #!include auth-static.conf.ext | ||
| + | </ | ||
| Zeile 581: | Zeile 752: | ||
| + | |||
| + | Haben wir die Benutzerauthentifizierung erfolgreich abgeschlossen, | ||
| ====== Links ====== | ====== Links ====== | ||
| Zeile 586: | Zeile 759: | ||
| * **[[wiki: | * **[[wiki: | ||
| * **[[http:// | * **[[http:// | ||
| - | |||
| - | ~~DISCUSSION~~ | ||