[imp] Return-path problem with IMP on Solaris

Lisa Koch lkoch@coe.neu.edu
Wed, 11 Apr 2001 15:12:33 -0400


I wrote the following simple wrapper script:
  #!/usr/bin/sh
  echo $@ >> /export/debug/imp.mail
  /usr/lib/sendmail -i -t $@

and saved it as "impwrapper" with owner root, permission 755. 
Substituting this into defaults.php3 solves the problem and correctly
sets the Return-Path:
  $default->path_to_sendmail   = '/usr/thishost/bin/impwrapper'; /*
works */

"impwrapper" logs entries like this (this is what was passed to sendmail
by IMP):
  -i -fuser@coe.neu.edu -- user@coe.neu.edu

But calling sendmail directly fails to set the Return-Path: correctly!
  $default->path_to_sendmail   = '/usr/lib/sendmail -t -i'; /* doesn't
work */

I am mystified!! However, I'm very grateful for the suggestion, as it
(1) helps eliminate possible causes of the problem, and (2) enables us
to get IMP working while we do more detective work.

Thanks to everyone who offered help.  If I figure out something more, I
will let the list know (and I'm still interested if you think you know
why calling sendmail directly causes problems that are fixed by calling
it from a wrapper).

Regards, Lisa

Magnus Stenman wrote:
> 
> Instead of calling sendmail directly from IMP,
> execute a shell script which logs its arguments,
> and then executes sendmail
> 
> look at the args
> 
> /m
> 
> On Tue, Apr 10, 2001 at 03:20:55PM -0400, Lisa Koch wrote:
> > I don't think that sendmail is the problem.  I can send mail using the
> > "-f" option from the command line, while logged in as the apache user,
> > and it arrives with the "Return-Path" set to the "-f" user.  However, I
> > added the apache user to the trusted users anyway (didn't help). BTW,
> > our apache user is usually www; I switched Apache to run as "nobody" in
> > the test message whose headers you saw, to try other ideas (didn't
> > help).
> >
> > My guess is that IMP is not passing the argument to the "-f" option to
> > sendmail, somehow.  As I mentioned before, PHP seems picky about
> > whitespace on Solaris, more so than on Linux.  I notice stuff about
> > "escapeShellCmd" in horde.lib.  What is this, and could it be
> > OS-specific?  Other ideas?
> >

-- 
Dr. Lisa K. Koch
Assistant Dean for Educational and Computer Technology
College of Engineering, Northeastern University
230 Snell Engineering Center, Boston, MA 02115
Email: lkoch@coe.neu.edu * Phone: (617) 373-4430 * Fax: (617) 373-8504