Lsof

To view the port associated with a daemon:

# lsof -i -n -P | grep sendmail

UI on top lsof for MacOS: Sloth