Hi Marius,
There are multiple configs where you need to set up database connection, and it has to be done manually. Moreover, all configs will be overwritten during updates so I would not recommend changing them. The easiest way for a package installation is to just have a local database instance that is installed by the script.
As for mail, if you already have a mail server of your own, you don’t need to install our mail server. Just connect your mailboxes to the Mail module of the portal.