On Thu, 3 Sep 2009, Bill Healy wrote:
> Hi,
>
> I'm having problems receiving mail a particular server. It's being
> logged as an ERDNS issue, but when I lookup the IP using the same DNS
> server xMail uses I get an answer, although not a configuration I've
> seen before, but maybe it's legal, I don't know all the RFCs. So I don't
> know if the problem is the way they have setup their RDNS or something
> else.
>
> As I understand from what I can find in the docs smtp-rdnscheck just
> looks for the IP address having a record. Or is it looking for a PTR
> record on the first lookup with out recursion? Or is there something
> else it's doing?
>
> This is xMail 1.25 on Windows. Can anyone make sense of why the ERDNS is
> coming up?
XMail does simply a SysGetHostByAddr() when doing an RDNS check, and this
translates to a call to getnameinfo(), on both Windows and Unix.
It works fine on Linux (using the test program below), and it should even
on Windows:
$ gcc -o nettest nettest.c
$ ./nettest 207.162.214.242
name = 'mx.soldoutdisciples.com'
- Davide
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
int main(int ac, char **av)
{
int error;
struct sockaddr_in addr;
char name[256];
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
if (inet_aton(av[1], (struct in_addr *) &addr.sin_addr) == 0) {
perror(av[1]);
return 1;
}
if ((error = getnameinfo((struct sockaddr *) &addr, sizeof(addr),
name, sizeof(name), NULL, 0, NI_NAMEREQD)) !=
0) {
fprintf(stderr, "%s: %s\n", av[1], gai_strerror(error));
return 1;
}
printf("name = '%s'\n", name);
return 0;
}
_______________________________________________
xmail mailing list
[email protected]
http://xmailserver.org/mailman/listinfo/xmail