paul@actrix.co.nz (Paul Gillingwater) (11/12/90)
I'm trying to set up elm to be used under a bbs. All users login as bbs, so this is their euid. The bbs software exports LOGNAME=Paul.Gillingwater into the environment, and sets MAIL=/apc/usr/Paul/Gillingwater/mail as well. The problem is that I want the From: line on messages to read: From: Paul.Gillingwater@bbs.actrix.co.nz Unfortunately, they come out as: From: bbs@actrix.co.nz Can anyone suggest a way to hack on elm to make this happen? Of course it should only fake the domain for bbs users. -- Paul Gillingwater, paul@actrix.co.nz
les@chinet.chi.il.us (Leslie Mikesell) (11/15/90)
In article <1990Nov12.092146.20233@actrix.co.nz> paul@actrix.co.nz (Paul Gillingwater) writes: >I'm trying to set up elm to be used under a bbs. All users login as >bbs, so this is their euid. The bbs software exports >LOGNAME=Paul.Gillingwater into the environment, and sets >MAIL=/apc/usr/Paul/Gillingwater/mail as well. >The problem is that I want the From: line on messages to read: >From: Paul.Gillingwater@bbs.actrix.co.nz >Unfortunately, they come out as: >From: bbs@actrix.co.nz >Can anyone suggest a way to hack on elm to make this happen? Of >course it should only fake the domain for bbs users. You must have had to hack on your mailer transport to make it do the delivery for the bbs users. Why not add the equivalent hacks to supply the From: line in the MTA based on something in the environment and simply configure ELM to leave off the From: line? This will localize the changes and make it easier to undo should you decide to provide something closer to a normal unix environment in the future. If you are using smail 3.1, the changes would be trivial - I have a modification that makes it emulate the SysV use of LOGNAME for the From_ (and From: if it doesn't already exist), in case you want that as a starting point. Les Mikesell les@chinet.chi.il.us
paul@actrix.co.nz (Paul Gillingwater) (11/16/90)
In article <1990Nov14.185038.18876@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: > >I'm trying to set up elm to be used under a bbs. All users login as > >bbs, so this is their euid. The bbs software exports > >LOGNAME=Paul.Gillingwater into the environment, and sets > >MAIL=/apc/usr/Paul/Gillingwater/mail as well. > > >The problem is that I want the From: line on messages to read: > > >From: Paul.Gillingwater@bbs.actrix.co.nz > > >Unfortunately, they come out as: > > >From: bbs@actrix.co.nz > > >Can anyone suggest a way to hack on elm to make this happen? Of > >course it should only fake the domain for bbs users. > > You must have had to hack on your mailer transport to make it do > the delivery for the bbs users. Why not add the equivalent hacks > to supply the From: line in the MTA based on something in the > environment and simply configure ELM to leave off the From: line? I've fixed it now. I've added a patch to elm that checks the user name, and if it's "bbs", it calls a different mailer, which tosses the mail to rmail to make it appear to be coming from a sub-domain. Here's the shell script I used: : # /bin/sh # This script is used by the XBBS program to pretend that it's # living in a domain of its own. # It is called with args which will be passed on to rmail, # which will then pass it on to sendmail. # # The first argument is the pathname to the message file. # The second argument will be the name of the user by whom # the mail is being sent. Neither will be passed on. MESSAGEFILE=$1 USERNAME=$2 shift 4 echo "From ${USERNAME}@bbs.actrix.gen.nz \(${USERNAME}\)" `date` >/tmp/bbs$$ # Append the message file to the fake From_ line cat ${MESSAGEFILE} >>/tmp/bbs$$ rm -f ${MESSAGEFILE} /bin/rmail $@ </tmp/bbs$$ rm -f /tmp/bbs$$ > > This will localize the changes and make it easier to undo should > you decide to provide something closer to a normal unix environment > in the future. I'll be providing both. Standard subscribers will get mail from within the BBS, while users who pay extra will get full shell access and "proper" mail. > If you are using smail 3.1, the changes would be trivial - I have > a modification that makes it emulate the SysV use of LOGNAME for > the From_ (and From: if it doesn't already exist), in case you > want that as a starting point. Thanks, but I'm using sendmail. It all seems to be working fine now. I can also post the mail delivery program if anyone wants it. -- Paul Gillingwater, paul@actrix.co.nz