Interesting behavior with router

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jawaid Bazyar
Dátum:  
Címzett: exim-users
Tárgy: Interesting behavior with router

I have the following configuration file (attached at the end). The
router "virtual" works great for the most part, but seems to cause
problems with other components. To wit:

---- BEGIN ----

>From bazyar@??? Mon Oct 28 12:26:15 1996

Return-path: <bazyar@???>
Delivery-date: Mon, 28 Oct 1996 12:26:15 -0700
Received: from [204.181.154.8] [204.181.154.8] 
        by hypermall.com with esmtp (Exim 0.54 #1)
        id E0vHxKB-0002QI-00; Mon, 28 Oct 1996 12:26:15 -0700
X-Sender: bazyar@???
Message-Id: <v03007804ae9aab1369b8@???>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Mon, 28 Oct 1996 12:25:31 -0600
To: bazyar@???
From: Mail Delivery System <Mailer-Daemon@???> (by way of Jawaid
 Bazyar)
Subject: Mail delivery failed: returning message to sender
Status: O
X-Status: 
This message was created automatically by mail delivery software.


A message that you sent could not be delivered to all of its recipients. The
following address(es) failed:

  Aaron@???:
    virtual router:
    couldnotlocate


---- END -----

agdstudio only fails sometimes (I'm guessing when exim has trouble
getting the MX record, but I'm not certain).

I also get this error any time I try to email to someone@123.456.789.000
(an IP literal address). Doing exim -v -bt bazyar@204.181.154.2 results in:

bazyar@204.181.154.2 is undeliverable:
virtual router: couldnotlocate

Now, my "virtual" router looks like this:

---- BEGIN ----
int main(int argc, char *argv[])
{
FILE *f;
char *x;
char msg[128];


    /*syslog(LOG_NDELAY,"findhost: %s",argv[2]);*/
    f = fopen(argv[1],"r");
    while ((x = fgets(line,1023,f)) != NULL) {
        int l = strlen(argv[2]);
        if (!strncasecmp(argv[2],line,l)) {
                /* fprintf(stderr,"%s\n",line); */
                printf("%s",line+l+1);
                fflush(stdout);
                exit(0);
        }
    }
    fclose(f);
    printf("FAIL could not locate domain in list of domains\n");
    exit(0);
}
---- END ----


Essentially, it just looks through a text file for the domain name
indicated, and if present in the file, returns "OK" and the name of a
transport. If it's not present, it returns the error "FAIL could not
locate" (which is where I presume the "couldnotlocate" is coming from in
the exim-generated error email).

Now, it appears that sometimes not all the routers are being given a
chance at the address, and that the search is ending with "virtual".
Should I be returning something besides "FAIL"?

Thanks in advance, Regards,

Jawaid



---- BEGIN configure ----
all standard up to :

######################################################################
#                      TRANPORTS CONFIGURATION                       #
######################################################################


...

to_visionland: driver=pipe;
        from_hack=yes, return_path=yes,
        command="/usr/local/bin/mailforward2 /home/vlandscp/mail.conf ${h_to}",
        user = "nobody",
        group = "nobody",


... a dozen or so similar to this ...

end

######################################################################
#                      ROUTERS CONFIGURATION                         #
######################################################################


# This router routes to remote hosts over SMTP using a DNS lookup with
# default options.

virtual:
driver=queryprogram;
command="/usr/exim/findhost /usr/exim/exim_domains $domain",

lookuphost:
driver = lookuphost,
transport = smtp;

# This router routes to remote hosts over SMTP by explicit IP address,
# given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
# require this facility, which is why it is enabled by default in Exim.
# If you want to lock it out, set forbid_domain_literals in the main
# configuration section above.

literal:
driver = ipliteral,
transport = smtp;

end
---- END configure ----

--
 Jawaid Bazyar              |   Affordable WWW & Internet Solutions
 Interlink Advertising Svcs |   for Small Business
 bazyar@???       |   P.O Box 641               (303) 781-3273
 --The Future is Now!--     |   Englewood, CO 80151-0641  (303) 789-4197 fax