A firewall is a system that implements a particular security policy that allows only safe packets to pass. Normally, the Unix host is given two network interfaces. Unix utilities are frequently used to be more secure, and to provide more logging.
Users have to manually traverse the firewall for interactive services.
A Cisco router can be configured to discard certain packet types by using extended access lists. On the Cisco router, you would permit connections to the SMTP port, but deny all other TCP connections or IP packets.