Solved

Resolving IP address from Domain address

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

919 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

13 Experts available now in Live!

Get 1:1 Help Now