Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!pasteur!ucbvax!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrlnk!ncrpcd!wright!jsloan@wright.UUCP From: jsloan@wright.UUCP (John Sloan) Newsgroups: comp.mail.uucp Subject: Re: Sendmail and pathalias Message-ID: <287@thor.wright.EDU> Date: 26 Aug 88 15:53:26 GMT References: <13206@mimsy.UUCP> Sender: news@wright.EDU Reply-To: jsloan@wright.UUCP Lines: 59 From article <13206@mimsy.UUCP>, by chris@mimsy.UUCP (Chris Torek): : > Just as another note, it is possible to do this without modifying > sendmail, although the method can only be described as a kludge. > (Since sendmail refuses to distinguish between incoming mailers, the > situation is even kludgier than it would have to be.) What you do is > have sendmail `deliver' everything to a program that does the routing, > then hands the message back to sendmail for *real* delivery. : It may be a kludge, but it's a worthwhile, and powerful, solution. We've been using, since December 1986, a program we developed, "dnagent", that does just this. Here is a portion of the man page. (Apologies: I posted an earlier response to this which included the entire man page. When I realized how long it was I tried to cancel the article. I think I succeeded.) The Domain-Network Agent is an middle-end to the Sendmail program. When Sendmail identifies a host or organization domain which it cannot resolve internally, it delivers the message to the Dnagent mailer. Dnagent resolves destination addresses by querying a DBM database containing rewrite strings for a key which matches the host-domain portion of the address. If a match cannot be found, Dnagent retries the query with the next higher order portion of the domain (if one exists), scanning from left to right. If a match cannot be found before the address is exhausted, Dnagent can fetch a default rewrite string from the database. This rewrite string is applied only to the destination address(es) on the outer envelope as specified by Sendmail as arguments on the command line when it forks and executes the Dnagent mailer. Addresses in the RFC822 compliant headers in the text of the message are passed through undis- turbed. Rewrite strings may contain macros which are expanded to be the user portion of the address, the domain portion, that part of the domain which matched a key, and conditional expansions which depend upon whether the full domain and the matched key are the same. Once the addresses are rewritten, Dnagent resubmits the mes- sage, with the new outer envelope, to Sendmail for further processing. Several iterations may be made until Sendmail recognizes an address which it can resolve. The number of iterations can be tuned by adding additional rulesets to the Sendmail configuration file, or by making the rewrite strings in the Dnagent database more explicit. When different switches are applied to the Dnagent mailer, the same program may build, append, and dump the database. The database entries are derived from several sources: tables available from the CSNET Info Server, the USENET Pathalias database, and local entries. John Sloan +1 513 259 1384 Wright State University Research Center jsloan%wright.edu@csnet-relay 3171 Research Blvd., Kettering, OH 45420 ..!ucsd!ncr-sd!ncrlnk!ncrpcd!wright!jsloan ...!osu-cis!wright!jsloan Logical Disclaimer: belong(opinions,jsloan). belong(opinions,_):-!,fail.