Article View: comp.mail.sendmail
Article #106How to forward mail for "unknown user" to another host?
From: Per Hedeland
Date: Sun, 09 Aug 1992 12:52
Date: Sun, 09 Aug 1992 12:52
48 lines
2612 bytes
2612 bytes
The purpose of this is, of course, to be able to handle mail addressed to users on some host, where many (but not all!) of those "users" actually have their accounts on another host, without having to set up individual aliases or .forward files for them. It is a requirement that it also works for local mail, i.e. sent to just 'user'. I thought it would be simple, having seen (but never used:-) an attempt at implementation in some old sendmail.cf. E.g., assuming only a normal "stupid" sendmail, define a class L containing all locally known names (aliases + userids), and then replace the normal selection of the local mailer with: R$=L $#local $:$1 known local names R$+ $#ether $@$N $:$1<@$N> forward unknown names where $N is the name of the host to forward to. This works as a first approximation, but falls flat on its face in the presence of e.g. a not uncommon .forward file: \user "|/usr/ucb/vacation user" When these adresses in turn are passed trough the rulesets, neither matches the $=L, and so they incorrectly get forwarded. There are two problems here, the one of identifying mail to files and programs might be solved by explicitly matching / and |, but I can't see a way to deal with quoted addresses (including those where the file/program is inside quotes). My next idea was some kind of "wrapper" for the local mailer, which could weed out the unknown users and feed them back to sendmail with the appropriate @host tacked on. Naively, I thought this would have the added benefit of sendmail taking care of aliases/files/programs, obviating even the need for the U class above - but as I should have known, sendmail also takes care of the unknown users... I'm beginning to think this is really impossible with a "stupid" sendmail, and perhaps even with IDA (looking through some of the comments in the IDA Sendmail.mc regarding MAILSERVER - which is *not* what I want to do, but it has similar problems) - but I would be happy to be shown otherwise... Thanks --Per Hedeland per@erix.ericsson.se or per%erix.ericsson.se@sunic.sunet.se or ...uunet!erix.ericsson.se!per
Technical Details
Message-ID:
<1992Aug9.125252.3335@eua.ericsson.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!erix.ericsson.se!perShow Full Headers
Complete Article Headers
Newsgroups: comp.mail.sendmail Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!sics.se!eua.ericsson.se!erix.ericsson.se!per From: per@erix.ericsson.se (Per Hedeland) Subject: How to forward mail for "unknown user" to another host? Message-ID: <1992Aug9.125252.3335@eua.ericsson.se> Sender: news@eua.ericsson.se Nntp-Posting-Host: super.eua.ericsson.se Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden Date: Sun, 9 Aug 1992 12:52:52 GMT Lines: 49