You can allow specific programs through, you can't control what they can access. It's an all or none for an application. You may be able to build some complex rule chains, but that wouldn't be easy or you'd end up blocking other services. A cheap proxy firewall that sat between the router and modem would be the best solution. An easier solution may be to get a list of email services and add entries in your host file and redirect them to the loopback 127.0.0.1 address.