wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes Port Forwarding on SMTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Port Forwarding on SMTP" Watch "Port Forwarding on SMTP" New topic

Port Forwarding on SMTP

Ponnusamy Gov

Joined: Feb 01, 2011
Posts: 17
I have one separate Email server in which I have to configure IP and PORT from my application server to send the mails. I am having 10 Java /J2EE application servers in which only one server is having mail server communication. Sending mails from that only one server is obviously no issue. But if my java application send mails from remaining servers, what is the methodology, any PORT forwarding or Load balancing concept is available? Experts please provide me the answer.


Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41132
What is special about the one app server that it can do communicate with the mail server, but the others can't? Why couldn't all app servers contact the mail server? It seems a complication to come up with an app-server-to-app-server mail protocol, not to mention the impact on scalability and failover.

Ping & DNS - my free Android networking tools app
Ponnusamy Gov

Joined: Feb 01, 2011
Posts: 17

There is nothing special about one particular server, due to organizational security policy all the app servers shouldn't be opened to Email server communication, means 25 port will not be enabled except one server. So that I have asked this question.

Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

So port 25 will be enabled on the single SMTP server so that the other servers can connect to it? That sounds reasonable enough to me. I don't understand why port 25 needs to be enabled on the other servers, since they wouldn't be acting as SMTP servers. They would be connecting to the single SMTP server to send e-mail, wouldn't they? Or have I misunderstood your description of the network architecture of your system?
Ponnusamy Gov

Joined: Feb 01, 2011
Posts: 17
For example, If A,B and C are my applications servers and all the applications running on these servers need to send mail so that it will connect to mail server using SMTP host and port. This is common method. But my requirement is all A,B and C servers will connect to server D and D only will have connectivity to mail server. In this situation, normally TCP/IP communication will be happening via Port forwarding. But here what could be the method? Thanks in advance...........

Ponnusamy G
I agree. Here's the link: http://aspose.com/file-tools
subject: Port Forwarding on SMTP
Similar Threads
Read mails from a Mailbox on MS Exchange server without POP3 and IMAP
Email from jBoss
Creating a simple mail application
Java Mail Using Lotus Notes Componets
What are the steps to create A Mail Application