An alternative view - I used M5 very happily. These bolts clamp the rail to the frame, they are not dowel bolts for location. The +-0.5mm wiggle room for adjustment is no bad thing (allows for slight drilling/tapping errors) and does not reduce clamping force (or at least not enough to matter).

So, there's two conflicting views from two different builders! Lot of help we are...