Usage of public mailing service like gMail, Yahoo, etc. from government infrastructure is prohibited especially when organization provide own email service. There are large number of know mailing service and there could be unlimited unknown mail services. It is easy for anyone to setup his own mail server and start mail service easily using various tools. Google apps is one of such tool.
SMTP ports could be easily blocked using a firewall but accessing mail service through webmail (HTTP/HTTPS) is still is a challenge. There might be unlimited mailing service hence blocking based on domain name is also not possible.
Work out a solution which can detect such an attempt to connect such web mail server using HTTP/HTTPS and block it.
Notes: Simulate a small network or a machine connected to Internet. Demonstrate that it blocks the access of gmail, yahoo mail, etc without blocking the domain or IP.
Sample Data Required: No