Forwarding mail through Pipe into Program Causing Problem

Hello,

I’m facing a problem for a long.
While i try to forward my mail using pipe into program, a weird problem is happening every-time. When i put the destination program and hit save, it is instantly stop receiving email in all the email i created even in every domain in my panel.

I have used “php -q /home/limda.net/public_html/client/crons/pipe.php” in forwarding option which causes mail receiving problem.
To automate my WHMCS ticketing system, i need to use this pipe program.

Please note that, pipe into program do not working properly even with a successful cron run.

After creating support ticket, brother Usman solved the email receiving issue as well as taught me the process to solve. But the problem happening every-time while i try to use this forwarding option.
Can anyone please tell me what procedure i should follow?

Thank you.

It looks like this issue was due to the dovecot conf missing some directives which caused it to stop working when using unix pipe filters with postfix.

Had to add this to /etc/dovecot/dovecot.conf

service stats {
unix_listener stats-reader {
user = vmail
group = vmail
mode = 0660
}

unix_listener stats-writer {
    user = vmail
    group = vmail
    mode = 0660
}

}

Also noticed the perms were 777 vs 755 which is what is required. So i set those for you as well

Before:
[root@limda ~]# stat /home/limda.net/public_html/client/crons/pipe.php
File: ‘/home/limda.net/public_html/client/crons/pipe.php’
Size: 87516 Blocks: 176 IO Block: 4096 regular file
Device: 800h/2048d Inode: 519968 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 5003/ limdane) Gid: ( 5003/ limdane)
Context: system_u:object_r:home_root_t:s0
Access: 2019-12-26 18:29:54.130000000 +0000
Modify: 2019-09-20 14:31:26.000000000 +0000
Change: 2020-01-14 17:44:27.737000000 +0000
Birth: -
[root@limda ~]#

After:
[root@limda ~]# chmod 755 /home/limda.net/public_html/client/crons/pipe.php
[root@limda ~]# stat /home/limda.net/public_html/client/crons/pipe.php
File: ‘/home/limda.net/public_html/client/crons/pipe.php’
Size: 87516 Blocks: 176 IO Block: 4096 regular file
Device: 800h/2048d Inode: 519968 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 5003/ limdane) Gid: ( 5003/ limdane)
Context: system_u:object_r:home_root_t:s0
Access: 2020-01-15 17:06:05.457000000 +0000
Modify: 2019-09-20 14:31:26.000000000 +0000
Change: 2020-01-15 17:06:59.656000000 +0000
Birth: -
[root@limda ~]#

Also, I set it to use the full path to php. This might not be needed but its always good to use the full path to minimize issues.
/usr/bin/php -q /home/limda.net/public_html/client/crons/pipe.php

I don’t have access to the WHMCS but it looks like its working how my WHMCS does when it gets an email via pipe so let us know if it’s working on your end when you can.

Thank you very much for such a well description. I’m really grateful to you that you have done everything for me.

Seems, piping is still not working in WHMCS. I’m sending you my WHMCS admin access by replying the last ticket.

Much love <3

This should be all sorted now. It’s hard to test piping when the this option is on unless testing from an email registered in the system as a client.
https://docs.whmcs.com/Email_Piping#Unregistered_Email_Address

Imgur

Plus if the admin is not assigned to that department it will not appear there despite it working.

As a courtesy went ahead and set up all the departments you had and tested them.

PM’mg you the email logins for the few you had created in WHMCS but not created in cyberpanel which wouldn’t have worked otherwise.

You also have two departments using the same email. They both had different settings. I recommend only having one department per email so whmcs does not get confused about where to open the ticket.
General Enquiries All Enquiries support@limda.net
Support For all support related questions support@limda.net

Should be all set now though.

Enjoy.

I’m grateful to you my brother.
Thanks a thousand. <3

can you let me know what version of cyberpanel you use ?
as i got the same broken stuff after i add a piping command

Unknown response from mail server (status code: 451)
4.3.5 <info@>: Recipient address rejected: Server configuration error

this only happends when i add piping to the system ( and caused by the -q command )

Thank you
Greets from PowerChaos