What is the meaning of Porter's_lodge?

A building for the porter(s) near the gate of a castle, college, etc., formerly used as a place of punishment for the staff.

An equivalent room near the gate of a college, chiefly used as a mailroom.

Source: wiktionary.org