Setting a post for a fence or mailbox can be hard work, so you'll want the post to last as long as possible. An unprotected fence post could start to rot in as little as three years. With proper preparation, your posts will be standing straight and tall 10 or 20 years after you set them in the ground.
All wooden fence posts will rot eventually. Cells within wood are hygroscopic, or designed to draw moisture into the wood. Wet wood allows the growth of fungus, which will devour the cells of the wood. Some types of wood resist moisture better than others.
The most durable natural material available for fencing is treated lumber. Pine beams are pressure-treated with copper and quaternary ammonium to inhibit microorganism growth. Cedar and redwood beams are naturally pest-resistant and are also good choices for fencing.
You can extend a post's life even further by treating it with wood preservative. Soak the post in a bucket of copper-based preservative, following the manufacturer's directions. Make sure the preservative extends above the level of the soil. For extremely wet conditions, apply a coat of plastic or asphalt-based foundation sealant over the preservative.
Use a post hole digger or powered auger to dig a hole at least six inches below the frost line for your area or at least 3 1/2 feet deep. If your soil has a high clay content, water can collect at the base of the post. In this case, fill the bottom of the hole with six inches of pea-gravel or sand. Set the post in the hole and level it in both directions, using a standard bubble level. If you need to set many posts, invest in a fence post level. They're inexpensive and let you level in both directions quickly.
A few inches at a time, alternate layers of gravel and soil to the hole and tamp the dirt in securely with a two-by-four. Check to make sure your post remains level as you fill. When you reach ground level, build a mound of soil 2 to 3 inches high around the post and pack it in with your foot. This mound will force water away from your post, extending its life.
Although most posts rot from the bottom, it's important to keep water from seeping into the grain at the top of the post, too. For a mailbox or other highly visible post, use an ornamental cap to protect the top. For less visible uses, a coat of foundation sealant or a scrap piece of metal will keep rainwater out.