Jump to content

Federico

Members
  • Posts

    23
  • Joined

  • Last visited

Federico's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I've changed the MX-Record of my domain "fpetit.heliohost.org" to analyze what would happen, but I got this when I try to find the MX record externally when I send an e-mail to federico@fpetit.heliohost.org As you can see, the MX record hasn't seemed to have changed, but SMTP gives an error.
  2. There's no other explanation. The script is correct and has no errors. A year ago this same script worked fine on Heliohost. Evidently they made some changes. Fsockopen CANNOT open a connection on port 25. Service scan FTP - 21 220---------- Welcome to Pure-FTPd [TLS] ---------- 220-You are user number 1 of 50 allowed. 220-Local time is now 19:56. Server port: 21. 220-This is a private system - No anonymous login 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 15 minutes of inactivity. 220 Logout. SMTP - 25 Error: TimedOut HTTP - 80 HTTP/1.1 200 OK Date: Mon, 02 Mar 2009 03:56:32 GMT Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Connection: close Content-Type: text/html;charset=ISO-8859-1 POP3 - 110 +OK Hello there. IMAP - 143 * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc. See COPYING for distribution information.
  3. The problem is NOT the PHP script. The script has NO errors. Heliohost seems to be blocking port 25
  4. I've written a PHP script, with no errors, and I cannot conect to ANY SMTP server using port 25. My script gives the error "Warning: fsockopen() [function.fsockopen]: unable to connect to mail.heliohost.org:25 (Connection timed out)" The problem is NOT related to the server mail.heliohost.org, but to any other one. Does anyone know what is going on? Thank you in advance.
  5. I cannot connect to ANY smtp server. Do you have the same problem? Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.mail.yahoo.com.ar:25 (Connection timed out) in /home/fpetit/public_html/class.smtp.php on line 122
  6. As I said before, no matter what SMTP server I use, I keep getting the same error: Yahoo!: smtp.mail.yahoo.com.ar Telered: enviar.telered.com.ar
  7. I'm trying to connect to an SMTP relay with fsockopen and I always get the same error, Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.gmail.com:25 (Connection timed out), despite the SMTP server specified. Has Heliohost closed port 25 ? Thank you
  8. I recompiled Apache/PHP yesterday - that's probably what did it. Well Thanks! I don't know what a bogus reply is.
  9. Well, I don't know what happened, but all of a sudden it started working!. It seems there was huge delay with your SMTP server. I also noticed that I can use PHPMailer, which is good for my application. Anyway, I still receiving the bouncing e-mails. The files are in the HOME directory.
  10. I executed in the WWW directory, the I moved it to the root. That's not the point.
  11. Well, the PHP is quite simple. It executes fine in your server. The problem comes when is executed by the piping method.
  12. Federico

    Mail piping

    Hello. I've recently installed a PHP script, which works fine, to be executed when an e-mail comes. Unfortunatelly when I send an e-mail to the address that was forwarded to the script, I get this error: This message was created automatically by mail delivery software. 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/fpetit/Tpersonal.php generated by federico@fpetit.heliohost.org The following text was generated during the delivery attempt: ------ pipe to |/home/fpetit/Tpersonal.php generated by federico@fpetit.heliohost.org ------ PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20060613/ixed.5.2.lin' - /usr/local/lib/php/extensions/no-debug-zts-20060613/ixed.5.2.lin: undefined symbol: executor_globals in Unknown on line 0 Error in argument 1, char 3: option not found Usage: php [-q] [-h] [-s] [-v] [-i] [-f <file>] php <file> [args...] -a Run interactively -C Do not chdir to the script's directory -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse <file>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>. The script to be executed is: #!/usr/bin/php -q <?php // read from stdin $fd = fopen("php://stdin", "r"); $email = ""; while (!feof($fd)) { $email .= fread($fd, 1024); } fclose($fd); // handle email $lines = explode("\n", $email); // empty vars $from = ""; $subject = ""; $headers = ""; $message = ""; $splittingheaders = true; for ($i=0; $i < count($lines); $i++) { if(trim($lines[$i])=="") { // empty line, header section has ended $splittingheaders = false; } if($splittingheaders) { // this is a header $headers .= $lines[$i]."\n"; // look out for special headers if (preg_match("/^Subject: (.*)/", $lines[$i], $matches)) { $subject = $matches[1]; } if (preg_match("/^From: (.*)/", $lines[$i], $matches)) { $from = $matches[1]; } } else { // not a header, but message $message .= $lines[$i]."\n"; } } // $from1=strpos($from,'<')+1; // $from2=strpos($from,'>',$from1); // $from3=substr($from,$from1,$from2-$from1); //Only for WLM if (strpos(strtolower($from),'alert@mobile.live.com')!==false) { $message2=strpos($message,' '); $msncontact=substr($message,0,$message2); $cntpos=strpos($message,'):')+2; if (strpos(strtolower($msncontact),'[hotmail]')!==false) { $from=''; } else { $message=$msncontact.substr($message,$cntpos); $from='WLM Alert'; } } //Only for Y! Alert if (strpos(strtolower($from),'y-alerts@reply.yahoo.com')!==false) { $from='Y!Alert'; } // Insertamos PHPMailer $subject='Hola'; $message='Este es el mensaje. Debe llegar a tu cuenta de Yahoo!'; $to = 'federicopetit@yahoo.com.ar'; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@personal.com.ar' . "\r\n" . 'Reply-To: webmaster@personal.com.ar' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); return; ?> As you can see I also included the hashbag at the beginning of the code. The script has 755 permission to be executed. Thanks for your help
  13. As I had told in the original post, the forwarding to the script IS working. The only problem is the nonsense bouncing e-mail.
  14. The script captures the email and sends it to an SMS gateway to my cellphone. I'm receiving the emails in my phone, so the script and the piping is working. What it's senseless is the bouncing with NO error message.
×
×
  • Create New...