There are a few ways to get a dog to stop barking at the mailman. The most effective way is to desensitize the dog by gradually introducing them to the mailman. Start by having the mailman stand outside the house and slowly move closer over time while giving the dog treats. This will help the dog associate the mailman with positive reinforcement. You can also try redirecting the dogs attention by giving them a toy or treat when they start barking. Finally, you can use a citronella or ultrasonic bark collar to help train the dog to stop barking.