In the SAAS (Software as a Service) deployment model, using components to handle common client requests makes a lot of sense. Each common component can serve all client requests of a particular type. One such common component is mail relay: a single point for receiving all incoming mail for multiple clients. A mail relay relays the mail to different application instances based on domain address.
In their Java Boutique article, Setting Up Java-based Mail Relay in a SAAS Environment, T. Devi, Sivakumar Kuppusamy and Ramasubramanian Thiyagarajan explain how to set up a mail relay in a SAAS environment using Java and open source technologies. They write:
The underlying technology is SubEtha SMTP, an open source product under the Apache license that helps to handle SMTP requests. The open standards approach enables us to support failover in live systems.
When completed, the custom Java-based mail relay will have features such as failover and security through connections to various virus scanners and spam filters. It can be used mainly to handle mail requests and to reduce the cost of procuring mail servers.