From owner-freebsd-questions Wed Dec 18 10: 6:20 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 5F1F037B401 for ; Wed, 18 Dec 2002 10:06:19 -0800 (PST) Received: from slate.dublin.wbtsystems.com (slate.dublin.wbtsystems.com [193.120.231.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D19D43EB2 for ; Wed, 18 Dec 2002 10:06:18 -0800 (PST) (envelope-from barry.byrne@wbtsystems.com) Received: from spiral (spiral.dublin.wbtsystems.com [193.120.231.190]) (authenticated bits=0) by slate.dublin.wbtsystems.com (8.12.6/8.12.6) with ESMTP id gBII697n039810; Wed, 18 Dec 2002 18:06:09 GMT From: "Barry Byrne" To: "Mxsmanic" , "FreeBSD Questions" Subject: RE: Getting Perl scripts to work as mail filters Date: Wed, 18 Dec 2002 18:06:08 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: Importance: Normal X-WBT-Authenticated-User: bb X-Scanned-By: slate/MIMEDefang 2.28 (www . roaringpenguin . com / mimedefang) 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 > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Mxsmanic > Here are the two relevant log entries after I tried to mail something from > the console: > > Dec 18 18:31:10 myserver sendmail[97621]: gBIHVAo97621: > from=root, size=39, > class=0, nrcpts=1, > msgid=<200212181731.gBIHVAo97621@myserver.testdomain.com>, > relay=root@localhost > Dec 18 18:31:10 myserver sendmail[97623]: gBIHVAo97621: > to="|/usr/home/mymail/mailman", ctladdr=mymail (1/0), delay=00:00:00, > xdelay=00:00:00, mailer=prog, pri=30039, dsn=2.0.0, stat=Sent > > So it does say mailer=prog, which means what? Well it looks like your script is being run - what should your script do? > sendmail manual seems to indicate that it just pipes the e-mail message into > this script, then delivers whatever comes out of standard output, but it > doesn't seem to work. the script should run with the mail message (headers + body) supplied on STDIN. 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? If you need output to go somewhere such as a file or emailed somewhere, you will need to explicitly do this. if you want to quickly to assue yourself that the script is running, try making it create a file in /tmp or somewhere else that it has permissions - sendmail is should not be running as root (probably 'mailnull'). - Barry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message