maddy

Fork https://github.com/foxcpp/maddy

git clone git://git.lin.moe/go/maddy.git

 1# System command
 2
 3auth.external module for authentication using external helper binary. It looks for binary
 4named `maddy-auth-helper` in $PATH and libexecdir and uses it for authentication
 5using username/password pair.
 6
 7The protocol is very simple:
 8Program is launched for each authentication. Username and password are written
 9to stdin, adding \n to the end. If binary exits with 0 status code -
10authentication is considered successful. If the status code is 1 -
11authentication is failed. If the status code is 2 - another unrelated error has
12happened. Additional information should be written to stderr.
13
14```
15auth.external {
16    helper /usr/bin/ldap-helper
17    perdomain no
18    domains example.org
19}
20```
21
22## Configuration directives
23
24### helper _file_path_
25
26**Required.** <br>
27Location of the helper binary. 
28
29---
30
31### perdomain _boolean_
32Default: `no`
33
34Don't remove domain part of username when authenticating and require it to be
35present. Can be used if you want user@domain1 and user@domain2 to be different
36accounts.
37
38---
39
40### domains _domains..._
41Default: not specified
42
43Domains that should be allowed in username during authentication.
44
45For example, if 'domains' is set to "domain1 domain2", then
46username, username@domain1 and username@domain2 will be accepted as valid login
47name in addition to just username.
48
49If used without 'perdomain', domain part will be removed from login before
50check with underlying auth. mechanism. If 'perdomain' is set, then
51domains must be also set and domain part **will not** be removed before check.
52