procmail
[Top] [All Lists]

Re[2]: automatic PHP script ?

2003-02-28 10:49:13
At 15:34 2003-02-28 +0100, Toph Kemmann did say:

my script is been executed but I have another problem,

Lacking any other statement from you, I'll assume the newly added 'i' flag is what fixed it for you. Also, please avoid "TOFU" - quoting the entire text of a previous message when it isn't necessary.

#LOCKFILE=/var/lock/.lockmail
DROPPRIVS=no

This isn't a yes/no thing (you certainly don't undo a DROPPRIVS in any event). It's just "DROPPRIVS".

This php-script works with this special e-mail, it writes the attached
file into a database. But it does not, it says "nothing in e-mail". I
think the problem is, that procmail and the script are using the
e-mail at the same time and/or procmail write a temp-e-mail-file as
long as it works with it.

Uh, NO.

Procmail is piping the entire headers and body of the message to PHP.


Some suggestions:

1. If you aren't already, run a sandbox (see my .sig for information). It isn't fully applicable for some of the nuances of /etc/procmailrc scripts (notably DROPPRIVS), but for the "meat" of what you're doing, it should be fine.

        2. write a dead simple php script - take the input, dump it to a file.

3. throw a saved test message at that sandbox config. Watch it work - or if not, sort it out until it does. When you have it sorted, make appropriate changes to your real PHP script and update the sandboxed recipe. Throw test messages at that.

Alternatley, with email in a file, manually redirect it:

usr/local/bin/php /home/www/web1/html/getemail_auto.php >> /var/log/post.log < saved message


btw. where can I find a discription of the flags ":0:HWf..." and so
on, did?nt find anything on man procmail  ?

'man procmailrc', which I directed you to in my original response. See also the "see also" section of the procmail manpage, which describes the program invocation, not the rc file format.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.



_______________________________________________
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>