Bjørn Knudsen heeft op vrijdag, 24 okt 2003 om 16:59 (Europe/Amsterdam) het volgende geschreven:

This issue has been discussed several times on this list already..
Isn't it in the howto or readme or something? (if not it should be)

In the alias table of dbmail you have to use ! Instead of pipe (|)..


hmm.. well.. if you use the pipe (|) it will pipe the mail to the specified command (which is opened using pipe()); if you use ! the dbmail-smtp will pipe like using | but prepend an mbox-style header to the message. The used format is of the header is:

From<space>address<space><space>Date

as you can read in forward.c (somewhere near line 140).

regards roel

Even tho' php seems to be a weird solution for piping messages, but this
should do the trick.


Regards,
Bjorn Knudsen
HiperCom AS
Norway


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Paul J Stevens
Sent: 23. oktober 2003 13:54
To: [email protected]
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




_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail


_________________________
R.A. Rozendaal
IC&S
T: +31 30 2322878
F: +31 30 2322305
www.ic-s.nl

Reply via email to