Solved

Resolving IP address from Domain address

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

Title # Comments Views Activity
Shell script awk command 2 111
install command in linux 1 54
automating commands in linux on start up 2 47
Compiling syslinux 6.0.3 from source on Centos 7 3 264
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 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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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