Solved

Resolving IP address from Domain address

Posted on 2001-06-21
4
298 Views
Last Modified: 2010-04-21
I want to resolve IP address from the domain address when a user trying to login into a remote Mail server using my IMAP based mailclient.
MY IMAP based mail client will get the login ID of the user in the format username@mailserver.com. From this i have to seperate the domain address and i have to resolve that domain name into an IP address. how can i achieve this in my C-CGI programe which runs under LINUX.
0
Comment
Question by:sunsrigod
4 Comments
 
LVL 3

Expert Comment

by:superschlonz
ID: 6216679
have a look at gethostbyname.
0
 
LVL 5

Accepted Solution

by:
bryanh earned 5 total points
ID: 6221611
But be aware that mailserver.com doesn't necessarily have an IP address.  Without knowing the specifics of the interface to your mail client, I don't know exactly what "username@mailserver.com" means, but it's probably just an email address, which means it's likely that "mailserver.com" is a mail exchange (MX) domain, which means it is not associated with an IP address.  And if it _is_ a host name (which means it _is_ associated with an IP address), it isn't necessarily the host that sent the email in question.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9868867
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: bryanh {http:#6221611}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now