Skip to content

Document how to migrate the server#417

Closed
link2xt wants to merge 1 commit intomainfrom
link2xt/document-networking
Closed

Document how to migrate the server#417
link2xt wants to merge 1 commit intomainfrom
link2xt/document-networking

Conversation

@link2xt
Copy link
Copy Markdown
Contributor

@link2xt link2xt commented Oct 10, 2024

No description provided.

@hpk42
Copy link
Copy Markdown
Contributor

hpk42 commented Oct 10, 2024

This looks good but what about installing the "firewall" scripts with cmdeploy-run? Something like /use/local/bin/chatmail-* commands? Would be nicer and we can also adapt.it if needed.

Comment thread README.md
type filter hook output priority filter;
}
}
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about we add a cmdeploy run --disable-mx switch that makes sure the server is setup but not reachable/accepting SMTP/IMAP? (not sure if simply not running postfix/dovecot might be enough?)

Copy link
Copy Markdown
Contributor

@missytake missytake Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @hpk42's idea of stopping the services instead of adjusting the firewall. Not everyone knows how to adjust nftables. Admins will find an existing configuration at /etc/nftables.conf, modified by the ISP, their past self, or a team member. Adjusting nftables will much more easily lead to misconfiguration than simply stopping postfix + dovecot directly after initial setup in a cmdeploy run --disable-mx command.

If we leave out step 1 in favor of cmdeploy run --disable-mx, we could also swap (current) step 2 & 3 to keep the "registration doesn't work" timespan shorter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we leave out step 1 in favor of cmdeploy run --disable-mx, we could also swap (current) step 2 & 3 to keep the "registration doesn't work" timespan shorter.

no we can't, as step 2 is required for step 3's acmetool setup to work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, if we simply copy /var/lib/acme in the beginning it should work.

Comment thread README.md
Comment thread README.md
but new users will fail to create new profiles
with your chatmail server.

3. Setup the new server with `cmdeploy`.
Copy link
Copy Markdown
Contributor

@hpk42 hpk42 Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Setup the new server with `cmdeploy`.
3. On new server: setup with "cmdeploy run"

Comment thread README.md
Comment thread README.md
Comment thread README.md Outdated
}
```
Execute `nft -f /etc/nftables.conf` as root to apply the changes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd add a

step 7. Switch off old server and maybe advise for "cmdeploy test" to run successfully first, and wait to hear from users if they are any issues.

Copy link
Copy Markdown
Contributor

@hpk42 hpk42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this all looks good -- would be fine to merge preferably after addressing/accepting some of my suggested changes.

Comment thread README.md Outdated
Comment thread README.md Outdated
@link2xt link2xt force-pushed the link2xt/document-networking branch from 9205b34 to d96c922 Compare October 14, 2024 06:41
@link2xt link2xt mentioned this pull request Oct 14, 2024
@link2xt link2xt changed the title Document how to migrate the server or setup a reverse proxy Document how to migrate the server Oct 14, 2024
Copy link
Copy Markdown
Contributor

@missytake missytake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments to argue why I'd recommend stopping/starting services over firewall adjustments... but not a merge blocker.

Comment thread README.md
type filter hook output priority filter;
}
}
```
Copy link
Copy Markdown
Contributor

@missytake missytake Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @hpk42's idea of stopping the services instead of adjusting the firewall. Not everyone knows how to adjust nftables. Admins will find an existing configuration at /etc/nftables.conf, modified by the ISP, their past self, or a team member. Adjusting nftables will much more easily lead to misconfiguration than simply stopping postfix + dovecot directly after initial setup in a cmdeploy run --disable-mx command.

If we leave out step 1 in favor of cmdeploy run --disable-mx, we could also swap (current) step 2 & 3 to keep the "registration doesn't work" timespan shorter.

Comment thread README.md
but normally email servers will retry delivering messages
for at least a week, so messages will not be lost.

4. Firewall all ports except `ssh` (22) on the old server.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I think just stopping dovecot + postfix is easier for admins than adjusting nftables and achieves the same result. And the know-how is more wide-spread among self-taught admins than adjusting firewalls.

Comment thread README.md
Comment on lines +270 to +271
6. Unblock ports used by Delta Chat and SMTP message exchange.
For that you can modify `/etc/nftables.conf` as follows:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again here, simply starting the services is much easier. Recommending firewall settings assumes a lot about the environment the chatmail server is running in; it might run on the same OS as other services which require custom configuration, it might be co-managed by other people, ...

@missytake
Copy link
Copy Markdown
Contributor

While working on a cmdeploy --disable-mail command, and test-migrating c2, I found out that acmetool is pretty flaky, and we should also simply copy /var/lib/acme before cmdeploy run. Saves a lot of trouble.

missytake added a commit that referenced this pull request Oct 16, 2024
This guide doesn't require knowing about firewalls,
but utilizes the `cmdeploy run --disable-mail` command from #428.

supercedes #417
missytake added a commit that referenced this pull request Oct 16, 2024
This guide doesn't require knowing about firewalls,
but utilizes the `cmdeploy run --disable-mail` command from #428.

supercedes #417
missytake added a commit that referenced this pull request Oct 16, 2024
This guide doesn't require knowing about firewalls,
but utilizes the `cmdeploy run --disable-mail` command from #428.

supercedes #417
missytake added a commit that referenced this pull request Oct 28, 2024
This guide doesn't require knowing about firewalls,
but utilizes the `cmdeploy run --disable-mail` command from #428.

supercedes #417
missytake added a commit that referenced this pull request Oct 29, 2024
This guide doesn't require knowing about firewalls,
but utilizes the `cmdeploy run --disable-mail` command from #428.

supercedes #417
@missytake
Copy link
Copy Markdown
Contributor

superceded by #429 :)

@missytake missytake closed this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants