mirror of
https://github.com/simple-login/app.git
synced 2024-10-01 06:01:29 +02:00
Update /etc/postfix/pgsql-relay-domains.cf and /etc/postfix/pgsql-transport-maps.cf in upgrade
This commit is contained in:
parent
8e3febdd7f
commit
563e1ed780
@ -4,17 +4,17 @@ No emails or any data is lost in the upgrade process. The same process is by the
|
|||||||
|
|
||||||
Sometimes upgrading to a major version might require running a manual migration. This is for example the case when upgrading to 2.0.0. In this case please follow the corresponding migration first before running these scripts.
|
Sometimes upgrading to a major version might require running a manual migration. This is for example the case when upgrading to 2.0.0. In this case please follow the corresponding migration first before running these scripts.
|
||||||
|
|
||||||
If you are running versions prior to 3x, please:
|
If you are running versions prior to 4.x.x, please:
|
||||||
|
|
||||||
1. first upgrade to 2.1.2 then
|
1. first upgrade to 2.1.2 then
|
||||||
2. upgrade to the latest version which is 4.6.2-beta
|
2. upgrade to the latest version which is 4.6.2-beta
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>After upgrade to 3x from 2x</summary>
|
<summary>After upgrade to 4.x.x from 2.x.x</summary>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
3x has some data structure changes that cannot be automatically upgraded from 2x.
|
4.x.x has some data structure changes that cannot be automatically upgraded from 2.x.x.
|
||||||
Once you have upgraded your installation to 3x, please run the following scripts to make your data fully compatible with 3x
|
Once you have upgraded your installation to 4.x.x, please run the following scripts to make your data fully compatible with 4.x.x
|
||||||
|
|
||||||
First connect to your SimpleLogin container shell:
|
First connect to your SimpleLogin container shell:
|
||||||
|
|
||||||
@ -42,6 +42,36 @@ for email_log in EmailLog.query.all():
|
|||||||
db.session.commit()
|
db.session.commit()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Please also update `/etc/postfix/pgsql-relay-domains.cf` to the following. Make sure to replace `mydomain.com` by your actual domain.
|
||||||
|
|
||||||
|
```
|
||||||
|
# postgres config
|
||||||
|
hosts = localhost
|
||||||
|
user = myuser
|
||||||
|
password = mypassword
|
||||||
|
dbname = simplelogin
|
||||||
|
|
||||||
|
query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true
|
||||||
|
UNION SELECT domain FROM public_domain WHERE domain='%s'
|
||||||
|
UNION SELECT '%s' WHERE '%s' = 'mydomain.com' LIMIT 1;
|
||||||
|
```
|
||||||
|
|
||||||
|
and `/etc/postfix/pgsql-transport-maps.cf` to
|
||||||
|
|
||||||
|
```
|
||||||
|
# postgres config
|
||||||
|
hosts = localhost
|
||||||
|
user = myuser
|
||||||
|
password = mypassword
|
||||||
|
dbname = simplelogin
|
||||||
|
|
||||||
|
# forward to smtp:127.0.0.1:20381 for custom domain AND email domain
|
||||||
|
query = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND verified=true
|
||||||
|
UNION SELECT 'smtp:127.0.0.1:20381' FROM public_domain WHERE domain = '%s'
|
||||||
|
UNION SELECT 'smtp:127.0.0.1:20381' WHERE '%s' = 'mydomain.com' LIMIT 1;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user