KP Solutions

Solutions for Day to Day Technical Problems

OSTicket Setup Postfix Email Piping


Yesterday, I got a new server and was setting up a Ticketing server using OSTicket for one my sites. The installation of OSTicket went smooth per the documentation. However, the tricky part was to pipe the emails to osticket so that tickets get created and appended automatically without manual intervention. I searched on net and the information was terse and sparse at the best.

With bits and pieces here and there, many trials and errors and frustation, I finally figured out an easy way to do this. If you using CentOS (it may work on other flavors, but didn’t try it personally, so can’t vouch for it), then :

Say if you want to pipe the emails from ‘’ to ‘OS Ticket’, then edit ‘/etc/aliases’ and add the following line to bottom of the page:

support.domain: postmaster,”|/usr/bin/php -q /home/domain/public_html/api/pipe.php”

This will make sure that the email will be piped to the pipe.php of OSTicket and will create a new ticket or append a ticket depending on the email.

Just one line to do the email piping for Postfix mail server, but took me a day to get here! Hope you get to this post on first search!

Please feel free to leave the comments and join the discussion.



  • Yankee_sh

    I want it also , million thanks.

  • Artickl

     Thank you!!!

    BTW: after /etc/aliases changed – don’t forget to make
    # newaliases
    to update /etc/aliases.db, other way you will see error in `cat /var/log/mail.warn`
    > postfix/local[29268]: warning: database /etc/aliases.db is older than source file /etc/aliases