From owner-freebsd-questions Wed Jan 14 19:56:22 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA13832 for questions-outgoing; Wed, 14 Jan 1998 19:56:22 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from emu.sourcee.com (emu.sourcee.com [199.201.159.173]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA13649 for ; Wed, 14 Jan 1998 19:55:39 -0800 (PST) (envelope-from nrice@emu.sourcee.com) Received: (from nrice@localhost) by emu.sourcee.com (8.8.8/8.8.3) id WAA01164; Wed, 14 Jan 1998 22:55:20 -0500 (EST) Message-ID: <19980114225520.56768@emu.sourcee.com> Date: Wed, 14 Jan 1998 22:55:20 -0500 From: Norman C Rice To: "Randy A. Katz" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: PROCESS THE MAIL - TO SCRIPT References: <3.0.5.32.19980114103602.03991e40@ccsales.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: <3.0.5.32.19980114103602.03991e40@ccsales.com>; from Randy A. Katz on Wed, Jan 14, 1998 at 10:36:02AM -0800 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk On Wed, Jan 14, 1998 at 10:36:02AM -0800, Randy A. Katz wrote: > Hello, > > I posted this to a different list (procmail) and did not get a response. > The main issue is initiating a database post from a mailed in form. I know > others are doing this and I don't want to reinvent the wheel so any > suggestions would be most appreciated... > > I want to send email to special@mydomain.com and have a filter rule like > :0 > * ^Received.*special@mydomain.com > { > > :0 c > ! randyk@virtualisys.com > > :0 > | someperlscript.pl > } > > For some reason it all works except the PERL script doesn't seem to do > anything with the contents of the message. Does anyone know the correct > syntax to use inside the PERL script to receive that PIPE? > > Thanx, > Randy Katz If I understand what you're trying to accomplish, try using the /etc/aliases file with an entry like special: |"/path/to/the/script/someperlscript.pl" and ensure the the PERL script is executable. Of course, you need to rebuild the aliases database after making the changes (newaliases). The email will be passed to your script. Sorry that this method doesn't use procmail, but I have found it useful. If you need information on a PERL script, let me know what you're trying to do. I use the following to capture the pipe. while () { # do something useful } -- Regards, Norman C. Rice, Jr.