duanjiao6730 2013-04-14 17:29
浏览 129

整个管道电子邮件未通过

I'm having trouble with piping emails to a PHP script. It seems as if the entire email isn't coming through. This is the sort of response I get:

From brian@myemailaddress.com Sun Apr 14 13:12:53 2013
Received: from mailserver.google.com ([GOOGLE.IP.ADDRESS]:41509)
        by myhost.server.com with esmtps (TLSv1:RC4-SHA:128)
        (Exim 4.80)
        (envelope-from <brian@myemailaddress.com>)
        id THE-EMAIL-ID
        for brian@mysub.domain.com; Sun, 14 Apr 2013 13:12:53 -0400
Received: by mailserver.google.com with SMTP id somesmtp.id
        for <brian@mysub.domain.com>; Sun, 14 Apr 2013 10:12:51 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=google.com; s=20120113;
        h=x-received:mime-version:x-originating-ip:from:date:message-id
         :subject:to:content-type:x-gm-message-state;
        bh=rPONCz8eaLlxJpumTQNPIEKBlWcbg53KdugbKjulvj4=;
        b=Kr7ZpXKTpXDCoQHmI93Ep+CSv8BY4xT2Pgh3eJeRsz5Y0iAjomGdBQDwKMQ/myk4hz
         dkReoFPGAqE3KsRo601JXzgDrvmu9oRDC3UpbwHvMUvbI+U1qjC2rUsp1fmaeohpc99T
         tPVMhO9WBBqthUP4TCv/T50/popu771Mydj0YXWbEuRtViyllzTa1M1kO3DhqLC+/bA2
         ED2J3wBXp47xRVjkoUNUOzyi5pUIsryDRUh9gxdSQtAGjqAdTpTwQXSX0MAdSK+PYc8Y
         oB/5Sm09um8/id4d4YHUBZMbIZv0+L0GR0ZbIfa42l7+WzvKMjijNw7QsA/KDXMaYL5W
         CwBQ==
X-Received: by IP.ADDR.ESS with SMTP id some.long.id; Sun,
 14 Apr 2013 10:12:51 -0700 (PDT)
MIME-Version: 1.0
Received: by IP.ADDR.ESS with HTTP; Sun, 14 Apr 2013 10:12:31 -0700 (PDT)
X-Originating-IP: [MY.IP.ADDRESS]
From: Brian D. <brian@myemailaddress.com>
Date: Sun, 14 Apr 2013 12:12:31 -0500
Message-ID: <CAOb+JoxnfiaHFSG6RyQPtnmeS526JPMO4krsS96wc3FGMKWOiA@mail.gmail.com>
Subject: New Task.
To: brian@wmysub.domain.com
Content-Type: multipart/alternative; boundary=001a11c30f960b290d04ea583f19
X-Gm-Message-State: AKoCoQnquQFvVi0CYGF4sdhK0Cn2swVezCK1Yg5uXKhxBmnppYCfVX/2+EK37dX1iyV4pxBOM1cJ

The way this is being piped is using cPanel's Default Address feature to work as a catch-all for a specific domain. This is the command:

|/usr/local/bin/php /home/account/path/to/my/script.php

I actually had to manually modify this script in the /etc/valiases file for the domain because it required I use hashbang/shebang at the top of my script and that was causing errors, but this (for the most part) works, but the entire message isn't showing up. Here is the code I'm using to read the message:

$email = '';
$stream = fopen('php://stdin', 'r');
$i = 0;
while($line = stream_get_line($stream, 65535, PHP_EOL)) {
$email .= $line;
    $i++;
}
fclose($stream);

Any ideas why I'm not getting the body of the email?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
    • ¥15 扩散模型sd.webui使用时报错“Nonetype”
    • ¥15 stm32流水灯+呼吸灯+外部中断按键
    • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
    • ¥15 NX MCD仿真与博途通讯不了啥情况
    • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
    • ¥15 gradio的web端页面格式不对的问题
    • ¥15 求大家看看Nonce如何配置
    • ¥15 Matlab怎么求解含参的二重积分?
    • ¥15 苹果手机突然连不上wifi了?