The Edge Transport server role runs in the perimeter network and provides message hygiene and security over untrusted networks. It handles email routing to and from the internal Exchange organization and the internet. The Hub Transport server role handles all email flow inside the organization, applies transport rules, and delivers messages to recipients' mailboxes. Both roles rely on the Active Directory site topology to determine the optimal routing paths for messages.