|
Subject
|
procmailrc not forwarding to script
|
| | Posted by | jpringle (DH New User
) | | Posted on | 08/06/06 08:11 PM |
|
|
In my home directory I created a php file called "test.php". When I call it from the command line (#/user/bin/local/php -q test.php) it works fine.
test.php ---------- #!/usr/local/bin/php -q <?php mail('my@email.com.com','Procmail test', 'incoming mail test'); ?>
So I made a basic .procmailrc file: ---------------------------------------- :0 |/usr/bin/local/php -q test.php
But I get nothing. I've read every post in tis forum on it, scoured google groups and read at least 10 tutorials. I've tried every possible combination. Verbose, setting a log file using a condition, but nothing seems to work.
It's like the .procmailrc file isn't getting called and used. Any ideas? thanks.
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: jpringle]
|
| | Posted by | sdayman (DH Smarty Pants) | | Posted on | 08/06/06 08:36 PM |
|
|
I'm no expert on procmail, but have you tried using the full path for test.php?
Oh, and is this an FTP user mail account, or one of those mXXXXXX ones? I don't think procmail works for the mail-only (mXXXXXX) accounts.
-Scott
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: jpringle]
|
| | Posted by | dot_null (DH Dreamling) | | Posted on | 08/07/06 01:20 PM |
|
|
You also need to make a ".forward.postfix" file that tells postfix to pipe the mail to procmail. Put the following in your .forward.postfix file (include quotes, but not the = sign) =======
"| /usr/bin/procmail -t"
=======
Hope this helps!
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: dot_null]
|
| | Posted by | jpringle (DH New User
) | | Posted on | 08/07/06 01:59 PM |
|
|
I have the .forward.postfix in place and it's exactly as you put. Thanks for the response.
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: sdayman]
|
| | Posted by | jpringle (DH New User
) | | Posted on | 08/07/06 02:01 PM |
|
|
Yea, I have tried the full path and this is an FTP shell account and not a mail only (mxxxxx) account. When will the clouds part? Thanks for the help.
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: jpringle]
|
| | Posted by | jpringle (DH New User
) | | Posted on | 08/08/06 00:15 AM |
|
|
So I spoke to customer support and they are telling me you can't pipe to php scripts any longer. I can only do it to perl. Well I tried to do that too with no luck. Something is not happening here. Calling perlMailHandler just write a log entry to a file right now. And it works fine when I run it but .procmailrc is not piping to this script. Any ideas?
:0 |/usr/local/bin/perl perlMailHandler
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: jpringle]
|
| | Posted by | BRoach (DH Dreamling) | | Posted on | 08/08/06 11:55 AM |
|
|
put: #!/usr/local/bin/perl
As the first line of your script, make it executable, and pipe to the script directly.
- BRoach
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: BRoach]
|
| | Posted by | jpringle (DH New User
) | | Posted on | 08/08/06 12:15 PM |
|
|
Thanks for the suggestions but I have that as the first line in the script.
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: jpringle]
|
| | Posted by | BRoach (DH Dreamling) | | Posted on | 08/08/06 03:30 PM |
|
|
Good. Then piping the email to the program, rather than the perl interpreter, should work.
|<scriptname>
|
|
|
|
Subject
|
Re: procmailrc not forwarding to script
[re: BRoach]
|
| | Posted by | embeddedrf (DH New User
) | | Posted on | 08/14/06 09:19 PM |
|
|
I am working on the same issue. I have created an entry in the DH WIKI as a way of keeping a record. It is at:
http://wiki.dreamhost.com/index.php/Email_to_Script
I am stuck at the forwarding of email. I figured I would use the intermediate step of forwarding email as it has been written about more. I can not get the forward to work an there is a strange folder under the username associated with the email name, it shows up as only { (yes left bracket and that is it !) When I send to the email that is suppose to forward to another email address I see the number of bytes in this directory gets bigger. However when I try to access the directory it throws an error and denies all knowledge of said directory.
Fred :)
|
|
|