[comp.mail.sendmail] Sendmail unknown mailer error 1

tony@Cayman.COM (Tony Gale) (04/13/91)

Hi-

I am trying to pipe incoming mail to an account and have that account massage the message and return a reply.  I am doing this via the .forward mechanism piping into a csh script that I've written.  The problem is that I keep getting the mail bounced back to me with and unknown mailer error 1.  Does anyone have any clues why this may be happening.

Any help will be greatly appreciated.
Thanks.

___________________________________________________________________
  Tony Gale			     phone:     (617)494-1916 x251     
  Technical Support                  fax:       (617)494-9270      
  Cayman Systems, Inc.               Internet:  tony@cayman.com
  26 Landsdowne Street               AppleLink: CAYMAN.TECH 
  Cambridge, MA 02139                

Bounced message======
(Message inbox:294)
 -- using template mhl.format --
Date:    Fri, 12 Apr 91 12:47:54 EDT
To:      <tony@kodiak>

From:    Mailer-Daemon@wrangel0 (Mail Delivery Subsystem)
Subject: Returned mail: unknown mailer error 1

Return-Path: Mailer-Daemon@wrangel0
Return-Path: <Mailer-Daemon@wrangel0>

   ----- Transcript of session follows -----
getwd: can't stat .
554 "|/home/bart/bug-responder.csh"... unknown mailer error 1

   ----- Unsent message follows -----
Return-Path: <tony@kodiak>
Received: from kodiak.Cayman.COM by wrangel0.qa (4.1/SMI-4.1)
	id AA15935; Fri, 12 Apr 91 12:47:54 EDT
Received: by kodiak.Cayman.COM (4.1/SMI-4.1)
	id AA11016; Fri, 12 Apr 91 12:54:53 EDT
Date: Fri, 12 Apr 91 12:54:53 EDT
From: tony@kodiak (Tony Gale)
Message-Id: <9104121654.AA11016@kodiak.Cayman.COM>
To: bart
Subject:  Test from kodiak

BUG REPORT
--
___________________________________________________________________
  Tony Gale			     phone:     (617)494-1916 x251     
  Technical Support                  fax:       (617)494-9270      
  Cayman Systems, Inc.               Internet:  tony@cayman.com
  26 Landsdowne Street               AppleLink: CAYMAN.TECH 
  Cambridge, MA 02139                

marcelo@deadzone.uucp (Marcelo Gallardo) (04/20/91)

In article <TONY.91Apr12150835@cuba.Cayman.COM> tony@Cayman.COM (Tony Gale) writes:
>Hi-
>
>I am trying to pipe incoming mail to an account and have that account massage the message and return a reply.  I am doing this via the .forward mechanism piping into a csh script that I've written.  The problem is that I keep getting the mail bounced back to me with and unknown mailer error 1.  Does anyone have any clues why this may be happening.
>
>Any help will be greatly appreciated.
>Thanks.
>
>   ----- Transcript of session follows -----
>getwd: can't stat .
>554 "|/home/bart/bug-responder.csh"... unknown mailer error 1
>

	From what the error says, the mailer doesn't have permission to
	get to the script. Check the permissions on all the directories,
	and the script itself.

-- 
Marcelo Gallardo			marcelo%deadzone@princeton.edu
Test and Evaluation Specialist		...!princeton!deadzone!marcelo
Princeton University			marcelo@sparcwood.princeton.edu
Advanced Technologies and Applications		(609) 258-5661

kyle@uunet.UU.NET (Kyle Jones) (04/21/91)

tony@Cayman.COM (Tony Gale) writes:
 > I am trying to pipe incoming mail to an account and have that
 > account massage the message and return a reply.  I am doing
 > this via the .forward mechanism piping into a csh script that
 > I've written.  The problem is that I keep getting the mail
 > bounced back to me with and unknown mailer error 1.  Does
 > anyone have any clues why this may be happening.
 > [...]
 >    ----- Transcript of session follows -----
 > getwd: can't stat .
 > 554 "|/home/bart/bug-responder.csh"... unknown mailer error 1

csh dies if it can't figure out the path of the current working
directory.  Your script is most likely being run with a current
directory of /usr/spool/mqueue, which may be a protected
directory on your system.  Either change the directory
permissions, use another shell for your script, or use a C
program wrapper that cd's out of the mail queue directory before
calling your script.

rickert@mp.cs.niu.edu (Neil Rickert) (04/21/91)

In article <129680@uunet.UU.NET> kyle@uunet.UU.NET (Kyle Jones) writes:
>tony@Cayman.COM (Tony Gale) writes:
> > 554 "|/home/bart/bug-responder.csh"... unknown mailer error 1
>
>csh dies if it can't figure out the path of the current working
>directory.  Your script is most likely being run with a current
>directory of /usr/spool/mqueue, which may be a protected
>directory on your system.  Either change the directory
>permissions, use another shell for your script, or use a C
>program wrapper that cd's out of the mail queue directory before
>calling your script.

 Or perhaps try: "|cd /home/bart;./bug-responder.csh"

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

michael@uni-paderborn.de (Michael Schmidt) (04/22/91)

>>>>> About Re: Sendmail unknown mailer error 1, Neil Rickert said:

Neil> In article <129680@uunet.UU.NET> kyle@uunet.UU.NET (Kyle Jones) writes:

>tony@Cayman.COM (Tony Gale) writes:
> > 554 "|/home/bart/bug-responder.csh"... unknown mailer error 1
>
>csh dies if it can't figure out the path of the current working
>directory.  Your script is most likely being run with a current
>directory of /usr/spool/mqueue, which may be a protected
>directory on your system.  Either change the directory
>permissions, use another shell for your script, or use a C
>program wrapper that cd's out of the mail queue directory before
>calling your script.

Neil>  Or perhaps try: "|cd /home/bart;./bug-responder.csh"

I don't think, that that will work, if your mailer starts the csh. At
least in early IDA cf's that was the case. We changed it to start
/bin/sh. Is there any reason to start a csh from the mailer to deliver
to the mailer "prog"?
--
      Michael Schmidt, FB 17, Uni-GH Paderborn, Warburgerstr. 100,
                     D-4790 Paderborn, West Germany
Mail:   michael@pbinfo.UUCP         or          michael@uni-paderborn.de

rickert@mp.cs.niu.edu (Neil Rickert) (04/22/91)

In article <MICHAEL.91Apr22102002@pbinfo.uni-paderborn.de> michael@uni-paderborn.de (Michael Schmidt) writes:
>>>>>> About Re: Sendmail unknown mailer error 1, Neil Rickert said:
>
>Neil>  Or perhaps try: "|cd /home/bart;./bug-responder.csh"
>
>I don't think, that that will work, if your mailer starts the csh. At
>least in early IDA cf's that was the case. We changed it to start
>/bin/sh. Is there any reason to start a csh from the mailer to deliver
>to the mailer "prog"?

 If a standard local mailer definition is used, this would be executed as

/bin/sh -c "cd /home/bart;./bug-responder.csh"

 Therefore, by the time the csh script is entered, the current directory
is a suitable one.  (In the original article, this was to be run from
.forward, so should be using the permissions of bart).  The version of
/bin/sh on my system handles this correctly, although I don't recommend
using csh scripts for programmatic mailers.


-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) (04/23/91)

In article <1991Apr22.120008.6171@mp.cs.niu.edu> rickert@mp.cs.niu.edu (Neil Rickert) writes:
>/bin/sh -c "cd /home/bart;./bug-responder.csh"

I've used all this good advices on the same problem. But thus it does not
work. Here's the setup I use:

/usr/lib/aliases:
faq-aix:        "|/usr/local/bin/faq"

faq has following access rights (seems OK to me):
-rwsr-sr-x   1 listserv listserv   43844 Apr 23 15:45 /usr/local/bin/faq

The sendmail.cf prog mailer is defined as:
Mprog,  P=/bin/sh,  F=flsDFMe, S=10, R=20, A=sh -c $u

When a local user sends mail to faq-aix (/usr/lib/sendmail -v -t) I get
a correct execution:
faq-aix@fifi.univ-lyon1.fr... aliased to        "|/usr/local/bin/faq"
"|/usr/local/bin/faq"... Connecting to .prog...
"|/usr/local/bin/faq"... Sent

When a remote user sends mail to faq-aix, the 'faq' module never finishes.
To see where it locks up, I added as first statements of the application:
   fgetc(stdin);
   exit(0);
In the "local" case it's ok with ot without the fgetc, when the mail is
remote, the application locks on the fgetc (as waiting). It seems that the
sendmail does not forward the incomming mail to the application.

Any suggestion? My fault? System's fault?

-- 
Christophe Wolfhugel (on irc: Zolf)  |  Email: wolf@grasp1.univ-lyon1.fr
INSA Lyon - Departement Informatique |  "Ecole publique, ecole fauchee. Encore"
69621 Villeurbanne Cedex             |  "une tradition francaise dont on se"
France                               |  "passerait bien."

rickert@mp.cs.niu.edu (Neil Rickert) (04/24/91)

In article <1991Apr23.153449.16437@grasp1.univ-lyon1.fr> wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) writes:
>
>faq-aix:        "|/usr/local/bin/faq"
>
>-rwsr-sr-x   1 listserv listserv   43844 Apr 23 15:45 /usr/local/bin/faq
>
>Mprog,  P=/bin/sh,  F=flsDFMe, S=10, R=20, A=sh -c $u
>
>When a local user sends mail to faq-aix (/usr/lib/sendmail -v -t) I get
>a correct execution:
>
>When a remote user sends mail to faq-aix, the 'faq' module never finishes.

 I believe the problem is with you prog mailer definition.  In particular that
'f' flag in the 'F=' string looks suspicious.

 The effect of the 'f' flag is supposed to be that when the sender is local,
/bin/sh is invoked with:

  sh -c "/usr/local/bin/faq"

but when the mail arrives over the network, /bin/sh is invoked with

  sh -f sender -c "/usr/local/bin/faq"

 I am not quite sure what the shell will do with this, but it is very likely
to have some kind of nervous breakdown.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940