The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

email piping?

Discussion in 'E-mail Discussions' started by mamady, Dec 3, 2002.

  1. mamady

    mamady Member

    Joined:
    Jun 15, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    is it possible to setup email piping on an account? The account is on a shared server, and im not looking to change the MX records and use another mail server.

    Is there anyway to setup the email on the account to go through a CGI script?
    Any instructions or web links that have tutorials/information on this topic would be helpful.
     
  2. mamady

    mamady Member

    Joined:
    Jun 15, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    nope, no instructions with the script; as far as i know its a custom script made by one of my clients.

    i was told it was not possible to do this on an account on a shared server, which is why im asking.
     
  3. Noldar

    Noldar Well-Known Member

    Joined:
    Jun 26, 2002
    Messages:
    64
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ponchatoula, LA
    You should be able to edit the file /etc/valiases/youdomain.com and add something like this:

    email@yourdomain.com: |/usr/bin/perl /path_to_script/script.cgi

    That's assuming it's a perl script.

    Richard
     
  4. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    Go into your control panel, and go into the mail management section. Setup a forwarder. for the address field put in the address you want to forward mail from. and for the forward to field enter | /path/to/the/script.pl

    then click add forward.
     
  5. Sketch

    Sketch Active Member

    Joined:
    Jan 1, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Baltimore, MD
    Assuming I send this to a PHP script instead, what do I need to do to verify that the contents of the email are being passed to the script. As it is now, when I run the PHP script, I assume I'd see the contents of the mail in the file, but this is not the case.

    Tips?

    Aaron
     
  6. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    all the pipe does is pass the emails source to the script. What the script does with it after that is another story.
     
  7. Sketch

    Sketch Active Member

    Joined:
    Jan 1, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Baltimore, MD
    [quote:9ab1d9dc0f][i:9ab1d9dc0f]Originally posted by shaun[/i:9ab1d9dc0f]

    all the pipe does is pass the emails source to the script. What the script does with it after that is another story.
    [/quote:9ab1d9dc0f]I'm aware of that. That's why I asked what I need to do to verify the contents of the email made it to the script. You know if I pass a variable via POST to a page, all I have to do to verify the variable got there is:

    echo $_POST['var'];

    So....what do I need to do to verify that the script &has& the email because as of now I have no clue if the piping is working.

    Thanks.
    Aaron
     
  8. AceWeb

    AceWeb Well-Known Member

    Joined:
    Aug 9, 2002
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    [quote:16a406c3fc][i:16a406c3fc]Originally posted by shaun[/i:16a406c3fc]

    Go into your control panel, and go into the mail management section. Setup a forwarder. for the address field put in the address you want to forward mail from. and for the forward to field enter | /path/to/the/script.pl

    then click add forward.

    [/quote:16a406c3fc]

    Really?

    I tried it before and it never works via cpanel. I always had to edit the file manually.
     
Loading...

Share This Page