Solved

Resolving IP address from Domain address

Posted on 2001-06-21
4
300 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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 a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

832 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