I am making a Java Sendmail Delivery Agent and cant read System.in
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   john_putnam
Posted On:   Monday, December 10, 2001 01:46 PM

I am writing a Java Sendmail delivery agent to log sent mail into a DB. I seem unable to pick up the mail from the System.in stream. The arguments come across as expected, but it seems not to get any standard input. The program is run from a shell script that sets the appropriate paths and class paths and envirionment variables. When run stand alone with a file re-directed into the script, it works i.e. localDA arg1 arg2 will see the two arguments and the t.txt file as the input. but when connected to the Mlocal in the sendmail config I only get the arguments and it hangs till it times out. I send mail to it with /u   More>>


I am writing a Java Sendmail delivery agent to log sent mail into a DB.
I seem unable to pick up the mail from the System.in stream. The arguments
come across as expected, but it seems not to get any standard input. The program
is run from a shell script that sets the appropriate paths and class paths and envirionment
variables. When run stand alone with a file re-directed into the script, it works i.e.




localDA arg1 arg2




will see the two arguments and the t.txt file as the input.



but when connected to the Mlocal in the sendmail config I only get the arguments
and it hangs till it times out. I send mail to it with



/usr/lib/sendmail -v username



If I have the normal delivery agent attached it works as expected and mail with the
body from file is sent.


When I change the Mlocal to my script it does not. If I c the
above send, it sends a >>QUIT to the delivery agent which does
get picked up as standard input and included in the file.

   <<Less
About | Sitemap | Contact