From 725f3cb4e4c7dd8dea7899d730500ba1b9f4a1e0 Mon Sep 17 00:00:00 2001 From: genofire Date: Fri, 18 Sep 2020 15:07:34 +0000 Subject: [PATCH] improve mailing configuration --- README.md | 2 ++ defaults/main.yml | 2 ++ templates/gitea.ini.j2 | 2 ++ 3 files changed, 6 insertions(+) diff --git a/README.md b/README.md index ef2848e..cdab85f 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we * `gitea_disable_gravatar`: Do you want to disable Gravatar ? (privacy and so on) (true/false) * `gitea_offline_mode`: Same but for disabling CDNs for frontend assets (true/false) * `gitea_disable_registration`: Do you want to disable user registration ? (true/false) +* `gitea_register_email_confirm`: Enable this to ask for mail confirmation of registration. Requires `gitea_mailer_enabled` to be enabled (Default: `false`) * `gitea_only_allow_external_registration`: Do you want to force registration only using third-party services ? (true/false) * `gitea_show_registration_button`: Do you want to show the registration button? (true/false) * `gitea_require_signin`: Do you require a signin to see repo's (even public ones) ? (true/false) @@ -118,6 +119,7 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we * `gitea_mailer_user`: SMTP server username * `gitea_mailer_password`: SMTP server password * `gitea_mailer_from`: Sender mail address +* `gitea_subject_prefix`: Prefix to be placed before e-mail subject lines (Default: ``) * `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false` ### Log configuration diff --git a/defaults/main.yml b/defaults/main.yml index 9d7f4a6..0436cb6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -43,6 +43,7 @@ gitea_internal_token: SomethingVeryLong gitea_show_user_email: false gitea_disable_gravatar: true gitea_disable_registration: false +gitea_register_email_confirm: false gitea_show_registration_button: true gitea_require_signin: true gitea_enable_captcha: true @@ -58,6 +59,7 @@ gitea_mailer_host: localhost:25 gitea_mailer_from: noreply@your.domain gitea_mailer_user: "" gitea_mailer_password: "" +gitea_subject_prefix: "" gitea_mailer_type: smtp gitea_log_systemd: false diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index ec66b04..00e5b71 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -111,6 +111,7 @@ LOGIN_REMEMBER_DAYS = 7 [service] ; Disallow registration, only allow admins to create accounts. DISABLE_REGISTRATION = {{ gitea_disable_registration }} +REGISTER_EMAIL_CONFIRM = {{ gitea_register_email_confirm }} ; User must sign in to view anything. REQUIRE_SIGNIN_VIEW = {{ gitea_require_signin }} ; Enable captcha validation for registration @@ -153,6 +154,7 @@ USER = {{ gitea_mailer_user }} PASSWD = `{{ gitea_mailer_password }}` ; Send mails as plain text SEND_AS_PLAIN_TEXT = false +SUBJECT_PREFIX = {{ gitea_subject_prefix }} ; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log) MAILER_TYPE = {{ gitea_mailer_type }} ; Specify an alternative sendmail binary