When using trot poles or cavaletti, there are many different distances you can use. I always have riders post the trot so that the rider is off the back while the horse is trying to negotiate the rail. For a horse that tends to rush the cavaletti, I use an exercise where the rails are far enough apart so that the rider can ask the horse to walk the first rail and then pick up a trot (sitting or posting) and then come back to the walk for the second rail. Once the horse does this well, then I would have the rider try trotting the poles in a line at the posting trot.
Another approach is to circle or figure eight the first rail until the horse is accepting and relaxed before you move on to the same pattern at the second rail. Once good timing and balance is achieved, try the two rails in a line at the posting trot. I only have riders sit on the horse’s back in a light full seat at the walk when using rails or cavaletti.
If your horse really rushes the rails, you could try and approach the line, as the horse starts to get anxious halt and then walk the rail. Next time halt a bit closer before allowing the horse to walk the rail. To test your progress, try trotting the exercise at the posting trot.