What is the correct behaviour of mail?

What is the correct behaviour of mail?

Post by Gerben Wier » Thu, 23 Apr 1992 22:23:45



Under SunOS and Ultrix, if I open a pipe  a la :


there will be a valid To: line in that mail and the required empty line that
separates header from body is there.

If I do the same under NeXTOS 2.1 something strange happens. Any header-like
information that directly follows is put in the header and no "To:" line is
generated. Instead, the mail system at some point inserts a "Apparently-To:"
line just before the first line that does not look like a header line.

`which mail' I get /usr/ucb/Mail on NeXT and /usr/ucb/mail on the Sun. But the
interface that I see on the NeXT is that of /bin/mail.

I have several questions
1.      Is /bin/mail always present on a unix system (SysV also)?
2.      Does it have a defined interface and will it always accept receiving
        addresses on remote systems?
3.      Any idea how it is that when I run "mail" in  pipe on the NeXT I get
        /bin/mail even if /usr/ucb/mail is first in my PATH? The program
        runs setuid root, btw, but su-ing to root gives the same results.

Thanks,
--

(+31) 2154 84415/(+31) 35 833539  || Support the League for Programming Freedom!
        "If you don't know where you are going, any road will take you there."
        Lewis Carroll, "Alice in Wonderland".

 
 
 

1. Strange behavior with shared /var/mail, /bin/mail and secure NFS

Hi !

----

While playing around with secure NFS I found a strage behaviour:
Trying to delete a mail on a client with /var/mail imported from a
server, deleting a mail with /bin/mail fails with the message:
"mail: Cannot open savefile"
Back on the server (where /var/mail is a local filesystem) all works
normal.

The server "master" exports /var/mail like this (etc/dfs/dfstab):
-- snip --
share -F nfs -o sec=dh,rw,root=terror   -d "mail"
/var/mail
-- snip --

Client "terror" imports /var/mail like this:
-- snip --
master:/var/mail          -                       /var/mail
nfs     no      yes     sec=dh,actimeo=0
-- snip --

The NIS+-setup seems to be OK, /etc/hosts and hosts.org_dir NIS+-table
is OK, too.
All users (except root, daemon etc.) have valid NIS+-accounts.

Here comes the /bin/mail chat on the client...
-- snip --


Date: Wed, 17 Nov 1999 03:41:00 +0100 (MET)



Subject: /bin/mail likes this !!
Content-Length: 111

crap stuff following...

? d
mail: Cannot open savefile
-- snip --

Any idea what's going wrong here ?

----

Bye,
Roland

--
  __ .  . __


  /O /==\ O\  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
 (;O/ \/ \O;) TEL +49 (0) 641/99-13193 FAX +49 (0) 641/99-41359

2. Bug in dlopen()

3. Am I correct?

4. Need help please

5. Am I in the correct newsgroup?

6. help: build a searchable knowledge base

7. "who am i" doesn't give correct info

8. User identification problem

9. tcsh: correct=cmd - odd behavior

10. correct stdio behavior for O_APPEND

11. Correct behaviour for extra CL args?

12. Correct behavior or bug with ufs filesize reporting?

13. POSIXly correct behaviour of execve w.r.t. the process signal mask?