I have a gate mounted to a 6x8 post where the center has rotted out of the post. I am looking to fill the center of the post, rather then replace it if I could. The post itself is still solid, just hollow so the mount bolt have nothing to connect to anymore. I am thinking to try the expanding post foam inside the post, but have not worked with it and I have no reference if it would be stong enough to hold a bolt.
Most of the expanding foams are not waterproof or water resistant. You have to paint or caulk over them to prevent them from absorbing the water