What are the “rules” for connecting different kinds mains electrical wires?
There are aluminum to copper wire nuts available, like Ideals 30-16.  Basically it is a wire nut filled with NOLOX.  It is made mostly for mobile homes that have aluminum wire and updating devices that might have failed or if you want to change the color, etc...  They are not cheap, about over a couple of dollars each.  You can but them on the internet or at mobile home repair shops.



Never use wire nuts that are rated copper only.  If you do you are looking at a failure in the connection for sure.

EDIT - For larger cable (I just saw mains in your question) you can used al/cu rated split bolts.  Use plenty of NOLOX then wrap in rubber tape and then a good electricians tape, not the cheap black tape.



Do not use the copper split bolts, they are rated copper only.  Make sure the connector shows al/cu ratings on it.