• Home
  • Features
  • Pricing
  • Documentation
  • Contact Us
  • Support
Sign In
Client Portal

Getting Started

  • Post-Install Setup Guide
  • Email Settings
  • Email Templates
  • POP3/IMAP Settings Guide
  • Email Piping
  • Upgrade and Migration

Guides

  • Alerts Guide
  • Translation Guide
  • OAuth2 Guide

Panels

  • Admin Panel
  • Agent Panel
  • User Portal

Features

  • Multifactor Authentication
  • Visibility Permissions
  • Previously Released

Plugins

  • Attachments in S3
  • Grievance App Audit
  • Two Factor Authentication
  • Password Management Policies
  • Attachments on the Filesystem

Developer Documentation

  • API
  • Changelog
  • Database ERDs
  • Home
  • Docs
  • Getting Started
  • Email Piping

Email Piping

The email piping is a technique of sending email message as an input to a program rather than appending the message to the mailbox file, allowing for real-time email delivery and handling. Every mail server has its own rules and procedures for mail delivery, making it hard to provide common instructions for configuring an MTA. You should refer to your hosting manual or contact your hosting provider for email piping instructions if none of the methods below works for you.

  1.  Grievance App supports both remote and local piping
  2. Email piping must be enabled in admin panel Note: This option appears to be removed from v1.7 – piping works without enabling.

Local Piping #

Local piping refers to the case where Grievance App is installed on a server also handling your emails. Most shared hosting users fall into this category.

SETTING UP ALIASES IN CPANEL

Add a forwarding rule for each of the email addresses to /path/to/api/pipe.php.

For example forward support@domain.com to “|/path/to/api/pipe.php”

CPANEL X INSTRUCTIONS

CPANEL -> Email -> Forwarders -> Add Forwarder

  1. Address to a forwarder: @domain
  2. Advanced Options -> Pipe to a Program: public_html/osticket/api/pipe.php
  3. Click ‘Add Forwarder’ button

When complete you will see:

@domain to |/home//public_html/osticket/api/pipe.php

  1. assumption is you unpackaged Grievance App.tar in /home/USERNAME/public_html/
  2. Pipe to a Program path: if you have a leading ‘/’ cPanel will use the path you enter, if you do not have ‘/’ cPanel will create it relative to your home directory
  3. pipe.php should have hashbang at the top of the file: #!/usr/bin/php -q
  4. Make pipe.php executable chmod 755 pipe.php
  5. Enable email piping in admin panel Settings -> preference Note: This option appears to be removed from v1.7 – piping works without enabling.

MAIL DELIVERY FAILED

If you have the error: ‘Mail delivery failed: returning message to sender’ but the user’s email is still successfully processed.

You have some options:

  1. Update php.ini

/usr/local/lib/php.ini update: display_errors Off

restart apache

  1. Update exim.conf

Update /etc/exim.conf in the section:

address_pipe:

driver = pipe

return_output

virtual_address_pipe:

driver = pipe

group = “${lookup{$domain}lsearch* {/etc/userdomains}{$value}}”

return_output

user = “${lookup{$domain}lsearch* {/etc/userdomains}{$value}}”

Change return_output to return_fail_output

REASON: (from exim.conf comment)

If the pipe generates any standard output, it is returned to the sender of the message as a delivery error. Set return_fail_output instead of return_output if you want this to happen only when the pipe fails to complete normally. You can set different transports for aliases and forwards if you want to – see the references to address_pipe below.

SETTING UP ALIASES WITH QMAIL

Create/Edit your .qmail-* for the domain you wish to forward and add a forwarding rule to /path/to/api/pipe.php. For example for support@domain.com .qmail-support file should contain |/path/to/api/pipe.php

SETTING UP ALIASES FOR SENDMAIL

Modify your aliases file by adding support: root, |/path/to/api/pipe.php and run newaliases.

SETTING UP ALIASES IN .PROCMAILRC

:0 c

* ^To.*support@domain.com

|/path/to/api/pipe.php

Remote Piping

Remote piping is useful when Grievance App installation and the mail server are on two separate machines. To maintain logic in one place remote piping is done over HTTP post to  Grievance App’s API.  Grievance App ships with two scripts to help you accomplish this task; automail.php and automail.pl. Both accomplish the same task by posting to http://www.yourdomain.com/ Grievance App/api/grievances.email (replace  Grievance App with the folder name where you installed  Grievance App)

  1. Remote host IP must be white listed in Admin Panel > Manage > API Keys
  2. Valid API key required
  3. Follow local piping instructions above to pipe emails to remote script which will in turn post to Grievance App

For technical details, please refer to API Docs.

 

Still stuck? How can we help?

How can we help?

Updated on May 21, 2025
POP3/IMAP Settings GuideUpgrade and Migration
Table of Contents
  • Local Piping

Want to receive news and updates?


    Fuel your business growth and witness immediate results today.

    Features
    • Grievance Routing
    • Mobile Submission
    • Anonymous Entry
    • Form Customization
    Resources
    • Support center
    • Documentation
    • Community Forums
    • Developer API
    Company
    • About us
    • Latest news
    • Success Stories
    • Careers
    Social
    • LinkedIn
    • Facebook
    • Twitter
    • Youtube

    © Grievance.app 2025. All Rights Reserved.

    • Terms & Conditions
    • Privacy Policy