Qmail
[Top] [All Lists]

Re: wrapper-script & Unable to run qmail-remote

To: qmail@list.cr.yp.to
Subject: Re: wrapper-script & Unable to run qmail-remote
From: Kyle Wheeler <kyle-qmail@memoryhole.net>
Date: Thu, 12 Apr 2007 21:15:09 -0600
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <20070413020847.GA2745@discworld.dyndns.org>
Mail-followup-to: qmail@list.cr.yp.to
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <20070413005546.GI16394@aleut.local> <20070413020847.GA2745@discworld.dyndns.org>
User-agent: Mutt/1.5.15 (2007-04-11)
On Thursday, April 12 at 08:08 PM, quoth Charles Cazabon:
Kyle Wheeler <kyle-qmail@memoryhole.net> wrote:

Does anyone have any idea what possible reasons a wrapper script might have for refusing to run like this?

Most common cause I've seen is trailing whitespace (space or CR) on the
shebang line, or some other corruption of it.  I suppose you've looked at it
with `cat -veT`?

I hadn't thought of that, good to know! Unfortunately, it doesn't seem to reveal anything obvious...:

#!/bin/bash$
echo "alive!" >> /tmp/send.log$
DOMAIN="memoryhole.net"$
DKREMOTE="/var/qmail/$DOMAIN/bin/qmail-remote.orig"$
DKSIGN="/etc/domainkeys/$DOMAIN/default"$
[ "$1" != "kyle@memoryhole.net" ] && exec "$DKREMOTE"$
#tmp=`/bin/mktemp -t dk.sign.XXXXXXXXXXXXXXXXXXX 2>>/tmp/send.log`$
tmp="/tmp/dksign.$PID.$$"$
echo "created file $tmp" >> "/tmp/send.log"$
/bin/cat - >"$tmp"$
echo "saved message" >> /tmp/send.log$
( /usr/local/bin/dktest -s "$DKSIGN" -c nofws -h <"$tmp" 2>>/tmp/send.log | \$
^I/bin/sed 's/; d=.*;/; d='"$DOMAIN"';/' 2>>/tmp/send.log; \$
^I/bin/cat "$tmp" 2>>/tmp/send.log) | \$
^I"$DKREMOTE" "$@" 2>>/tmp/send.log$
retval=$?$
echo "called dkremote with return value $retval" >> /tmp/send.log$
/bin/rm "$tmp"$
exit $retval$

~Kyle
--
Science has proof without any certainty. Creationists have certainty without any proof.
                                                    -- Ashley Montague

Attachment: pgpibRdlS1x6u.pgp
Description: PGP signature

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