From 8c857742f8f0f90b7c9f658ca1a8226b0e9eab9b Mon Sep 17 00:00:00 2001 From: Jeff Date: Mon, 6 Mar 2017 17:16:18 +0100 Subject: [PATCH] Fix post_domain_add hook As hooks do not have access to files, we need to echo the template in the file. This is not ideal but I don't see another way at the moment. We need to update this hook whenever we change the example domain.ini file --- hooks/post_domain_add | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hooks/post_domain_add b/hooks/post_domain_add index 534cf63..b2abdc0 100644 --- a/hooks/post_domain_add +++ b/hooks/post_domain_add @@ -4,4 +4,21 @@ app='rainloop' # This could never work with multi-instance. Need to find a bette domain=$1 rainloop_path=/var/www/$app/app -sudo cp ../conf/data/domains/domain.tld.ini $rainloop_path/data/_data_/_default_/domains/$domain.ini +echo ' +imap_host = "localhost" +imap_port = 993 +imap_secure = "SSL" +imap_short_login = On +sieve_use = On +sieve_allow_raw = On +sieve_host = "localhost" +sieve_port = 4190 +sieve_secure = "TLS" +smtp_host = "localhost" +smtp_port = 587 +smtp_secure = "TLS" +smtp_short_login = On +smtp_auth = On +smtp_php_mail = Off +white_list = "" +' | sudo tee --append $rainloop_path/data/_data_/_default_/domains/$domain.ini > /dev/null