How to read the standard input to get the message contents?
The only thing I can do is: forward the message to a specific directory, read it
and pickup the necessary information.
Thank you!
----- Original Message -----
From: Sam Varshavchik <mrs...@courier-mta.com>
To: <cour...@lists.sourceforge.net>
Sent: Thursday, November 16, 2000 10:05 AM
Subject: Re: [courier-users] Maildrop or courierdeliever Extention Problem
On Thu, 16 Nov 2000, maillist wrote:
Now I got a problem, _guest what_
The Truth is: I want to send the email arrival notification when email
arrives inside. Since the maildrop is the primary delievery agent, I
wanna add some codes at the end of the maildrop to forward part of the
message information to a TCP, UDP whatever ports for other programs
use. So the user can get the instant message arrival notification.
Now the problem is: I really can not locate the right place to add the
codes(getting email information, selecting right place in maildrop or
courierlocal, courierdeliever), please give me some clue on how to do
it, OK?
What you should do is to add some code to the end of a maildrop recipe, or
the .courier file to run your program that sends the message information.
No need to modify anything. For example:
$ cat $HOME/.courier
./Maildir
| /usr/local/bin/delivery_notice
Your program will be executed after Courier delivers each message, and you
can get the sender information from the environment, or even read the
contents of the message from standard input.