Fixed convertdomain to use SMTPUSER
This commit is contained in:
parent
078c0e545e
commit
3709d7c352
@ -59,6 +59,9 @@ do_serviceprep() {
|
||||
sed -i "s#dc=federatedcomputer,dc=cloud#dc=$DOMAIN_FIRST,dc=$DOMAIN_LAST#g" /federated/apps/ldap/data/root/convertdomain1.ldif
|
||||
fi
|
||||
sed -i "s#$DOMAIN#$DOMAIN_NEW#g" /federated/apps/ldap/data/root/convertdomain1.ldif
|
||||
|
||||
# Set SMTP user based on if fcore exists
|
||||
[[ $(docker exec -it ldap slapcat | grep fcore) ]] && SMTPUSER="fcore" || SMTPUSER="admin"
|
||||
}
|
||||
convert_pdnsmysql() {
|
||||
#### Convert PowerDNS pdnsmysql
|
||||
@ -266,7 +269,7 @@ convert_nextcloud() {
|
||||
"mail_smtpauth": 1,
|
||||
"mail_smtphost": "mail.$DOMAIN_NEW",
|
||||
"mail_smtpport": "587",
|
||||
"mail_smtpname": "admin",
|
||||
"mail_smtpname": "$SMTPUSER",
|
||||
"mail_smtppassword": "$ADMINPASS"
|
||||
},
|
||||
"apps": {
|
||||
@ -546,7 +549,7 @@ database:
|
||||
email:
|
||||
smtp_host: "mail.$DOMAIN_NEW"
|
||||
smtp_port: 587
|
||||
smtp_user: "admin"
|
||||
smtp_user: "$SMTPUSER"
|
||||
smtp_pass: "$ADMINPASS"
|
||||
force_tls: true
|
||||
# require_transport_security: true
|
||||
@ -629,7 +632,7 @@ convert_listmonk() {
|
||||
# Change app.root_url and other settings to our domain
|
||||
docker exec postgresql psql -U listmonk -c "update settings set value='\"http://listmonk.$DOMAIN_NEW\"' where key='app.root_url'" &> /dev/null
|
||||
docker exec postgresql psql -U listmonk -c "update settings set value='\"listmonk <listmonk@listmonk.$DOMAIN_NEW>\"' where key='app.from_email'" &> /dev/null
|
||||
docker exec postgresql psql -U listmonk -c "update settings set value='[{\"host\": \"mail.$DOMAIN_NEW\", \"port\": 587, \"enabled\": true, \"password\": \"$ADMINPASS\", \"tls_type\": \"STARTTLS\", \"username\": \"admin\", \"max_conns\": 10, \"idle_timeout\": \"15s\", \"wait_timeout\": \"5s\", \"auth_protocol\": \"login\", \"email_headers\": [], \"hello_hostname\": \"\", \"max_msg_retries\": 2, \"tls_skip_verify\": false}, {\"host\": \"smtp.gmail.com\", \"port\": 465, \"enabled\": false, \"password\": \"password\", \"tls_type\": \"TLS\", \"username\": \"username@gmail.com\", \"max_conns\": 10, \"idle_timeout\": \"15s\", \"wait_timeout\": \"5s\", \"auth_protocol\": \"login\", \"email_headers\": [], \"hello_hostname\": \"\", \"max_msg_retries\": 2, \"tls_skip_verify\": false}]' where key='smtp';" &> /dev/null
|
||||
docker exec postgresql psql -U listmonk -c "update settings set value='[{\"host\": \"mail.$DOMAIN_NEW\", \"port\": 587, \"enabled\": true, \"password\": \"$ADMINPASS\", \"tls_type\": \"STARTTLS\", \"username\": \"$SMTPUSER\", \"max_conns\": 10, \"idle_timeout\": \"15s\", \"wait_timeout\": \"5s\", \"auth_protocol\": \"login\", \"email_headers\": [], \"hello_hostname\": \"\", \"max_msg_retries\": 2, \"tls_skip_verify\": false}, {\"host\": \"smtp.gmail.com\", \"port\": 465, \"enabled\": false, \"password\": \"password\", \"tls_type\": \"TLS\", \"username\": \"username@gmail.com\", \"max_conns\": 10, \"idle_timeout\": \"15s\", \"wait_timeout\": \"5s\", \"auth_protocol\": \"login\", \"email_headers\": [], \"hello_hostname\": \"\", \"max_msg_retries\": 2, \"tls_skip_verify\": false}]' where key='smtp';" &> /dev/null
|
||||
|
||||
echo -ne "done."
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user