[comp.sys.mips] Using sendmail for local mail?

lgy@blake.acs.washington.edu (Laurence Yaffe) (09/23/89)

    Has anyone figured out how to use sendmail instead of /bin/mail for
delivering local mail (send using mailx).  Setting the mailx (or environment)
variable "sendmail" to "/usr/lib/sendmail" is supposed to accomplish this.
However, when I try this, I get error messages of "(Resetting uid)" returned
by mailx, and error messages like:

Sep 20 13:26:56 newton sendmail[13443]: NOQUEUE: SYSERR: queuename:
Cannot create "qf~Z13443" in "/usr/spool/mqueue": No such file or directory

in the /usr/spool/mqueue/syslog file.  This certainly looks like some
sort of permissions problem, but I haven't been able track it down.

-- 
Laurence G. Yaffe		Internet: lgy@newton.phys.washington.edu
University of Washington	  Bitnet: yaffe@uwaphast.bitnet

wje@igate (William J. Earl) (09/24/89)

In article <3750@blake.acs.washington.edu>, lgy@blake (Laurence Yaffe) writes:
> 
>     Has anyone figured out how to use sendmail instead of /bin/mail for
> delivering local mail (send using mailx).  Setting the mailx (or environment)
> variable "sendmail" to "/usr/lib/sendmail" is supposed to accomplish this.
> However, when I try this, I get error messages of "(Resetting uid)" returned
> by mailx, and error messages like:
> 
> Sep 20 13:26:56 newton sendmail[13443]: NOQUEUE: SYSERR: queuename:
> Cannot create "qf~Z13443" in "/usr/spool/mqueue": No such file or directory
> 
> in the /usr/spool/mqueue/syslog file.  This certainly looks like some
> sort of permissions problem, but I haven't been able track it down.

     The easy way to get the same effect is to create the empty 
configuration file /usr/lib/sendmail.ok, and not set the sendmail variable
in mailx.  mailx will then deliver mail via /bin/mail, which will in turn
hand it off to sendmail.  After sendmail processing, sendmail will in turn
hand the mail back to /bin/mail for actual insertion in a mailbox.
(Except for the configuration file, this is identical to how mail is
usually handled on 4.3 BSD.  The configuration file is used so that the
default behavior is compatible with System V; /usr/lib/sendmail.ok is
not created by the default installation.)  This feature is described in
man page mail(1-SysV).

lgy@blake.acs.washington.edu (Laurence Yaffe) (09/25/89)

In article <28109@igate.mips.COM> wje@igate (William J. Earl) writes:
-In article <3750@blake.acs.washington.edu>, lgy@blake (Laurence Yaffe) writes:
-> 
->     Has anyone figured out how to use sendmail instead of /bin/mail for
-> delivering local mail (send using mailx). [...]
-> 
-     The easy way to get the same effect is to create the empty 
-configuration file /usr/lib/sendmail.ok, and not set the sendmail variable
-in mailx.  mailx will then deliver mail via /bin/mail, which will in turn
-hand it off to sendmail.  After sendmail processing, sendmail will in turn
-hand the mail back to /bin/mail for actual insertion in a mailbox.
-(Except for the configuration file, this is identical to how mail is
-usually handled on 4.3 BSD.  The configuration file is used so that the
-default behavior is compatible with System V; /usr/lib/sendmail.ok is
-not created by the default installation.)  This feature is described in
-man page mail(1-SysV).

    This does not appear to work as you describe on my M/2000 (running 4.0).
I created /usr/lib/sendmail.ok long ago.  Mail sent using /bin/mail is
getting handed off to sendmail, however, mail sent using /usr/bin/mailx
does not appear to be handled by sendmail.  For example, mail to 'postmaster'
set using mailx is not getting mapped using /usr/lib/aliases, whereas the
same mail sent using /bin/mail succeeds.

	Laurence Yaffe

-- 
Laurence G. Yaffe		Internet: lgy@newton.phys.washington.edu
University of Washington	  Bitnet: yaffe@uwaphast.bitnet

bin@primate.wisc.edu (Brain in Neutral) (09/25/89)

From article <3767@blake.acs.washington.edu>, by lgy@blake.acs.washington.edu (Laurence Yaffe):
>     This does not appear to work as you describe on my M/2000 (running 4.0).
> I created /usr/lib/sendmail.ok long ago.  Mail sent using /bin/mail is
> getting handed off to sendmail, however, mail sent using /usr/bin/mailx
> does not appear to be handled by sendmail.  For example, mail to 'postmaster'
> set using mailx is not getting mapped using /usr/lib/aliases, whereas the
> same mail sent using /bin/mail succeeds.

Ah, yes.  The mailers under RISC/os have been one of the more frustrating
aspects of running our MIPS machine like a BSD host.

I tossed sendmail and mailx and replaced with BSD sendmail (so no sendmail.ok
or sendmail.smtp necessary; they should be unnecessary *anyway*, in my opinion)
and /usr/ucb/{M,m}ail.  /usr/ucb/Mail has to be hacked to understand From_
line format as written by /bin/mail (the date does NOT have seconds in it as
it appears to on straight BSD systems).  sendmail has to be hacked to
understand how to get load average out of the kernel (uses /unix, not /vmunix,
for one thing; load average var type is different, for another).

I would toss /bin/mail, too, if I could, but the licensing is stricter on
that than on sendmail and /usr/ucb/Mail.

This is on an M/120 (4.0[01]).

Paul DuBois
dubois@primate.wisc.edu

gamiddleton@watmath.waterloo.edu (Guy Middleton) (09/25/89)

In article <3750@blake.acs.washington.edu> lgy@newton.phys.washington.edu (Laurence Yaffe) writes:
> 
>     Has anyone figured out how to use sendmail instead of /bin/mail for
> delivering local mail (send using mailx).  Setting the mailx (or environment)
> variable "sendmail" to "/usr/lib/sendmail" is supposed to accomplish this.
> However, when I try this, I get error messages of "(Resetting uid)" returned
> by mailx, and error messages like:
> 
> Sep 20 13:26:56 newton sendmail[13443]: NOQUEUE: SYSERR: queuename:
> Cannot create "qf~Z13443" in "/usr/spool/mqueue": No such file or directory

This happens because mailx passes a "-s" option to /bin/mail when called to
deliver a message.  When you reset the "sendmail" variable, mailx still passes
"-s" to the delivery program, which doesn't work, because you can't call
sendmail with that option unless you're root.

Solution: change mailx so it doesn't call the mail delivery program with "-s",
	or change sendmail so it ignores "-s",
	or use Berkeley mail instead of mailx