Email Forwarder: Pipe to program failed

Dec 5, 2021
11
2
3
Belgium
cPanel Access Level
Website Owner
I am trying out the pipe to program feature of the email forwarders.

I began by making a little program in Rust. The program just created a text file at the same folder as the program itself is, and it wrote the parameters you give to it as an argument. I ran the program on my computer
Bash:
./my-program "argument"
. And it worked perfectly. (I also ran
Bash:
chmod 0700 my-program
as explained in the docs. I then put this program in the root folder of the server. In the forwarders section of cPanel I then set up a forwarder and tried sending an email to that email. It did not create a text file. In the "Track delivery" section (don't know if I translated that correctly), I saw a failure, in the result column it said "Child process of jailed_virtual_address_pipe transport returned 1 from command: /usr/local/cpanel/bin/jailexec".

I thought this might have something to do with the fact that I'm creating a text file. So then I made a program that stores the arguments in a firebase realtime database. Again, running it locally worked, but when I put the program on the server and set up the forwarder, I again got the same error.

Does anyone have any experience with this error, or does anyone have any great tutorials or resources on the subject?

In case it can help, here is the program I made that stores the arguments in firebase realtime database (written in Rust).

Code:
extern crate firebase_rs;
use std::env;

fn main() {
    println!("Hello, world!");

    let args: Vec<String> = env::args().collect();
    let mut arg_str: String = String::new();
    for arg in args {
        arg_str = format!("{} - {}", arg_str, arg)
    }

    let _firebase = firebase_rs::Firebase::new("https://email-test-76e8c-default-rtdb.europe-west1.firebasedatabase.app/").unwrap();
    let users = _firebase.at("data").unwrap();
    let _d1 = "{\"response\": \"";
    let _d2 = "\"}";
    let d = format!("{}{}{}", _d1, arg_str, _d2);
    let res = users.set(&d).unwrap();
    println!("{:?}", res);
}
 
  • Like
Reactions: cPanelAnthony