Foul poles are outside the playing field.
Any batted ball hitting a foul pole above the fence line is a home run.
Bat racks are within the dugout.
Any thrown ball hitting dugout railing or foundation and rebounding on field is in play.
Any ball going into dugout or hitting other parts of dugout is out of play.