Subject: sendmail question
To: NetBSD Mailing List <port-mac68k@NetBSD.ORG>
From: David A. Gatwood <marsmail@globegate.utm.edu>
List: port-mac68k
Date: 10/16/1997 17:06:24
You're probably going to laugh, but... as an exercise in futility... I
decided to set up my internet talker to handle, at least to some degree,
incoming and outgoing internet email.  In that talker users don't have
shell accounts, the current method is to place their actual internet email
address in the from: field of outgoing messages.  Howver, now that I've
hacked the parser code enough that it should handle unedited RFC-compliant
email messages, I've decided to try to extend this to handle incoming mail
as well.

I've come up with two schemes.  The first involves simply hand-adding
users that rewuest internet mail reception to /etc/aliases, with mail
piped to a special delivery program and add their names to another file to
tell the talker to use username@globegate.utm.edu as their outgoing mail
address instead of their internet address.  That's easy enough, but it's
really pretty kludgy.  This could be simplified, I suppose, by having the
talker parse /etc/aliases, but that's still kludgy.  What I'd really like
to do is have sendmail check to see if the user is a real user first, and
if so, deliver mail normally, otherwise go through all the rewriting rules
but use a different delivery agent, which (upon failure, whether because
it wasn't a user or the user didn't have mail permission) would generate
an error message that would get passed back to the sender.  Does anyone
have any idea how this could be done? 

Note that the delivery program itself is easy enough to write (complete
with a mapping of talker-root to ROOT).  What I'm trying to figure out is
the sendmail.cf changes....  :-)


TIA,
David

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/CC/FA/H/L/MC/M/MU/PA/TW d-@ s:>- a-- C++++>$ UBLAS*++++>$
P+?>$ L+++>$ !E--- W+++>$ N++(+++)>+++$ !o? K-? !w--- !O
M++>$ !V-- PS+>$ !PE- Y+>$ PGP+>$ t+++>$ 5+>++++$ !X- !R tv+>$
b++>$ !DI !D- G++(+++)>$ e>++++ h--! r--- !y-
------END GEEK CODE BLOCK------