#1  
Old 28th October 2007, 19:52
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pipe Emails

Hey,

I am trying to write a script for my ISPConfig install. I am trying to pipe an e-mail to my php script but I am getting this error:

cannot append message to destination file
/var/www/web7/web/network/email/email.php: cannot open file: Permission denied

This is my config:

.forward:

|/usr/bin/php /var/www/web7/web/network/email/email.php

email.php: chown - postfixostfix chmod - 755

<?php
// read from stdin
$fd = fopen("php://stdin", "r");
$email = "";
while (!feof($fd)) {
$email .= fread($fd, 1024);
}
fclose($fd);
$message = 'bla' ;
mail('chris@skateeast.net', 'Backups', $message);
?>

Any help would be great!!!

Many Thanks

Chris.
Reply With Quote
Sponsored Links
  #2  
Old 28th October 2007, 20:17
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok,

I have made some changes and this is not working, I am going to look at other ways of doing this.
Reply With Quote
  #3  
Old 29th October 2007, 16:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

What's the output of
Code:
ls -la /var/www/web7/web/network/email
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 29th October 2007, 17:37
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey,

This is the out put:

-rwxr-xr-x 1 web7_techtest phpmyadmin 211 2007-10-28 18:01 email.php


Many Thanks
Reply With Quote
  #5  
Old 30th October 2007, 18:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Can you post the full output? I wanted to see the permissions of /var/www/web7/web/network/email as well.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 31st October 2007, 20:37
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ah sorry!!!

total 44
drwxr-xr-x 3 root root 4096 2007-10-29 02:43 .
drwxrwxrwx 11 root root 4096 2007-10-31 12:27 ..
-rwxrwxrwx 1 root root 2247 2007-10-27 17:47 attachmentread1.class.php
-rwxrwxrwx 1 root root 3651 2007-10-28 00:09 attachmentread.class.php
-rwxr-xr-x 1 postfix postfix 307 2007-10-28 17:50 email1.php
-rwsr-sr-x 1 web7_techtest phpmyadmin 211 2007-10-28 18:01 email.php
-rwxrwxrwx 1 root root 495 2007-10-28 23:56 readattachment.php
-rw------- 1 root root 478 2007-10-29 02:43 readattachment.php.save
drwxr-xr-x 2 root root 4096 2007-10-28 00:06 test
-rw-r--r-- 1 root root 804 2007-10-28 00:19 test.php
-rw-r--r-- 1 root root 23 2007-10-29 00:32 test.pl
Reply With Quote
  #7  
Old 31st October 2007, 20:38
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sorry

ah sorry!!!

total 44
drwxr-xr-x 3 root root 4096 2007-10-29 02:43 .
drwxrwxrwx 11 root root 4096 2007-10-31 12:27 ..
-rwxrwxrwx 1 root root 2247 2007-10-27 17:47 attachmentread1.class.php
-rwxrwxrwx 1 root root 3651 2007-10-28 00:09 attachmentread.class.php
-rwxr-xr-x 1 postfix postfix 307 2007-10-28 17:50 email1.php
-rwsr-sr-x 1 web7_techtest phpmyadmin 211 2007-10-28 18:01 email.php
-rwxrwxrwx 1 root root 495 2007-10-28 23:56 readattachment.php
-rw------- 1 root root 478 2007-10-29 02:43 readattachment.php.save
drwxr-xr-x 2 root root 4096 2007-10-28 00:06 test
-rw-r--r-- 1 root root 804 2007-10-28 00:19 test.php
-rw-r--r-- 1 root root 23 2007-10-29 00:32 test.pl
Reply With Quote
  #8  
Old 1st November 2007, 20:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Looks ok. Do you get any errors when you run
Code:
/usr/bin/php /var/www/web7/web/network/email/email.php
on the shell?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 2nd November 2007, 17:07
kippi kippi is offline
Junior Member
 
Join Date: Nov 2006
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't get any errors, it just sits there, and does nothing.

Thanks

Chris.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Broken pipe: core_output_filter: writing data to the network memphis Server Operation 2 19th July 2007 15:36
I get no emails - Postfix Problem Lausch Installation/Configuration 4 11th May 2007 02:53
sargeDebian GNU/Linux, kernel 2.6.8-3-686 and Debian kernel 2.6.8 386- qiu Kernel Questions 23 25th April 2006 16:53
Cannot receive emails skeeta Installation/Configuration 18 22nd April 2006 17:02
Emails received but I cannot read them skeeta Installation/Configuration 2 28th August 2005 13:24


All times are GMT +2. The time now is 19:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.