I tried to move the mail service to a slave machine, but it wanted to use the local db. As I looked into the code I got a little confused, and searched for some documentation how the multiserver setup should work, but I didn't find one. Is there any doc covering what db (master or local) used for what in the multiserver setup?
Imho you should (nearly) always use db (not dbmaster). The dbmaster queries the master server which could lead to mess up if used in the wrong place.
If I setup for a domain, that the mail server is the slave, ISPConfig puts the data to the slave's db? I can't test it now, because I just upgraded to 3.0.1.3 and I am using Gentoo, so I need to rewrite some parts of the installer
That's what the replication system of ispconfig does. You can choose on which server a domain shall be created and ispconfig does the rest.