Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    cards4success
    Guest

    Question eMail Piping to perl script PLUS copy to specific pop account (via cPanel)

    We need to realize the following as part of an autoresponder system:

    All unrouted emails are to be piped to a perl script AND a copy of those emails should be send to a specific pop account.

    We have set the default address (through cPanel) to be piped to the perl script as follows:

    PHP Code:
    default address: |/usr/bin/perl /home/user/public_html/cgi-bin/folder1/script.pl 
    All works fine, with the exception that we do not receive the mails which are handled by the perl script.


    How do we need to modify the above to get

    a) a copy of each mail to be sent to a specific pop account (pop@domain.com)

    and

    b) to continue to get the mail piped through the above perl script?
    Any help is highly appreciated.

    Thanks so much in advance.

  2. #2
    Member bamasbest's Avatar
    Join Date
    Jan 2004
    Posts
    531

    Default

    Sounds to me like there may be some issues with the perl script itself.

    When you say that "all works fine ...." I can assume that these unrouted emails are being captured. Just seems to be a problem with the algorithms for filtering and mailing?

  3. #3
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default

    What about:

    *: default@address, |/path/to/script

    I hope you realise that almost all spam comes with forged From: and Reply-to: headers.

  4. #4
    Member bamasbest's Avatar
    Join Date
    Jan 2004
    Posts
    531

    Default

    Originally posted by Juanra
    What about:

    *: default@address, |/path/to/script

    I hope you realise that almost all spam comes with forged From: and Reply-to: headers.
    Certainly!

    Unadressed/unrouted email seems to be piping to your perl script. The question... what is your script doing with it? If it is supposed to validate and filter headers based upon certain regex paramaters, discard those that fail and email those that pass, there may be a syntax error in the code.

    Can you at least execute your script with a -w and pass some test paramaters through to see what/where things may be getting stuck?

  5. #5
    cards4success
    Guest

    Default

    Originally posted by Juanra
    What about:

    *: default@address, |/path/to/script

    If I enter the above in the field for the default address and confirm the changes then only the piping will be carried out and the first part (the one in front of the comma) will be neglected. When I check on the settings for the default address only the piping part is showing up: |/path/to/script but not the part that covers the default@address.

    If I switch the order to
    *: |/path/to/script, default@address
    then all unrouted mail is simply going to the default address but not being piped to the script.

    It seems as -when there is a comma- only the part that follows the comma is being saved and carried out.

    Anyhow, the script itself is working fine. I used to run that one on another (virtual) server with a different hosting company, also with cPanel but obviously with a different theme (still figuring out which one). There I had the change through the cPanel to setup a default address in a two step process:

    1. to chose an email address (pop account) where all unrouted email is being sent to

    and in a second step:

    2. to set up a pipe to a script.

    There was a second box for the *additional* piping option.

    In other words the scripts works as it is supposed to but I need to set up the mail server to send a copy of each incoming unrouted mail to the default address AND to pipe the mail to the script.

    As mentioned above I simply need to know the syntax how to make the cPanel default address settings understand that BOTH commands (maill to be piped to script and copy to be sent to default@address).

    The "," solution seems not to work...

    Any suggestion would be highly appreciated.

    Thanks in advance.

  6. #6
    Member bamasbest's Avatar
    Join Date
    Jan 2004
    Posts
    531

    Default

    Now I See!!!

    Just change your default address to the pipe

    | /path/to/perl/script

    You don't need the

    *: default@address,

  7. #7
    cards4success
    Guest

    Default

    Forgive me my noobness... but maybe I am blindfolded...

    I had set my default address to: |/usr/bin/perl /home/user/public_html/cgi-bin/folder1/script.pl

    and as I said, the piping works fine, the incoming unrouted emails are being piped to the (autoresponder) script and assigned the individual autoresponder-series. BUT the email itself gets lost as I do NOT get them sent as copy to my pop account. I know that I have to set up that through cPanel, but still don't know how to do that (i.e. how to get

    a) the mail to be piped to the script (that part works fine)

    AND

    b) to get a copy of the mail delivered to a specific email address / pop account (just in case I need to actually READ what is in the mail which was sent and handled by the script).

    Sorry again for my newbie questions... but as I mentioned before, I know that it works somehow but I still do not know the exact settings.

    Confused greetings...

Similar Threads & Tags
Similar threads

  1. Logs To Find IP That Checks Specific POP Account
    By orty in forum E-mail Discussions
    Replies: 6
    Last Post: 12-18-2010, 01:47 AM
  2. Logs To Find IP That Checks Specific POP Account
    By orty in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-02-2010, 08:38 PM
  3. Piping email to script question.
    By SosyMe in forum E-mail Discussions
    Replies: 1
    Last Post: 06-08-2010, 08:57 PM
  4. Replies: 1
    Last Post: 06-20-2003, 01:57 PM
  5. piping mails through perl script
    By pampam in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-27-2003, 04:34 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube