Osticket Piping Email From Postfix

This article is intended for those setting up osTicket and need to pipe emails from Postfix to osTicket’s pipe.php script. I prefer this method to the IMAP/POP3 sync method that osTicket also supports mostly due to its realtime nature. This is the easiest way to get the email piping to work correctly.

Edit /etc/postfix/virtual and add:

example@domain.com examplealias

Now edit /etc/aliases and add:

examplealias: "|/usr/bin/php -q /home/user/domains/domain.com/public_html/ticket/api/pipe.php"

Make sure the paths to PHP and to pipe.php are correct.

Now run the following commands and you should be in business!

# postmap /etc/postfix/virtual
# /etc/init.d/postfix restart
# newaliases