Understanding EMail Ports

When I first configured my EMail server I used a guide by Linode to get it working, and it asked me to allow a bunch of ports just to get my mailserver working. I just follwed the guide line-by-line not knowing what all of these things did. Its common knowledge that the SMTP protocol uses port 25, and I need to open ports for POP3 and IMAP, but most guides ask you to unblock 7 different ports! I…