OAuth2 on top

This commit is contained in:
Keval Kapdee 2023-11-02 00:15:46 +00:00
parent 0cd624368e
commit e661240440
4 changed files with 10 additions and 6 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
################################################# #################################################
.env .env
compose.override.yaml
docs/site/ docs/site/
docker-data/ docker-data/

View File

@ -423,6 +423,10 @@ GETMAIL_POLL=5
# --- OAUTH2 Section ---------------------------- # --- OAUTH2 Section ----------------------------
# ----------------------------------------------- # -----------------------------------------------
# empty => OAUTH2 authentication is disabled
# 1 => OAUTH2 authentication is enabled
ENABLE_OAUTH2=
# empty => verySecretId # empty => verySecretId
# Specify the OAuth2 client ID # Specify the OAuth2 client ID
OAUTH2_CLIENT_ID= OAUTH2_CLIENT_ID=

View File

@ -62,16 +62,16 @@ function _register_functions() {
_register_setup_function '_setup_ldap' _register_setup_function '_setup_ldap'
;; ;;
( 'OAUTH2' )
_environment_variables_oauth2
_register_setup_function '_setup_oauth2'
;;
( * ) ( * )
_dms_panic__invalid_value "'${ACCOUNT_PROVISIONER}' is not a valid value for ACCOUNT_PROVISIONER" _dms_panic__invalid_value "'${ACCOUNT_PROVISIONER}' is not a valid value for ACCOUNT_PROVISIONER"
;; ;;
esac esac
if [[ ${ENABLE_OAUTH2} -eq 1 ]]; then
_environment_variables_oauth2
_register_setup_function '_setup_oauth2'
fi
if [[ ${ENABLE_SASLAUTHD} -eq 1 ]]; then if [[ ${ENABLE_SASLAUTHD} -eq 1 ]]; then
_environment_variables_saslauthd _environment_variables_saslauthd
_register_setup_function '_setup_saslauthd' _register_setup_function '_setup_saslauthd'

View File

@ -4,7 +4,6 @@ function _setup_oauth2() {
_log 'debug' 'Setting up OAUTH2' _log 'debug' 'Setting up OAUTH2'
sed -i -e '/\!include auth-oauth2\.conf\.ext/s/^#//' /etc/dovecot/conf.d/10-auth.conf sed -i -e '/\!include auth-oauth2\.conf\.ext/s/^#//' /etc/dovecot/conf.d/10-auth.conf
sed -i -e '/\!include auth-passwdfile\.inc/s/^/#/' /etc/dovecot/conf.d/10-auth.conf
_log 'trace' "Configuring Dovecot OAUTH2" _log 'trace' "Configuring Dovecot OAUTH2"