procmail
[Top] [All Lists]

Re: procmail and tcp

2002-02-12 06:16:59

On Mon, 11 Feb 2002, Pete O'Hara wrote:

Date: Mon, 11 Feb 2002 17:44:52 -0500
From: Pete O'Hara <pete(_at_)guardiandigital(_dot_)com>
To: procmail(_at_)Lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: procmail and tcp

Hi,
I am new to procmail and have searched archives and google
without much success. My question: Does procmail have the
capability to send output to a tcp port? Something that can
be put into a recipe where you could pipe the output to
localhost:12000. I am trying to use procmail as a content
filter for the MTA Postfix where it could send it's output
to a virus scanner listening on localhost:some port. I
wanted to accomplish this without writing anything in perl
that would be a resource consumer.

TIA,
Pete



        A little comic relief..   You can telnet to certain port
        with no perl or C programing.  for example telnet to SMTP
        (port 25) will be:

(
echo "EHLO  dada.eng.tau.ac.il"
sleep 1
echo "MAIL From: uuddii(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il"
sleep 1
echo "RCPT To: david(_at_)eng(_dot_)tau(_dot_)ac(_dot_)il"
sleep 1
echo "DATA"
sleep 1
echo "hello world"
echo "and bye"
sleep 1
echo "."
sleep 1
echo "QUIT"
) | telnet localhost 25


        Now, the question is, do you realy want to put a monster like
        this in your procmailrc:

| (cat .... | telnet localhost 12000)

        What is the output that you expect?  You can use a named-pipe
        to read the output:

                mkfifo  /tmp/FFF
                script | telnet localhost 12000 >> /tmp/FFF

        when the script reads the /tmp/FFF as input file.

        ! Let's back to procmail !

Bye,
 Udi

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>