> > Is the Mprog mailer /bin/sh ? Do other program aliases work ?
>
> hm. i'm guessing you're referring to an entry in sendmail.cf, and
> checking, I find this:
>
> Mprog, P=/bin/false, F=lsDFMeu, S=10, R=20/40, D=$z:/,
> A=sh -c $u
>
> /bin/false looks bad. :-/ can you tell me what i want to have here?
> what does all this mean? thanks much.
>
>
>
> --
> colin | precisely why all of the above should be so is not clear, but goes so
me
> roald | way to explaining why, on the Disc, the Gods are not so much worshipp
ed
> as blamed. (pratchett)
>
Good sleuthing.
It is bad. It disables/breaks aliases with '|' in them.
(try: /bin/false ; echo $status ----> 1 that's the mailer error 1)
You want P=/bin/sh, and the rest the same.
Obviously sendmail.cf was changed by the installer from the distributed /bin/sh
due to insecurity about sendmail security holes in the program mailer.
sendmail v8 is known to not have this security hole.
You want an explanation of the whole thing ?
It all means approximately:
If an alias has a pipe:
alias:"|stuff" ( or |"stuff" )
then chdir to the recipient's home directory($z) if it exists,
else chdir to / if it exists (else stay in /usr(or/var)/spool/mqueue
and then execute $P $A(u=stuff) i.e.
execve(/bin/sh, sh, -c,"stuff",env) with std input the input message
(just what you got your shell to do when you did cat mesg | /bin/sh -c "stuff")
The S=10, R=20/40 are the sendmail.cf rewriting rules sets to run the
Sender header and Recipient headers (and envelope) addresses through.
The F= flags specify:
F=l, delivery is final (so do Return-receipts)
F=s, strip quotes
F=D, add a Date: header if there isn't one
F=F, add a From: header "
F=M, add a Message-Id: "
F=e, delivery is expensive (queue mail if Oc is True in sendmail.cf)
F=u, preserve case of $u ( stuff )
This is all standard.
BTW, here is the sendmail v8 supplied default prog mailer:
Mprog, P=/bin/sh, F=lsDFMeu, S=10, R=20/40, D=$z:/,
A=sh -c $u
which differs from yours only in P=.
-mike
Follow-Ups:
References:
|
|