Yeah, probably easier to set this setting. However as I understand the backup will overwrite all settings, so there is a chance that some email will be sent between restore completion and disabling mails, unless the source instance had it disabled too during backup.
btw I figured out that it probably would be better to just use a separate server and domain instead of local docker dev setup.
As I understand the backup restore does not affect app.yml, so if I do not enter SMTP config in app.yml on the test server, it will have no chance to send any emails?