procmail
[Top] [All Lists]

Re: procmail, sh problems

1997-01-06 17:29:18
vijay(_at_)aic(_dot_)lockheed(_dot_)com writes:
I'm having trouble with invoking procmail from my $HOME/.forward file,
and would appreciate any help.

I read mail on my local machine running Solaris 2.5. My mail directory
(/var/mail/vijay) is mounted from a server machine running SunOS 4.1.3

I have procmail installed on a local disk on my machine, which is _not_
exported to the server.
...
I then went through the procmail archives, and saw that smrsh might be
the problem. However, neither my machine, nor the mail host, have
smrsh, so I got my Sys. admin. to download and compile smrsh on my
machine (not on the mail host). I also created a soft link to procmail
in /var/adm/sm.bin

procmail needs to be compiled for and accessible on the machine where
mail deliver is taking place.  Where does mail delivery take place: your
machine or the server?


However, I still get the same kind of errors, although now sh
complains about not using "&" and ";" in my .forward.

It looks like your machine.  Double check it, and make sure that that
is true for all mail, including mail sent from off-site, or from the
server!


Even if I call procamil directly, as in 
"|/usr/adm/sm.bin/procmail #vijay",
the Mailer-daemon still sends mail to root with the message
"sh:procmail unavailable".

I have no idea what to do next, and would appreciate any help with
solving this problem.

a) Are you sure that smrsh is looking in the right place?  The default
        path in the source is /usr/adm/sm.bin, though it could have been
        changed at compile time.
b) Are you sure that the procmail binary accessed via
        /var/adm/sm.bin/procmail is executable by everyone?  I ask
        because the smrsh code reads:

        if (access(cmdbuf, X_OK) < 0)
        {
                /* oops....  crack attack possiblity */
                fprintf(stderr, "%s: %s not available for sendmail programs\n",
                        argv[0], cmd);
                if (p != NULL)
                        *p = ' ';
                syslog(LOG_CRIT, "uid %d: attempt to use %s", getuid(), cmd);
                exit(EX_UNAVAILABLE);
        }

        Where cmdbuf contains the path in /var/adm/sm.bin.

Assuming those check out (though I strongly suspect the problem to be one
of them):

c) What version of sendmail are you using?
d) What does the prog mailer definition look like?
        (just copy the entire thing)
 
Philip Guenther