Sam,

I've tried to extend bofh options approach used for incorrectly formatted
8-bit messages to esmtpclient handling of improper destination DNS MX
records (IP address instead of hostname). I've added line

opt BOFHBADDNS=accept

to the sysconfdir/bofh file and applied following patch to esmtpclient.c.
However it doesn't work and it seems that getenv("BOFHBADDNS") returns null
string. If I replace this call by "accept" constant everything is OK. What's
wrong here?

Alexei.

--- ./courier/courier/module.esmtp/esmtpclient.c.orig   Thu Feb 21 05:24:21
2002
+++ ./courier/courier/module.esmtp/esmtpclient.c        Sun Mar  3 11:13:39
2002
@@ -286,6 +286,7 @@

 static void sendesmtp(struct moduledel *del, struct ctlfile *ctf)
 {
+const char *bofhbaddns=getenv("BOFHBADDNS");
 char *smtproute;

        if (!host)
@@ -357,6 +358,7 @@
                        hard_error(del, ctf, "No such domain.");
                        return;
                case RFC1035_MX_BADDNS:
+                       if (bofhbaddns && strcmp(bofhbaddns, "accept") == 0)
break;
                        if (smtproute)  free(smtproute);
                        hard_error(del, ctf,
                                "This domain's DNS violates RFC 1035.");
@@ -391,6 +393,7 @@
                        rfc1035_ntoa(&addr, buf);
                        if (strcmp(buf, p->hostname) == 0)
                        {
+                               if (bofhbaddns && strcmp(bofhbaddns,
"accept") == 0)  continue;
                                hard_error(del, ctf,
                                        "This domain's DNS violates RFC
1035.");
                                rfc1035_mxlist_free(mxlist);


_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to