He's Got Gunk In His Eyes!
While it's not pretty, yellow goop in the corner of his eyes doesn't necessarily mean they're infected. The chances of that are very low, since all newborns are given antibiotic eyedrops right after birth.
A much more likely culprit is a blocked tear duct, which is painless. If his eyes always look wet, that's another symptom of blockage. It can happen in one or both eyes and generally clears up on its own within a few weeks or months. To loosen the ducts, massage the bridge of his nose.
Call the pediatrician if: his eyes appear red, swollen, or filled with pus.