Remote Email Piping
Remote email piping can be used when wanting to use email piping, but the email account exists on a different server to the SupportPal installation. For example, your email server may be separate to your web server, where remote email piping would be useful.
- Go to Settings -> Tickets -> Departments, and either add a new department by click Add Department, or edit a department's email settings by clicking the name of the department or the pencil icon at the end of the row on which the department name is listed.
- On the Add Department or Edit Department screen, scroll down to Email Accounts. Make sure that Remote Email Piping is selected from the drop down menu next to Email Support. Enter the email address you would like to to use for email piping.
Download the remote email piping script from our downloads area. Open the included file
remote_pipe_handler(no extension) and edit line 19, replacing the example URL with the URL to your system URL followed by 'remote_pipe'.
To use 'Consume All Email' edit line 22, replacing
$pipeUrl = 'http://www.domain.com/support/remote_pipe';
nullwith a valid department email address. If you need to specify multiple consume all addresses, then we recommend to create multiple copies of the
remote_pipe_handlerfile and set different
Upload this file to the server with the email accounts on it.
$intended = null;
Set-up an email forwarder on your server. It should be called whenever an email is received by the mail server.
If PHP is not found on the system path, an error will be returned when you type "
php" in SSH. Once you locate the PHP executable, make sure to include that in the Remote Email Piping command. So, if PHP is located at /usr/bin/php, you would write, for example:
| /usr/bin/php -q /var/www/support/remote_pipe_handler
php -qis the PHP command to execute a PHP script from the command line.
Local Delivery Failed Error Message
If you receive a bounce email containing an error that states local delivery failed when sending an email to your piped address then the forwarder entry is not correct and the message is not being sent to the pipe script.
pipe to |/var/www/remote_pipe_handler generated by firstname.lastname@example.org local delivery failed
To correct this, first ensure the
remote_pipe_handler file permissions are set to chmod 755.
Example: Setting Up Remote Email Piping on cPanel
- Edit the URL in the
remote_pipe_handlerfile as described above and upload to a known location inside the
public_htmlfolder, in our example we're uploading to
- Set the
remote_pipe_handlerfile to CHMOD 755.
- Login to your cPanel account and click Forwarders under the Email section.
- Click Add Forwarder and type in the address you wish to forward, for example 'support' for 'email@example.com'.
- Click Advanced Options, select the Pipe to a program option and type in the path to the file, in our example
public_html/folder/remote_pipe_handler, then click Add Forwarder.
- Save the department with the email address entered and the email support set to Remote Email Piping.