Default Address Pipe to Program using value from Global Email Filters
I think I found a bug, as follows.
I want to hand off from exim to another program (procmail) for filtering, so I am using "pipe to program" under both Global Email Filters and Default Address, using two different config files for the two different cases. Now, Default Address doesn't allow piping to programs outside one's homedir, so I made a perl script wrapper for the filter program.
According to /etc/vfilters/mydomain.tld, I've got
pipe "/usr/bin/procmail -Y -p /etc/procmailrc"
Which is correct.
According to /etc/valiases/mydomain.tld, I've got
*: |/home/myusername/bin/myprocmailscript.pl
Which is also correct.
When I send a test mail to a non-existent address at my domain, to trigger the Default Address case, it does not call the perl script assigned under Default Address. Instead, it calls the bare procmail call for the domain in /etc/vfilters/mydomain.tld. This is confirmed by both the actual behavior of the system and the logs in WHM which shows:
Delivered To: |/usr/bin/procmail -Y -p /etc/procmailrc
Which is very much not right.
-
Hey hey! Let me do some testing with this and I'll let you know what I find!
0 -
As of this time, I wasn't able to reproduce the issue. I used the cPanel >> Default Address page to configure the Pipe to Program option, and configured it like yours:
#cat /etc/valiases/domain.com
*: |/home/username/myprocmailscript.plEven though that file doesn't exist, I do see Exim trying to call it in the logs when I send a test message to a nonexistent email address on the domain:
2024-01-01 21:47:19 1rKUoH-00H6XU-0N ** |/home/username/myprocmailscript.pl (randomaddress@domain.com) <randomaddress@domain.com> R=central_filter T=virtual_address_pipe: Child process of virtual_address_pipe transport returned 127 (could mean unable to exec or command does not exist) from command: /home/domain/myprocmailscript.pl
so that indicates that it is looking for the script properly, at least on my end.
I did a second test with the Pipe option configured under the Global Filters page, and received the same result.
If your license is purchased through us, we'd be happy to take a look directly at the system for you!
0
Please sign in to leave a comment.
Comments
2 comments