From owner-freebsd-questions@FreeBSD.ORG Sat Jul 5 12:27:16 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FADB37B401 for ; Sat, 5 Jul 2003 12:27:16 -0700 (PDT) Received: from smtp02.wlv.untd.com (smtp02.wlv.untd.com [209.247.163.58]) by mx1.FreeBSD.org (Postfix) with SMTP id C836343FBF for ; Sat, 5 Jul 2003 12:27:15 -0700 (PDT) (envelope-from idiot1@netzero.net) Received: (qmail 15057 invoked from network); 5 Jul 2003 19:27:14 -0000 Received: from unknown (HELO netzero.net) (66.19.76.73) by smtp02.wlv.untd.com with SMTP; 5 Jul 2003 19:27:14 -0000 Message-ID: <3F07264E.7040404@netzero.net> Date: Sat, 05 Jul 2003 15:26:06 -0400 From: Kirk Bailey Organization: Silas Dent Memorial Cabal of ERIS Esoteric and hot dog boiling society User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org, sendmail-questions@sendmail.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: oddity regarding execution X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2003 19:27:16 -0000 I am using FreeBSD and sendmail to work on the internet. Recently I wrote a program to process a incoming email and append it to a file in it's own directory. I have a complete email in a file in the directory for testing, and I fired it up from the command line prompt using input redirection to draw input from the file; it worked fine. So I created an alias pointed at it, and fired off a test message. Well, when the alias fed the message to it, it barked. 'unknown mailer error 1' says the log. Ran it with the sample file, worked fine; even modified the testcase a little, still fine. Hmmmm... So I added a line to the script, so it would open a file and write it's current path, and very carefully detailed EXACTLY where this file lived, having a suspicion. BARK! Although it still barked like a dog, it gave me my confirmation; when executed by an alias, it thinks the cwd is '/'!!! I modified the script to point EXACTLY to the location of the recipient file of the data, and all was now well, either way. HHMMMMMMMMMMMMM..... is this a freebsd quriosity, a sendmail quriosity, or what all? And is there anything I can do so the cwd will be the dir the script is living in? -- end Cheers! Kirk D Bailey think http://www.howlermonkey.net/ +-----+ http://www.tinylist.org/ http://www.listville.net/ | BOX | http://www.sacredelectron.org/ +-----+ "Thou art free"-ERIS think 'Got a light?'-Promethieus Fnord.