1# System command23auth.external module for authentication using external helper binary. It looks for binary4named `maddy-auth-helper` in $PATH and libexecdir and uses it for authentication5using username/password pair.67The protocol is very simple:8Program is launched for each authentication. Username and password are written9to 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 has12happened. Additional information should be written to stderr.1314```15auth.external {16 helper /usr/bin/ldap-helper17 perdomain no18 domains example.org19}20```2122## Configuration directives2324### helper _file_path_2526**Required.** <br>27Location of the helper binary.2829---3031### perdomain _boolean_32Default: `no`3334Don't remove domain part of username when authenticating and require it to be35present. Can be used if you want user@domain1 and user@domain2 to be different36accounts.3738---3940### domains _domains..._41Default: not specified4243Domains that should be allowed in username during authentication.4445For example, if 'domains' is set to "domain1 domain2", then46username, username@domain1 and username@domain2 will be accepted as valid login47name in addition to just username.4849If used without 'perdomain', domain part will be removed from login before50check with underlying auth. mechanism. If 'perdomain' is set, then51domains must be also set and domain part **will not** be removed before check.52