It's legal to park in front of someone else's mailbox as long as parking in that area is legal.
However even though it's not illegal to park in front of someone's mailbox you really shouldn't do it anyway because it's rude and prevents the mail carrier from properly delivering mail to the mailbox.
Try parking your vehicle away from the mailbox as much as you can just out of respect and being nice because you could make a homeowner mad.
Plus it prevents the mailbox owner from getting to their mail properly too so while it's not illegal to park in front of someone's mailbox just avoid doing it.