Goldfish, A PHP Autoresponder Script

Discussion in 'HOWTO-Related Questions' started by jony127, Jun 23, 2009.

  1. jony127

    jony127 New Member

    Greetings, sorry for the translation ....

    I followed the steps in this guide

    http://www.howtoforge.com/goldfish-a-php-autoresponder-script

    to set up the autoresponder, but can not get to work, when I send an email to an autoresponder enabled the user does not respond, I've also found that it does not write anything in /var/log/goldfish is not as if the script is executed.

    Do you miss someone?
     
    Last edited: Jun 25, 2009
  2. jony127

    jony127 New Member

    Someone has to run this script, because I've followed all the steps and it does not work.

    Thank you.
     
  3. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your mail log?
     
  4. jony127

    jony127 New Member

    I found this error, when I tried running the script from cron as the root user from Vmail does nothing:

    From [email protected] Tue Jun 23 13:45:17 2009
    Return-Path: <[email protected]>
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: from localhost (localhost.localdomain [127.0.0.1])
    by mail.dominio.local (Postfix) with ESMTP id A84DFB276
    for <[email protected]>; Tue, 23 Jun 2009 13:45:17 +0100 (WEST)
    X-Virus-Scanned: Debian amavisd-new at mail.DOMINIO.LOCAL
    Received: from mail.dominio.local ([127.0.0.1])
    by localhost (mail.dominio.local [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id zb1+AHkNoHOw for <[email protected]>;
    Tue, 23 Jun 2009 13:45:01 +0100 (WEST)
    Received: by mail.dominio.local (Postfix, from userid 5000)
    id 99E0CB277; Tue, 23 Jun 2009 13:45:01 +0100 (WEST)
    From: [email protected] (Cron Daemon)
    To: [email protected]
    Subject: Cron <[email protected]> /usr/local/bin/autoresponder.php
    Content-Type: text/plain; charset=UTF-8
    X-Cron-Env: <SHELL=/bin/sh>
    X-Cron-Env: <HOME=/home/vmail>
    X-Cron-Env: <PATH=/usr/bin:/bin>
    X-Cron-Env: <LOGNAME=vmail>
    Message-Id: <[email protected]>
    Date: Tue, 23 Jun 2009 13:45:01 +0100 (WEST)

    /bin/sh: /usr/local/bin/autoresponder.php: /usr/bin/php: bad interpreter: No such file or directory


    Besides, I get this email at the address to which I turned autoresponder:

    Subject: Cron <[email protected]> /usr/local/bin/autoresponder.php
    Sender: [email protected] (Cron Daemon)
    recipient: [email protected]

    message: /bin/sh:/usr/local/bin/autoresponder.php: /usr/bin/php: bad interpreter: No such file or directory
     
  5. id10t

    id10t Member

    message: /bin/sh:/usr/local/bin/autoresponder.php: /usr/bin/php: bad interpreter: No such file or directory


    This part means either the shebang is missing (first line should be #!/usr/bin/php ) or php isn't installed there... do you have php with cli support installed?
     
  6. jony127

    jony127 New Member

    with cli support??? I do not know much php, following the guide to mount howtoforge mail server installed php with the commands:

    libapache2-mod-php5 php5 php5-mysql
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Try this:
    Code:
    aptitude install php5-cli
     
  8. jony127

    jony127 New Member

    ok, no I get the error message,

    reviewing the log of the goldfish I meet the following:

    2009-07-02 08:30:01 Connection to database established successfully
    2009-07-02 08:30:01 Database selected successfully
    2009-07-02 08:30:01 Successfully updated database (disabled entries)
    2009-07-02 08:30:01 Successfully updated database (enabled entries)
    2009-07-02 08:30:01 --------- End execution ------------
    2009-07-02 08:35:01 Connection to database established successfully
    2009-07-02 08:35:01 Database selected successfully
    2009-07-02 08:35:01 Successfully updated database (disabled entries)
    2009-07-02 08:35:01 Successfully updated database (enabled entries)
    2009-07-02 08:35:01 --------- End execution ------------


    that does not match the one listed in the guide:

    2009-06-08 07:00:01 Connection to database established successfully
    2009-06-08 07:00:01 Database selected successfully
    2009-06-08 07:00:01 Successfully updated database (disabled entries)
    2009-06-08 07:00:01 Successfully updated database (enabled entries)
    2009-06-08 07:00:01 Successfully fetched maildir directories
    2009-06-08 07:00:01 Successfully fetched subject of [email protected]
    2009-06-08 07:00:01 Successfully fetched message of [email protected]
    2009-06-08 07:00:02 --------- End execution ------------


    and I do not see any mail autoresponder
     
  9. falko

    falko Super Moderator ISPConfig Developer

Share This Page