dcsimg
Automated way to find SMTP server
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Zeitlin
Posted On:   Tuesday, August 7, 2001 06:54 AM

I am calling a Java class using a UNIX shell script. The program will be run on different servers so I cant just use a specific SMTP server name.

Is there an automated way to find the name of the SMTP server either in the shell script or in the Java Mail API?

Re: Automated way to find SMTP server

Posted By:   Luigi_Viggiano  
Posted On:   Tuesday, August 7, 2001 12:21 PM

Take a statistic of names of smtp server, I've noted that always use similar names:

  • mail.host.com
  • smtp.host.com
  • pop.host.com
  • smtpmail.host.com
  • mail1.host.com, mail2.host.com etc...


So you can check for mail, smtp, etc... names in the local subnet. The alternative is to make a "scanner" looking around in the local subnet for smtp service running.

Re: Automated way to find SMTP server

Posted By:   John_Zukowski  
Posted On:   Tuesday, August 7, 2001 09:24 AM

In the general answer, no.


Try setting a system property, reading setting from a configuration file.


Consider looking up the MX record, but that is overkill.

About | Sitemap | Contact