Jump to content
  • 0

Piping Emails.


Michael

Question

I've forgot how to set this up correctly I've tried a old way (Blesta 3.0.0 Beta) and a way blesta 3.0.0 said. It's not a Blesta issue it's me configuring it up :).

 

 

|/home/username/public_html/index.php plugin/support_manager/ticket_pipe/index/1/

 

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  pipe to |/home/username/public_html/index.php plugin/support_manager/ticket_pipe/index/1/
    generated by sales@cubicwebs.co
    local delivery failed

The following text was generated during the delivery attempt:

------ pipe to |/home/username/public_html/index.php plugin/support_manager/ticket_pipe/index/1/
       generated by sales@cubicwebs.co ------

Could not exec '/home/username/public_html/index.php'

------ This is a copy of the message, including all the headers. ------

Return-path: <mike@cubicwebs.co>
Received: from localhost.localdomain ([127.0.0.1]:60525 helo=cubic2.cubicwebs.com)
	by cubic2.cubicwebs.com with esmtpa (Exim 4.80.1)
	(envelope-from <mike@cubicwebs.co>)
	id 1VA8mg-00031I-D3
	for sales@cubicwebs.co; Fri, 16 Aug 2013 02:25:07 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 16 Aug 2013 02:24:57 +0100
From: mike@cubicwebs.co
To: Billing Department <sales@cubicwebs.co>
Subject: Testing Emails from CubicWebs.
Message-ID: <f3d3ba4aa29b78aef57bedfaee8271f4@cubicwebs.co>
X-Sender: mike@cubicwebs.co
User-Agent: Roundcube Webmail/0.9.1

Testing

 

|/home/cwadminb/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/2/

 

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  pipe to |/home/username/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/2/
    generated by sales@licensecart.com
    local delivery failed

The following text was generated during the delivery attempt:

------ pipe to |/home/username/public_html/plugins/support_manager/pipe.php plugin/support_manager/ticket_pipe/index/2/
       generated by sales@licensecart.com ------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" lang="en-us" dir="ltr">
	<head>
		<title>Blesta</title>
		<link rel="stylesheet" type="text/css" href="/app/views/errors/css/styles.css" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	</head>

	<body>
			<div class="program_error">
		<h3>Oh noes!</h3>
		<div class="contents">
			<p>session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent on line <strong>170</strong> in <strong>/home/username/public_html/components/session/session.php</strong></p>
		</div>
	</div>	</body>
</html>
------ This is a copy of the message, including all the headers. ------

Return-path: <mike@cubicwebs.co>
Received: from localhost.localdomain ([127.0.0.1]:60500 helo=cubic2.cubicwebs.com)
	by cubic2.cubicwebs.com with esmtpa (Exim 4.80.1)
	(envelope-from <mike@cubicwebs.co>)
	id 1VA8lH-0002xn-ER
	for sales@licensecart.com; Fri, 16 Aug 2013 02:23:31 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Fri, 16 Aug 2013 02:23:31 +0100
From: mike@cubicwebs.co
To: sales@licensecart.com
Subject: Testing Emails from CubicWebs.
Message-ID: <45dc599be78c92dae0a91273df75fb22@cubicwebs.co>
X-Sender: mike@cubicwebs.co
User-Agent: Roundcube Webmail/0.9.1

Testing this email.

Thanks for any suggestions guys.

Link to comment
Share on other sites

24 answers to this question

Recommended Posts

  • 0

Ah I see, is there a way I could say use the index style haha. That way worked for me and I think Kyle had it working that way. 

 

Or a option in the settings in 3.1.0 where you choose which to use index.php or the pipe.php so people like directadmin can use pipe.php and we can use the index.php for cPanel.

 

You can, just change the path to pipe.php to index.php, make sure to keep all the other parameters.

 

 

Will pipe pho work to pipe email from main domain when blesta is hosted under subdomain on a seperate account as well?

 

Yes, so long as the server handles mail for the primary domain.

Link to comment
Share on other sites

  • 0

session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent on line <strong>170</strong> in <strong>/home/username/public_html/components/session/session.php

 

something wrong with the php file , not the settings

 

 

Cannot send session cookie - headers already sent on line

Link to comment
Share on other sites

  • 0

I take it cpanel has added the # .

/usr/bin/php (or wherever you have php file installed) to the top of the pipe.php file?

Check that it has not added any new blank lines or a space.

Had this problem before when dealing with sessions (not blesta), and it was caused be a space at the top of the file.

Might not be related, but my piping is working.

Link to comment
Share on other sites

  • 0

I take it cpanel has added the # .

/usr/bin/php (or wherever you have php file installed) to the top of the pipe.php file?

Check that it has not added any new blank lines or a space.

Had this problem before when dealing with sessions (not blesta), and it was caused be a space at the top of the file.

Might not be related, but my piping is working.

Not sure mate in /home/username/public_html/plugins/support_manager/pipe.php

 

I have:

 

#!/usr/bin/php -q
<?php
try {
	include(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "lib/init.php");
	
	// Dispatch the Web request
	if (!empty($_SERVER['REQUEST_URI']))
		Dispatcher::dispatch($_SERVER['REQUEST_URI']);
	// Dispatch the CLI request
	else
		Dispatcher::dispatchCli($argv);
}
catch (Exception $e) {
	try {
		// Attempt to raise any error, gracefully
		Dispatcher::raiseError($e);
	}
	catch (Exception $e) {
		if (Configure::get("System.debug"))
			echo $e->getMessage() . " on line <strong>" . $e->getLine() .
				"</strong> in <strong>" . $e->getFile() . "</strong>\n" .
				"<br />Printing Stack Trace:<br />" . nl2br($e->getTraceAsString());
		else
			echo $e->getMessage();
	}
}
?>
Link to comment
Share on other sites

  • 0

pipe.php was created in an attempt to resolve this issue. Previously it was piped to public_html/index.php and people had trouble because there was no hashbang in the file. Some people allowed cPanel to add the hashbang itself, and got it working but this seemed less than ideal, which is why we created pipe.php.

 

Email piping and the way various different panels implement it in their UI seems to vary.

Link to comment
Share on other sites

  • 0

pipe.php was created in an attempt to resolve this issue. Previously it was piped to public_html/index.php and people had trouble because there was no hashbang in the file. Some people allowed cPanel to add the hashbang itself, and got it working but this seemed less than ideal, which is why we created pipe.php.

 

Email piping and the way various different panels implement it in their UI seems to vary.

Ah I see, is there a way I could say use the index style haha. That way worked for me and I think Kyle had it working that way. 

 

Or a option in the settings in 3.1.0 where you choose which to use index.php or the pipe.php so people like directadmin can use pipe.php and we can use the index.php for cPanel.

Link to comment
Share on other sites

  • 0

pipe.php was created in an attempt to resolve this issue. Previously it was piped to public_html/index.php and people had trouble because there was no hashbang in the file. Some people allowed cPanel to add the hashbang itself, and got it working but this seemed less than ideal, which is why we created pipe.php.

 

Email piping and the way various different panels implement it in their UI seems to vary.

 

Will pipe pho work to pipe email from main domain when blesta is hosted under subdomain on a seperate account as well?

Link to comment
Share on other sites

  • 0

You can, just change the path to pipe.php to index.php, make sure to keep all the other parameters.

 

 

 

Yes, so long as the server handles mail for the primary domain.

 

Thanks mate this solved my issue: /usr/bin/php /home/username/public_html/index.php plugin/support_manager/ticket_pipe/index/2/

Link to comment
Share on other sites

  • 0

Thanks!! 

 

That solved my problem also! I had to tweak mine because of differences in setup. The 1 at the end signifies company number 1, and then most people also don't have the members/ in their url.

 

/usr/bin/php /home/username/public_html/members/index.php plugin/support_manager/ticket_pipe/index/1/

 

This is solved!

Link to comment
Share on other sites

  • 0

Thanks!! 

 

That solved my problem also! I had to tweak mine because of differences in setup. The 1 at the end signifies company number 1, and then most people also don't have the members/ in their url.

 

/usr/bin/php /home/username/public_html/members/index.php plugin/support_manager/ticket_pipe/index/1/

 

This is solved!

 

Thanks for confirming. I've updated the manual to display both methods http://docs.blesta.com/display/user/Support+Manager

Link to comment
Share on other sites

  • 0

Meh this joke is not funny cPanel :L

 

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  pipe to |/home/username/public_html/index.php plugin/support_manager/ticket_pipe/index/1
    generated by sales@cubicwebs.co
    local delivery failed

------ This is a copy of the message, including all the headers. ------

Return-path: <cubicwebs@gmail.com>
Received: from mail-la0-f53.google.com ([209.85.215.53]:41668)
        by cubic2.cubicwebs.com with esmtps (TLSv1:RC4-SHA:128)
        (Exim 4.80.1)
        (envelope-from <cubicwebs@gmail.com>)
        id 1VDjmn-0008SR-KX
        for sales@cubicwebs.co; Mon, 26 Aug 2013 00:32:00 +0100
Received: by mail-la0-f53.google.com with SMTP id el20so1827547lab.26
        for <sales@cubicwebs.co>; Sun, 25 Aug 2013 16:31:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:date:message-id:subject:from:to:content-type;
        bh=f67uNL0qUN4SveyEdKsD2hyqMwgVv2a96GKEMIB50u0=;
        b=y3SzijRNZQUQFDrm5HOAOLQpfcJgoSHyABegzWo1fFYan/M/TSSAtmldp47yfj6M89
         JSwlWHUbB7EZNOwRHwq4CWRTyzyZXvy+I3CAgJLwRup3mGbnF0D4r1fSCKoJlGFfOHyH
         DG1oh9FBDWHOpyB8bV3KH6fLGBF1cUzLOxTbvPTxVX2eIqeiLWKE3w6nz/q82Ni5Owgu
         yl6q1UY1AV/F/0DNjiFFRMoLtQ6XBLssctu6u3BvOQEW2MR4TIv2EaXCMLthuEagIDOU
         HejeJ8vYhFsRv1+FIJVVn5LcCaEMKIjAu4SolJ5UC4qDL2jYSD2r+yfSYo9GKJogFC+v
         66hg==
MIME-Version: 1.0
X-Received: by 10.152.3.201 with SMTP id e9mr4323268lae.24.1377473516655; Sun,
 25 Aug 2013 16:31:56 -0700 (PDT)
Received: by 10.112.55.70 with HTTP; Sun, 25 Aug 2013 16:31:56 -0700 (PDT)
Date: Mon, 26 Aug 2013 00:31:56 +0100
Message-ID: <CAFg25KHQamd+eBO8sYmhEcjQNNQjwd_i0Y9MvycwCQbhkouzyw@mail.gmail.com>
Subject: Last try 
From: Michael Dance <cubicwebs@gmail.com>
To: sales@cubicwebs.co
Content-Type: multipart/alternative; boundary=089e013d14caa5da1204e4ce0b3d

--089e013d14caa5da1204e4ce0b3d
Content-Type: text/plain; charset=ISO-8859-1

Testing piping.

--089e013d14caa5da1204e4ce0b3d
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr">Testing piping.</div>

--089e013d14caa5da1204e4ce0b3d--
Link to comment
Share on other sites

  • 0

The hasbang has to be readded to index.php or it won't work.

Already is mate.

 

#!/usr/bin/php -q
<?php
/* SVN FILE: $Id: index.php 52 2010-10-01 20:50:08Z cody $ */
/**
 * This file transfers control over to the dispatcher which will invoke the
 * appropriate controller. We also handle any exceptions that were not handled
 * elsewhere in the application, so we can end gracefully.
 *
 * @package       minPHP
 * @version       $Revision: 52 $
 * @modifiedby    $LastChangedBy: cody $
 * @lastmodified  $Date: 2010-10-01 13:50:08 -0700 (Fri, 01 Oct 2010) $
 */

$start = microtime(true);

try {
	include(dirname(__FILE__) . "/lib/init.php");
	
	// Dispatch the Web request
	if (!empty($_SERVER['REQUEST_URI']))
		Dispatcher::dispatch($_SERVER['REQUEST_URI']);
	// Dispatch the CLI request
	else
		Dispatcher::dispatchCli($argv);
}
catch (Exception $e) {
	try {
		// Attempt to raise any error, gracefully
		Dispatcher::raiseError($e);
	}
	catch (Exception $e) {
		if (Configure::get("System.debug"))
			echo $e->getMessage() . " on line <strong>" . $e->getLine() .
				"</strong> in <strong>" . $e->getFile() . "</strong>\n" .
				"<br />Printing Stack Trace:<br />" . nl2br($e->getTraceAsString());
		else
			echo $e->getMessage();
	}
}

$end = microtime(true);

// Display rendering time if benchmarking is enabled
if (Configure::get("System.benchmark"))
	echo "execution time: " . ($end-$start) . " seconds";
?>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...