The F=f
and F=r
flags are similar in their implementation
but can differ in their result. Consider, for example, the SunOS 4.x version
of /bin/mail. That program expects
the -r
command-line argument to specify the sender's name.
Setting the F=r
flag correctly causes mail
to be seen as being from the sender (-r sender
),
but mistakenly using the F=f
flag invokes
/bin/mail with -f sender
instead.
This fails, because the SunOS 4.x version of /bin/mail expects
the -f
command-line argument to mean that it should
interactively read mail from the mailbox named sender.
The F=C
flag can cause problems when it is specified
for delivery agents for which the @domain form of address
is inappropriate. This flag should be avoided for DECNET
and the local
delivery agents.
A common problem with SysV versions of /bin/mail is its annoying habit
of prepending a "From
" line to the beginning of
each message, even if one is already there. This confuses
users, because it makes their mail appear to come from uucp
or daemon instead
of the real sender.
The problem stems from the fact that the SysV /bin/mail lacks
a -r
command-line argument (or its equivalent) to indicate
who the sender is. Instead, that program assumes that the sender's
identity can be taken from the identity of the person who ran the program.
This works correctly with local mail; but when mail comes in from
the outside world, /bin/mail is being run by
root, daemon, or uucp.
The best fix is to get a newer /bin/mail
[15]
from one of the many anonymous FTP sites. A less satisfactory
fix is to delete the F=n
flag from the appropriate (usually
local
) delivery agent. This leaves two "From
"
lines, the second prefixed with a >
character (the
correct line).
[15] The BSD /bin/mail requires considerable hacking to get it to work on a SysV machine. Alternatives are deliver, the mh suite's slocal, and mail.local that is supplied with the sendmail source distribution.
Never use either the F=f
or F=r
flags with the
prog
delivery agent. That delivery agent usually runs programs
by evoking the Bourne shell, which misinterprets
either flag.
The -f
command-line argument tells /bin/sh to disable
filename generation.
The -r
command-line argument is unknown to /bin/sh.
Both command-line arguments produce the wrong result.