Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!littlei!foobar!mikew From: mikew@foobar.UUCP (Mike Wright) Newsgroups: comp.mail.uucp Subject: Re: smail "front end" followup (ORIGINAL SUBMITTER) Message-ID: <146@semike.foobar.UUCP> Date: Tue, 20-Oct-87 12:55:43 EDT Article-I.D.: semike.146 Posted: Tue Oct 20 12:55:43 1987 Date-Received: Fri, 23-Oct-87 00:58:20 EDT References: <844@seradg.Dayton.NCR.COM> Sender: news@foobar.UUCP Distribution: na Organization: - Intel Corp - Hawthorne Farms - Hillsboro, OR - Lines: 113 Keywords: Xenix smail mailers Summary: Response to smail running on Xenix In article <844@seradg.Dayton.NCR.COM>, pat@seradg.Dayton.NCR.COM (Patrick Pesch) writes: > First of all, SCO Xenix 2.1.3 mail seems to be a mailx DERIVATIVE. > Almost 3/4 of the responses were to ... > > "edit the mailrc file and add -set sendmail=/bin/smail" > > ...and such. While the Xenix mailer DOES have a global mailrc, > and you can "set" mail variables, there is no sendmail variable :-(. > > ................ For example, I CAN get the mailer to route the > following: > > mail mach1!user@Dayton.NCR.COM > > because it starts with "machine!user...", a normal UUCP path. > However if I try: > > mail user@mach1domain.Dayton.NCR.COM > > mail says (something like) "Unknown recipient, ignore (y/n)?". First some info :- Running Xenix Release 3.5 on an intel box Now -- If you run strings on "rmail" (the xenix one not smail) you should see a set of strings that look like /usr/lib/mail/mail.local ..mail.local /usr/lib/mail/mail.mn ..mail.mn /usr/lib/mail/mail.an <-- this is the key ..mail.an IF this is the case - substitute a command that dumps args and stdin for /usr/lib/mail/mail.an and then send mail to "fred@sys" You should find that your version of /usr/lib/mail/mail.an gets invoked something like "..mail.an -f ....." If it does - you have won - read on - else "hit n". Installation (at least this is what I did) ============ in defs.h /usr/bin/rmail cannot handle more than one target - so #define MAXCLEN 0 lets put smail somewhere useful - so #define SMAIL "/usr/bin/smail" uux does not like -a - so #define RMAIL(flags,from,sys) "%s %s - %s!rmail",UUX,flags,sys /* */ we want "remote from all the time so #define RFROM(frm,now,host) "From %s %.24s remote from %s\n",frm,now,host #define LFROM(frm,now,host) "From %s %.24s remote from %s\n",frm,now, host Now you can make smail install smail as /usr/bin/smail copy /usr/bin/rmail to /bin/lmail install the program at the end of this posting as /usr/lib/mail/mail.an If my memory serves correctly - thats all folks Anyone care to comment on this approach ?? ------------------ cut here ------------------------------ /* program to massage the call to /usr/lib/mail/mail.an into a call to smail */ #include char *my_argv[23]; #define OFFSET 2 main(argc, argv) int argc; char *argv[]; { int arg_index; /* args look like 0 name 1 -r 2 3,4,... we want 0 "rmail" 1,2.. */ my_argv[0] = "rmail"; for(arg_index = 3; arg_index != argc; arg_index++) my_argv[arg_index-OFFSET] = argv[arg_index]; my_argv[arg_index - OFFSET] = (char *)NULL; execv("/usr/bin/smail", my_argv); } ------------------ cut here ------------------------------