pat@seradg.Dayton.NCR.COM (Patrick Pesch) (10/18/87)
THANKS to all of you out there that posted/e-mailed you suggestions to me... I'm still sorting through some responses, but so many have asked me to let them know what I found out that I thought I'd post now... 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 :-(. No solution will seem to work if it expects the Xenix mailer to "pass on" the recipients address to another mailer without first looking at them. 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)?". No matter how I answer the mail does not get send. So it looks like this is a "take it all or leave it buddy" mailer. There are two programs in the /usr/lib/mail directory that may :-) be the answer. They are execmail and mail.local. They are forked by the mailer, but it appears that the mailer KNOWS everything about execmail and starts it with its own options, etc... I have to look in the manuals for these two, but I don't remember seeing them in the mail sections before... So, it looks I'm S.O.L., unless somebody has written a mailer that does some nice things for composing mail (suggestions?) that will work with smail, pathalias, etc... Thanks again everybody, I appreciate all the efforts! Patrick Pesch pat@seradg.Dayton.NCR.COM NCR Corporation Dayton OH
mikew@foobar.UUCP (Mike Wright) (10/20/87)
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 <from> <to>....." 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 <stdio.h> 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 <from user> 3,4,... <to users> we want 0 "rmail" 1,2.. <to users> */ 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 ------------------------------