From b039cbf6fcee48c4bd0f241d3c66dba021292002 Mon Sep 17 00:00:00 2001 From: Sylvain Manceau Date: Mon, 29 Aug 2022 08:40:54 +0000 Subject: [PATCH 1/2] Setting technical email aliases automatically --- scripts/postinstall.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index 6aae590..e5810a1 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -97,6 +97,12 @@ echo "Adding email accounts used by system senders (drive, ...)" docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox add drive@$DOMAIN --password $DRIVE_SMTP_PASSWORD --password2 $DRIVE_SMTP_PASSWORD --name "drive" --email-other $ALT_EMAIL docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox add $SMTP_FROM --password $SMTP_PW --password2 $SMTP_PW --name "welcome" --email-other $ALT_EMAIL +echo "Setting technical email aliases" +docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update abuse@$DOMAIN --goto $ALT_EMAIL +docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update hostmaster@$DOMAIN --goto $ALT_EMAIL +docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update postmaster@$DOMAIN --goto $ALT_EMAIL +docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update webmaster@$DOMAIN --goto $ALT_EMAIL + echo "Setting the right domain in welcome templates" docker-compose exec -T welcome find /var/www/html/invite_template/ -type f -exec sed -i "s/ecloud\.global/$DOMAIN/g" {} \; @@ -121,4 +127,5 @@ echo "========================================================================== echo "Your signup link:" bash scripts/generate-signup-link.sh --user-email $ALT_EMAIL +echo -e "\n\n\n" echo "Please reboot the server now" -- GitLab From 704b66c3f9b3255d97abb80b57d502aa1ede9ae9 Mon Sep 17 00:00:00 2001 From: Akhil Date: Mon, 29 Aug 2022 08:45:22 +0000 Subject: [PATCH 2/2] Apply 1 suggestion(s) to 1 file(s) --- scripts/postinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index e5810a1..e66e0de 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -97,7 +97,7 @@ echo "Adding email accounts used by system senders (drive, ...)" docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox add drive@$DOMAIN --password $DRIVE_SMTP_PASSWORD --password2 $DRIVE_SMTP_PASSWORD --name "drive" --email-other $ALT_EMAIL docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox add $SMTP_FROM --password $SMTP_PW --password2 $SMTP_PW --name "welcome" --email-other $ALT_EMAIL -echo "Setting technical email aliases" +echo "Setting technical email aliases to $ALT_EMAIL" docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update abuse@$DOMAIN --goto $ALT_EMAIL docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update hostmaster@$DOMAIN --goto $ALT_EMAIL docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli alias update postmaster@$DOMAIN --goto $ALT_EMAIL -- GitLab