Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mail Exchange lookups
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
chatgris
Guru
Guru


Joined: 14 Oct 2002
Posts: 383
Location: Canada

PostPosted: Fri Apr 04, 2003 3:39 pm    Post subject: Mail Exchange lookups Reply with quote

Normally, when I send mail to myself I can just use

telnet chatgris.com 25

and all is well.. however, this doesn't appear to work for larger domains like hotmail. After some googling, I realised that I needed to connect to the mx records..

My question is, how can I figure out a domains' mx record ( or the ip or hostname that I need to connect to to send mail ) from it's hostname programatically in C?

e.g.

username@hotmail.com

(I strip out homtial.com)

*I connect to like mxlookup("hotmail.com")*

Thanks, Josh.
_________________
Open your mind. Open your source.

Due credit for avatar from http://www.aikida.net
Back to top
View user's profile Send private message
esammer
Retired Dev
Retired Dev


Joined: 05 Apr 2003
Posts: 155
Location: NY, US

PostPosted: Sat Apr 05, 2003 2:29 am    Post subject: Reply with quote

try:

Code:

host -t MX <domain>


host is part of the bind-tools package if you don't have it installed.
hope that helps.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum