Results 1 to 12 of 12
  1. #1
    Join Date
    Nov 2000
    Posts
    3,042

    Exim and PHP: The battle goes on

    Okay... since at this point I've spent 11 hours trying to figure this crap out I'll ask you guys.

    Here's the deal: I want Exim to pipe an email address to a php program. Should be as simple as 123 right? Umm.. no...

    I just sent a test email from the server to [email protected] and this is the error message that was returned:

    From: Mail Delivery System
    To: [email protected]
    Subject: Mail delivery failed: returning message to sender
    ---------------------------------------------------------------------------------------
    This message was created automatically by mail delivery software (Exim).

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    pipe to |/home/something/public_html/helpdesk/email.php
    generated by [email protected]
    Child process of virtual_address_pipe transport returned 69 (could mean service or program
    unavailable) from command:
    /home/something/public_html/helpdesk/email.php

    I've checked permissions 800 million times (since generally returning 69 means a permissions problem with the command, in this case email.php).

    So anyways 11 hours later still nothing. Here's my valias entry for the domain:

    [email protected]: |/home/something/public_html/helpdesk/email.php

    Any suggestions?

  2. #2
    Join Date
    Apr 2001
    Location
    Depok, Indonesia
    Posts
    988
    If you haven't done so, try adding #!/usr/bin/php (or whatever location of your php interpreter) on top of your email.php, and chmod it +x.

    If you don't have php interpreter on your system, you need to build one as CGI mode (not apache module).

  3. #3
    Join Date
    Nov 2000
    Posts
    3,042
    So basically I'm screwed unless PHP is installed as a CGI binary (since it is currently installed as an Apache Mod)?

  4. #4
    Join Date
    Nov 2000
    Posts
    3,042
    Oops... or as long as I run it as a CGI binary... that's cool, I didn't even think about the permissions problem on that end. Thanks for the tip
    A well-reasoned assumption is very close to fact.
    - Adorno

  5. #5
    Join Date
    Jan 2002
    Location
    Kuwait
    Posts
    679
    Yeah, you can have both CGI and Apache versions on the system.
    Ahmad Alhashemi
    PHP, Apache, C, Python, Perl, SQL
    18 related BrainBench certificates

  6. #6
    Join Date
    Nov 2000
    Posts
    3,042
    Welp I did that, CGI and mod_php and now... a new error .

    This message was created automatically by mail delivery software (Exim).

    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:

    pipe to |/home/someplace/public_html/helpdesk/cgi-bin/email.php
    generated by [email protected]

    The following text was generated during the delivery attempt:

    ------ pipe to |/home/someplace/public_html/helpdesk/cgi-bin/email.php
    generated by [email protected] ------

    X-Powered-By: PHP/4.2.2
    Content-type: text/html

    Now I'm really confused... never gotten THIS one before.
    A well-reasoned assumption is very close to fact.
    - Adorno

  7. #7
    Join Date
    Oct 2001
    Location
    California, USA
    Posts
    1,316
    Well I don't know Exim but the header that you see here may be what makes it so angry. Instead of /usr/bin/php, use /usr/bin/php -q
    http://www.voilaweb.com - the Social Internet Toolbox.

  8. #8
    Join Date
    Nov 2000
    Posts
    3,042
    tried that also...

    Found in exim_mainlog:
    Not as a CGI binary
    2002-09-21 00:12:04 17seQu-000223-00 ** |/home/compcity/public_html/helpdesk/email.php D=virtual_aliases_nostar T=virtual_address_pipe: Child process of virtual_address_pipe transport returned 69 (could mean service or program unavailable) from command: /home/compcity/public_html/helpdesk/email.php

    Is a CGI binary, and no message returned!
    2002-09-21 07:10:59 17skyJ-0005jo-00 ** |/home/compcity/public_html/helpdesk/cgi-bin/email.php D=virtual_aliases_nostar T=virtual_address_pipe: return message generated

    Nothing found in exim_rejectlog... pretty frustrating.
    A well-reasoned assumption is very close to fact.
    - Adorno

  9. #9
    Join Date
    Nov 2000
    Posts
    3,042
    Well I just don't know. Everyone I've talked to is pretty much saying they don't have a clue what the problem is. :p...
    A well-reasoned assumption is very close to fact.
    - Adorno

  10. #10
    Join Date
    Apr 2001
    Location
    Depok, Indonesia
    Posts
    988
    Try executing /home/compcity/public_html/helpdesk/email.php directly from shell, see if it works.

  11. #11
    Join Date
    Nov 2000
    Posts
    3,042
    Like a charm...
    A well-reasoned assumption is very close to fact.
    - Adorno

  12. #12
    Join Date
    Apr 2001
    Location
    Depok, Indonesia
    Posts
    988
    Probably php returned wrong exit code. Try adding exit(0) on the bottom of your php script. Other than that I don't know, maybe the problem is inside the script.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •