Discussion:
[courier-users] DNS lookup failed. ? cannot send email
Roberto de Iriarte
2001-04-16 03:55:42 UTC
Permalink
I have a strange problem ... cannot send email via a new 0.33
installation on FreeBSD 4.2

Apr 15 23:50:53 dionisios courieresmtp:
id=000158A2.3ADA6B82.000006C1,from=<***@ichn.cl>,addr=<***@yahoo.com>:
DNS lookup failed.

i am sure my DNS server is OK

any clues?.
BTW sending to local accounts works ok.

Regards, Roberto
Sam Varshavchik
2001-04-16 04:40:43 UTC
Permalink
Post by Roberto de Iriarte
I have a strange problem ... cannot send email via a new 0.33
installation on FreeBSD 4.2
DNS lookup failed.
i am sure my DNS server is OK
any clues?.
BTW sending to local accounts works ok.
Check your /etc/resolv.conf. If you're running DNS on the same machine, you
must explicitly enter 127.0.0.1 into resolv.conf.
--
Sam
Roberto de Iriarte
2001-04-17 03:30:16 UTC
Permalink
Post by Sam Varshavchik
Post by Roberto de Iriarte
I have a strange problem ... cannot send email via a new 0.33
installation on FreeBSD 4.2
DNS lookup failed.
i am sure my DNS server is OK
any clues?.
BTW sending to local accounts works ok.
Check your /etc/resolv.conf. If you're running DNS on the same machine, you
must explicitly enter 127.0.0.1 into resolv.conf.
Checked, it's OK. btw sendmail is able to send... does anyone have experienced this
kind of problem
on FreeBSD plataform before. I have courier 0.29 running on Linux and Digital Unix,
both with a
very similar config, i.e mysql auth , ESMTP authentication, without problems.

Thanks for any input.

Regards,
Roberto de Iriarte.
Sam Varshavchik
2001-04-17 04:39:37 UTC
Permalink
Post by Roberto de Iriarte
Post by Sam Varshavchik
Post by Roberto de Iriarte
I have a strange problem ... cannot send email via a new 0.33
installation on FreeBSD 4.2
DNS lookup failed.
i am sure my DNS server is OK
any clues?.
BTW sending to local accounts works ok.
Check your /etc/resolv.conf. If you're running DNS on the same machine, you
must explicitly enter 127.0.0.1 into resolv.conf.
Checked, it's OK. btw sendmail is able to send... does anyone have experienced this
kind of problem
on FreeBSD plataform before. I have courier 0.29 running on Linux and Digital Unix,
both with a
very similar config, i.e mysql auth , ESMTP authentication, without problems.
You can run the testmxlookup utility to test simple DNS resolution:

$ testmxlookup yahoo.com
--
Sam
Roland Schneider
2001-04-17 10:55:04 UTC
Permalink
--On Montag, 16. April 2001 23:30 -0400 Roberto de Iriarte
<***@smart.cl> wrote:
[...]
Post by Roberto de Iriarte
Checked, it's OK. btw sendmail is able to send... does anyone have
experienced this kind of problem
on FreeBSD plataform before. I have courier 0.29 running on Linux and
Digital Unix, both with a
very similar config, i.e mysql auth , ESMTP authentication, without
problems.
On one of my boxes about ~0.5% of the jobs were rejected with
'no such domain'. Upgrade from 0.32 to 0.33 did not help, but
could be recommended anyway if you are still running at 0.29.

I also tried to Upgrade the Nameservers to Bind 9.x, but that
piece of software did not any better...

Replacing Bind with DJB's dnscache (and 2 instances of tinydns
in my case) finally solved the problem. Lookups are now faster
and safer, authoritative and non-authoritative data is clearly
separated, zone-reload wont stop answering and everything runs
just fine. I start the djb-daemons without supervise and dnslog.

This runs at 3 FreeBSD-boxes for a few weeks now, the 3 daemons
on each box use less ressources than a single bind-instance.

Roland
Roberto de Iriarte
2001-04-19 17:20:38 UTC
Permalink
I will try that. For now, i downgraded to 0.29-1 and it worked almost
inmediately.
I think the problem might be that in Chile, there are ussualy no reverse
zones
configured form many servers. Will try the opposite way of upgrading my
experimental installation on Linux that has worked flawlessly for more
that 3
months, it might be FreeBSD specific.

I will report later on this.

Thanks to all
Roberto de Iriate
Patrick Price
2001-04-17 17:52:30 UTC
Permalink
Sam,

Is maildirquota supported by mysql authentication databases or just userdb
and ldap?

Thanks,
Patrick
Sam Varshavchik
2001-04-17 21:37:57 UTC
Permalink
Post by Patrick Price
Sam,
Is maildirquota supported by mysql authentication databases or just userdb
and ldap?
Only userdb and ldap. There's no technical reason why it can't, except that
it hasn't been done yet.
--
Sam
Richard
2001-05-10 20:28:24 UTC
Permalink
Roberto,
I had the same problem and had to rerun configure with the --without-ipv6
to fix it.

Richard
Post by Roberto de Iriarte
I have a strange problem ... cannot send email via a new 0.33
installation on FreeBSD 4.2
DNS lookup failed.
i am sure my DNS server is OK
any clues?.
BTW sending to local accounts works ok.
Regards, Roberto
_______________________________________________
courier-users mailing list
http://lists.sourceforge.net/lists/listinfo/courier-users
HIROSHI OOTA
2001-06-14 06:55:45 UTC
Permalink
At Thu, 10 May 2001 15:28:24 -0500 (CDT),
Richard <***@www.allrichard.com> wrote:
;; I had the same problem and had to rerun configure with the --without-ipv6
;; to fix it.
FreeBSD's V6 UDP socket doesn't accept v4 packet without explicit binding to
INADDR_ANY.

this is fix.
--

HIROSHI OOTA
***@LSi.nec.co.jp


--- rfc1035/rfc1035mksocket.c- Mon May 29 06:51:49 2000
+++ rfc1035/rfc1035mksocket.c Thu Feb 1 18:32:20 2001
@@ -21,10 +21,20 @@
{
#if RFC1035_IPV6
int s;
-
+struct sockaddr_in6 sin6;
*af=AF_INET6;
- if ( (s=socket(PF_INET6, sock_type, sock_protocol)) >= 0)
- return (s);
+ if ( (s=socket(PF_INET6, sock_type, sock_protocol)) >= 0){
+ if(sock_type != SOCK_DGRAM)
+ return (s);
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_len = sizeof(sin6);
+ sin6.sin6_family = AF_INET6;
+ if(bind(s, &sin6, sizeof(sin6)) < 0){
+ close(s);
+ return -1;
+ }
+ return s;
+ }
#endif
*af=AF_INET;
return (socket(PF_INET, sock_type, sock_protocol));
Sam Varshavchik
2001-06-14 11:50:53 UTC
Permalink
Post by HIROSHI OOTA
At Thu, 10 May 2001 15:28:24 -0500 (CDT),
;; I had the same problem and had to rerun configure with the --without-ipv6
;; to fix it.
FreeBSD's V6 UDP socket doesn't accept v4 packet without explicit binding to
INADDR_ANY.
this is fix.
--
HIROSHI OOTA
--- rfc1035/rfc1035mksocket.c- Mon May 29 06:51:49 2000
+++ rfc1035/rfc1035mksocket.c Thu Feb 1 18:32:20 2001
@@ -21,10 +21,20 @@
{
#if RFC1035_IPV6
int s;
-
+struct sockaddr_in6 sin6;
*af=AF_INET6;
- if ( (s=socket(PF_INET6, sock_type, sock_protocol)) >= 0)
- return (s);
+ if ( (s=socket(PF_INET6, sock_type, sock_protocol)) >= 0){
+ if(sock_type != SOCK_DGRAM)
+ return (s);
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_len = sizeof(sin6);
+ sin6.sin6_family = AF_INET6;
+ if(bind(s, &sin6, sizeof(sin6)) < 0){
+ close(s);
+ return -1;
+ }
+ return s;
+ }
#endif
*af=AF_INET;
return (socket(PF_INET, sock_type, sock_protocol));
This is wrong. mksocket() should not be binding to anything. Whoever calls
mksocket() should bind the resulting socket.
--
Sam
HIROSHI OOTA
2001-06-16 03:12:56 UTC
Permalink
Hello,
Post by Sam Varshavchik
This is wrong. mksocket() should not be binding to anything. Whoever calls
mksocket() should bind the resulting socket.
Well, How is this?
--

HIROSHI OOTA
***@LSi.nec.co.jp


--- rfc1035resolve.c- Sat May 27 14:05:41 2000
+++ rfc1035resolve.c Fri Jun 15 18:32:05 2001
@@ -70,6 +70,17 @@
/* Prepare the UDP socket */

if ((udpfd=rfc1035_open_udp(&af)) < 0) return (0);
+#if defined(RFC1035_IPV6) && defined(__FreeBSD__)
+ else
+ {
+ struct sockaddr_in6 sin6;
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_len = sizeof(sin6);
+ sin6.sin6_family = AF_INET6;
+ if(bind(udpfd, &sin6, sizeof(sin6)) < 0)
+ return 0;
+ }
+#endif

/* Keep trying until we get an answer from a nameserver */
Sam Varshavchik
2001-06-16 03:42:50 UTC
Permalink
Post by HIROSHI OOTA
Hello,
Post by Sam Varshavchik
This is wrong. mksocket() should not be binding to anything. Whoever calls
mksocket() should bind the resulting socket.
Well, How is this?
--
HIROSHI OOTA
--- rfc1035resolve.c- Sat May 27 14:05:41 2000
+++ rfc1035resolve.c Fri Jun 15 18:32:05 2001
@@ -70,6 +70,17 @@
/* Prepare the UDP socket */
if ((udpfd=rfc1035_open_udp(&af)) < 0) return (0);
+#if defined(RFC1035_IPV6) && defined(__FreeBSD__)
+ else
+ {
+ struct sockaddr_in6 sin6;
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_len = sizeof(sin6);
+ sin6.sin6_family = AF_INET6;
+ if(bind(udpfd, &sin6, sizeof(sin6)) < 0)
+ return 0;
+ }
+#endif
Two things:

* Is this particular to FreeBSD only, or do all xBSDs need it?

* Given the issue with incoming sockets, does this allow datagrams to be
sent/received from both IPv6 and IPv4 IP addresses? In the BSD stack,
binding a TCP socket to an IPv6 wildcard address results in the socket being
able to accept IPv6 connections only.
--
Sam
HIROSHI OOTA
2001-06-22 06:02:02 UTC
Permalink
Hello,
At Fri, 15 Jun 2001 23:42:50 -0400,
Post by Sam Varshavchik
Post by HIROSHI OOTA
--- rfc1035resolve.c- Sat May 27 14:05:41 2000
+++ rfc1035resolve.c Fri Jun 15 18:32:05 2001
@@ -70,6 +70,17 @@
/* Prepare the UDP socket */
if ((udpfd=rfc1035_open_udp(&af)) < 0) return (0);
+#if defined(RFC1035_IPV6) && defined(__FreeBSD__)
+ else
+ {
+ struct sockaddr_in6 sin6;
+ bzero(&sin6, sizeof(sin6));
+ sin6.sin6_len = sizeof(sin6);
+ sin6.sin6_family = AF_INET6;
+ if(bind(udpfd, &sin6, sizeof(sin6)) < 0)
+ return 0;
+ }
+#endif
* Is this particular to FreeBSD only, or do all xBSDs need it?
I'm not sure. but FreeBSD, OpenBSD and NetBSD use same stack which
called KAME. (http://www.kame.net/)
Post by Sam Varshavchik
* Given the issue with incoming sockets, does this allow datagrams to be
sent/received from both IPv6 and IPv4 IP addresses? In the BSD stack,
binding a TCP socket to an IPv6 wildcard address results in the socket being
able to accept IPv6 connections only.
I made a test program. A result is as follows.
This result is strange. I'll contact to developers team of KAME.

bind to |
wildcard | no bind
send v6 yes | yes
send v4 yes | yes
recv v6 yes | yes
recv v4 yes | no
--

HIROSHI OOTA
***@LSi.nec.co.jp

Loading...