Hello,
If your naetwork is managed by DHCP, then DHCP server can able to provide you the SMTP server address.
Other wise there is no way to get SMTP server address,
but you can able to find the mail exchanger get way.
To find the mail gateway:
vel# dig -t MX gmail.com
; <<>> DiG 9.4.2 <<>> -t MX gmail.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17084
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 4
;; QUESTION SECTION:
;gmail.com. IN MX
;; ANSWER SECTION:
gmail.com. 504 IN MX 40 alt4.gmail-smtp-in.l.google.com.
gmail.com. 504 IN MX 5 gmail-smtp-in.l.google.com.
gmail.com. 504 IN MX 10 alt1.gmail-smtp-in.l.google.com.
gmail.com. 504 IN MX 20 alt2.gmail-smtp-in.l.google.com.
gmail.com. 504 IN MX 30 alt3.gmail-smtp-in.l.google.com.
;; ADDITIONAL SECTION:
alt4.gmail-smtp-in.l.google.com. 152 IN A 209.85.135.114
alt1.gmail-smtp-in.l.google.com. 53 IN A 209.85.143.114
alt1.gmail-smtp-in.l.google.com. 53 IN A 209.85.143.27
alt3.gmail-smtp-in.l.google.com. 5 IN A 216.239.59.27
;; Query time: 268 msec
;; SERVER: xxx.xxx.xx.com
;; WHEN: Fri Feb 13 09:29:55 2009
;; MSG SIZE rcvd: 214
vel#
C:\Users\manickam>nslookup
Default Server: xxx.xxx.xx.com
Address: y.y.y.y
> set type=MX
> gmail.com
Server: xxx.xxx.xx.com
Address: y.y.y.y
Non-authoritative answer:
gmail.com MX preference = 10, mail exchanger = alt1.gmail-smtp-in.l..com
gmail.com MX preference = 20, mail exchanger = alt2.gmail-smtp-in.l..com
gmail.com MX preference = 30, mail exchanger = alt3.gmail-smtp-in.l..com
gmail.com MX preference = 40, mail exchanger = alt4.gmail-smtp-in.l..com
gmail.com MX preference = 5, mail exchanger = gmail-smtp-in.l.google
gmail.com nameserver = ns1.google.com
gmail.com nameserver = ns2.google.com
gmail.com nameserver = ns4.google.com
gmail.com nameserver = ns3.google.com
alt2.gmail-smtp-in.l.google.com internet address = 72.14.247.27
alt3.gmail-smtp-in.l.google.com internet address = 216.239.59.27
alt4.gmail-smtp-in.l.google.com internet address = 209.85.135.114
alt4.gmail-smtp-in.l.google.com internet address = 209.85.135.27
gmail-smtp-in.l.google.com internet address = 209.85.217.5
alt1.gmail-smtp-in.l.google.com internet address = 209.85.143.114
alt1.gmail-smtp-in.l.google.com internet address = 209.85.143.27
ns2.google.com internet address = 216.239.34.10
ns4.google.com internet address = 216.239.38.10
ns3.google.com internet address = 216.239.36.10
ns1.google.com internet address = 216.239.32.10
>
Regards,
Arul