CyberHosting

Email forwarding Pipe to a Program

Can you add a feature in email forwarding "Pipe to a Program" like as cPanel?

For WHMCS I use whmcs piping option. It would be better if you add this option in Email forwarding.

Comments

  • Also, +1 to this needs a proper gui support for those switching from cPanel > cyberpanel who are running osticket whmcs etc which uses email piping for support tickets.
    https://docs.whmcs.com/Email_Piping


    Looks like it should be doable with postfix which is what Cyberpanel uses for the email server.
    https://www.anthonyhawk.com/Linux/osticket-pipe-emails-postfix.html

    You may have some luck with this method.

    for example from cPanel I'm migrating a whmcs from.

    How it looks in cPanel

    [root@vcloud ~]# cat /etc/valiases/example.com
    billing@example.com: "|/opt/cpanel/ea-php73/root/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    sales@example.com: "|/opt/cpanel/ea-php73/root/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    sharedsupport@example.com: "|/opt/cpanel/ea-php73/root/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    support@example.com: "|/opt/cpanel/ea-php73/root/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpnsupport@example.com: "|/opt/cpanel/ea-php73/root/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpssupport@example.com: "|/opt/cpanel/ea-php73/root/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"


    Cleaned up with proper paths in cyberpanel
    billing@example.com: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    sales@example.com: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    sharedsupport@example.com: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    support@example.com: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpnsupport@example.com: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpssupport@example.com: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"

    Setup aliases in /etc/postfix/virtual

    billing@example.com billingalias
    sales@example.com salesalias
    sharedsupport@example.com sharedsupportalias
    support@example.com supportalias
    vpnsupport@example.com vpnsupportalias
    vpssupport@example.com vpssupportalias

    [root@wcloud ~]# grep -Ev '^#' /etc/postfix/virtual
    billing@example.com billingalias
    sales@example.com salesalias
    sharedsupport@example.com sharedsupportalias
    support@example.com supportalias
    vpnsupport@example.com vpnsupportalias
    vpssupport@example.com vpssupportalias
    [root@wcloud ~]#


    Setup pipes based on the aliases defined above inside /etc/aliases
    billingalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    salesalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    sharedsupportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    supportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpnsupportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpssupportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"

    [root@wcloud ~]# grep -Ev '^#' /etc/aliases | grep alias
    billingalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    salesalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    sharedsupportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    supportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpnsupportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    vpssupportalias: "|/usr/bin/php -q /home/username/public_html/my.example.com/crons/pipe.php"
    [root@wcloud ~]#

    As root:
    postmap /etc/postfix/virtual
    systemctl restart postfix # or service postfix restart
    newaliases





  • Also, +1 to this needs a proper gui support for those switching from cPanel > cyberpanel who are running osticket whmcs etc which uses email piping for support tickets.
    https://docs.whmcs.com/Email_Piping

    I have tried this and I keep getting:

    User unknown in virtual alias table. I have tried for days to get this piping to work... would REALLY love to see this as a feature for the GUI because this is a nightmare trying to do all this via command line and files not loading / working.

    Any suggestions?

  • Can you provide the output of

    grep -Ev '^#' /etc/postfix/virtual
    grep -Ev '^#' /etc/aliases


Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!