Thanks for that.
It piped to the file fine when i tried that..
I'm still having trouble piping it to a php script..
i dont seem to be able to get any data into my php script from it.
maybe someone can shed some light on this for me..
im piping to..
'|/usr/local/cgsys/dbmail_tools/auto_responder.php'
but nothing seems to come through..
this is the php script im piping it to.. it is just a test script which
takes input from arguments and sends them field by field to the syslog:
-----------------------------------
#!/usr/local/cgiphp/bin/php -q
<?
while(list($key,$data)=each($argv)){
echo "\n".$key.":".$data;
syslog(LOG_INFO,$key.":".$data);
}
-----------------------------------------
when i tail the syslog, instead of seeing the expected mail message data, i
see this
--------------------
Oct 23 23:12:17 web2 php: 0:/usr/local/cgsys/dbmail_tools/auto_responder.php
--------------------
Please dont laugh too hard at my testing technique... its just a simple easy
test for me to see what arguments are being passed to the script...
the script works fine.
if i type this at the command line:
./auto_responder.php this is a test
i get this is in the syslog:
-------------------
Oct 23 23:15:25 web2 php: 1:this
Oct 23 23:15:25 web2 php: 2:is
Oct 23 23:15:25 web2 php: 3:a
Oct 23 23:15:25 web2 php: 4:test
-------------------
does anyone have any ideas?
Thanks guys... (Paul) ;)
Dan.
----- Original Message -----
From: "Paul J Stevens" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, October 23, 2003 9:53 PM
Subject: Re: [Dbmail] piping in the aliases table
>
>
> Daniel Bryant wrote:
> > Hi.
> >
> >
> > As i mentioned a few hours ago, im planning on writing a php script to
> > handle auto-responders.
> >
> > I plan on doing this by using the aliases table to pipe to a php script,
> > which will in turn query a database and check how many times an
> > autoresponse has been sent to a given email address and determine
> > whether or not it should send anything.. (to avoid mail looping
problems.)
> >
> > anyway... I guess the problem im having is getting the data to pipe out.
> >
> > Just for testing, i should be able to pipe the data to a file shouldnt
i?
> >
> > for example:
> > in the aliases table, i have an entry..
> > alias:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > deliver_to: |/test.txt
> >
> > From what i understand this should pipe the data to /test.txt shouldnt
it?
> > (yes i have set chmod 777 /test.txt for testing purposes.)
> > but nothing appears in the file..
>
> In what file ? In test.txt ?
>
> If you want to append to a file try:
>
> deliver_to: '|cat - >> /tmp/test.txt'
>
> If you want to pipe to a script try:
>
> deliver_to: '|/myscript.sh'
>
> where myscript.sh is really a script.
>
>
>
>
> >
> > Do i have this all wrong?
>
>
>
>
> --
> ________________________________________________________________
> Paul Stevens mailto:[EMAIL PROTECTED]
> NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
> The Netherlands________________________________http://www.nfg.nl
>
> _______________________________________________
> Dbmail mailing list
> [email protected]
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>