Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2002 14:46:14 +0100
From:      "Mxsmanic" <mxsmanic@hotmail.com>
To:        "FreeBSD Questions" <freebsd-questions@freebsd.org>
Subject:   Getting Perl scripts to work as mail filters
Message-ID:  <OE44LIqdqo0czTxscNK00003f79@hotmail.com>

next in thread | raw e-mail | index | archive | help
I can't find an answer to this question anywhere, after two hours of
searching the Web:

What do I have to do to make a simple Perl script filter incoming mail for a
mailbox?  I wrote a script that just reads standard input and writes it to
standard output, then put it in my home directory, then changes
/etc/mail/aliases to point to it, like this:

mymail:    "|/usr/home/mymail/perlfilter"

But when I actually send mail to this address, it just disappears--no error
message, nothing.  When I execute the same program by hand, it works fine.
If I remove the alias, the mail is delivered just fine, too.  What am I
missing??  The Perl program has 755 for permissions and has mymail:users as
its userid and group.  The first line points to the location of Perl in the
usual way.  I am at a loss for ideas as to why this isn't working.  The
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.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OE44LIqdqo0czTxscNK00003f79>