From owner-freebsd-questions Wed Dec 18 10:19:10 2002 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 8941637B401 for ; Wed, 18 Dec 2002 10:19:08 -0800 (PST) Received: from hotmail.com (oe31.law8.hotmail.com [216.33.240.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 372C943EB2 for ; Wed, 18 Dec 2002 10:19:08 -0800 (PST) (envelope-from mxsmanic@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 18 Dec 2002 10:19:08 -0800 X-Originating-IP: [193.251.59.14] From: "Mxsmanic" To: "Barry Byrne" , "FreeBSD Questions" References: Subject: Re: Getting Perl scripts to work as mail filters Date: Wed, 18 Dec 2002 19:19:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 18 Dec 2002 18:19:08.0194 (UTC) FILETIME=[F4929020:01C2A6C1] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG *** Well it looks like your script is being run - what should your script do? *** Heck, it's so simple I can list it here: --- #!/usr/bin/perl while ($inputline = ) { $inputline =~ s/18 Dec 2002/29 Dec 2013/; print STDOUT $inputline; } --- The s/// stuff is just to give me some proof that the script saw the message. I'm not getting anything at all now, though. I assumed that writing to STDOUT would somehow get the message delivered, but maybe not. But if that's not the way to get it delivered, what is? The sendmail manual is not at all clear on this. I looked in sendmail.cf for the name of some program to which perhaps I should pipe STDOUT in the aliases file, but couldn't find anything. When the aliases file does not specify piping of messages to some special program, who normally delivers them? *** sendmail doesn't do anything with the STDOUT from your script. I'm nut sure what you mean by 'delivers whatever comes out' - where would it deliver it? *** To my mailbox. I want the script to see incoming messages just before they get deposited in my mailbox on the server. From what I can understand of how this works, some program actually receives the messages from sendmail (?) and deposits them in my /usr/home/$USER mailbox, which appears to be just a simple text file (I can't find any reference giving the format of that, either). *** sendmail is should not be running as root (probably 'mailnull'). *** It's running as root on my system. I thought it _had_ to run as root (?); doesn't it have to access mailboxes that have only 600 access or something? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message