Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2002 18:06:08 -0000
From:      "Barry Byrne" <barry.byrne@wbtsystems.com>
To:        "Mxsmanic" <mxsmanic@hotmail.com>, "FreeBSD Questions" <freebsd-questions@FreeBSD.ORG>
Subject:   RE: Getting Perl scripts to work as mail filters
Message-ID:  <NCBBIAMNAKDKFJIIGNPKGEGLKHAA.barry.byrne@wbtsystems.com>
In-Reply-To: <OE21XuZi0me3abTd9Qk0000225c@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> -----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




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