Mail servers are used to send and receive email messages. They operate based on the TCP/IP protocol and can be either a part of an internet service provider's infrastructure or a separate entity. The function of a mail server is to provide an interface for users to send and receive email messages. In order to do so, it needs storage space for account information, accounts for each user, access control lists, routing policies that define how messages should be sent or delivered to their intended destination, etc.