procmail
[Top] [All Lists]

Re: Help: "sh: canno use & in command"?

1996-09-17 05:45:20
Tony,

It looks like your system's sendmail configuration has Mprog defined to
use "smrsh" or some other protected shell.  It is "smrsh" which is not
allowing your pipe filter from the .forward file.

You have these choices, in decreasing order of desireability:

a. petition your system manager to redefine Mlocal to use procmail
   instead of /bin/rmail or whatever your system local mailer program
   is.  This is the most preferred since it gives everyone the best
   freedom of choice.  

   Those who prefer .forward, can continue to use it.  Sendmail does
   .forward invocation using Mprog, and does this before attempting
   local delivery using Mlocal.

   Those who prefer using procmail filtering, can write a .procmailrc,
   instead of a .forward.

   Those who are unaware or choose not to do forwarding can continue to
   have neither a .forward nor a .procmailrc, and their mail will
   continue to be delivered locally just fine -- better, in fact, since
   procmail avoids NFS locking problems, if configured correctly.

b. petition your system manager to allow procmail as one of the
   programs allowed to be run through pipe filters.  If s/he is
   reluctant, please show them the "man" page, and, if absolutely
   necessary, have them consult with this list.  There are many (some?
   -- at least one -- me) postmasters/system-managers who participate on
   this list, and who will validate procmail's viability as a good,
   local mail delivery program (see previous paragraph).

c. Discover what *are* the allowed mail programs, and write a little
   "wrapper" in one of them to invoke procmail.  This is the least
   desireable, but sometimes necessary in the face of facist system
   admins (yes, there *are* some).

I know that this must be in the FAQ.

Stephen, is there any way you can modify the procmail rc.submit to grep
the body with the following recipe?

    :0 B
    * (doesn't *work|broken|never *delivered|
    * (IFS=|exec.*procmail)
    * Service unavailable
    * !X-Loop: procmail(_at_)$HOST
    | reply-with-FAQ

and, reply-with-FAQ does the obvious thing.

I see this query pop up time and time again.
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com>      http://reality.sgi.com/aks

    > I'm trying to use procmail for a new accout I have and it seem doesn't
    > work. When I sent an email to the accout, the message was never delivered
    > and I got a returned mail with the following message: 
    > 
    >   ----- The following addresses have delivery notifications ----- "|IFS='
    > ' && exec /hinet/home/tony/bin/procmail || exit 75 # tony"
    > (unrecoverable error) 
    >     (expanded from: <tony(_at_)hinet(_dot_)net>) 
    > 
    >    ----- Transcript of session follows ----- sh: cannot use & in command
    > 554 "|IFS=' ' && exec /hinet/home/tony/bin/procmail || exit 75 #
    > tony"...  Service unavailable
    > 
    > And no log was generated. If I do a "cat test-mail |
    > /hinet/home/tony/bin/procmail" then test-mail is delivered without
    > problem!
    > 
    > Here is my .forward file: 
    > "|IFS=' ' && exec /hinet/home/tony/bin/procmail || exit 75 # tony" 
    > 
    > Any suggestion will be appreciated.
    > 
    > 
    > Tony Lam
    > --
    > tonyl(_at_)nms(_dot_)fujitsu(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>