title: Incoming E-mail intercepted by PYTHON's ( sys.stdin.read(1024) ) is missing title and body content
body: <p>I use <code>/etc/aliases</code> to redirect incoming emails<br>
  for the username <code>"ooo"</code> to a python script </p>
  
  <p>( handled by <code>SENDMAIL</code> )</p>
  
  <pre><code>ooo:    "|/usr/bin/python /2/a.wsgi"
  </code></pre>
  
  <p>this is what <code>a.wsgi</code> looks like.</p>
  
  <pre><code>import os
  import sys
  
  a = sys.stdin.read(1024)
  f = open('/2/email.txt','w')
  f.write(a)
  </code></pre>
  
  <p>I sent a test e-mail to myself from my yahoo e-mail account
  but the whole title and body is missing.</p>
  
  <p>on purpose i created a long title consisting of lot's of o's
  and a body consisting of lot's of o's with multiple lines
  so that i could see it.</p>
  
  <p>when i look into the intercepted e-mail by python..
  this is what email.txt file looks like.</p>
  
  <pre><code>[root@a 2]# cat email.txt
  From a*****@ymail.com Thu Jul 25 09:41:49 2013
  Received: from nm23-vm1.bullet.mail.bf1.yahoo.com (nm23-vm1.bullet.mail.bf1.yahoo.com [98.139.213.141])
      by domain.tld (8.14.4/8.14.4) with ESMTP id r6P9fm88005190
      for &lt;ooo@*****.tld&gt;; Thu, 25 Jul 2013 09:41:48 GMT
  Received: from [98.139.215.142] by nm23.bullet.mail.bf1.yahoo.com with NNFMP; 25 Jul 2013 17:26:26 -0000
  Received: from [98.139.212.228] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 25 Jul 2013 17:26:26 -0000
  Received: from [127.0.0.1] by omp1037.mail.bf1.yahoo.com with NNFMP; 25 Jul 2013 17:26:26 -0000
  X-Yahoo-Newman-Property: ymail-3
  X-Yahoo-Newman-Id: 45121.53358.bm@omp1037.mail.bf1.yahoo.com
  Received: (qmail 29958 invoked by uid 60001); 25 Jul 2013 17:26:26 -0000
  DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1374773185; bh=Nc9zHE1K2q237s4A2qN53+4bWmq6BswfttyIcwmUsF8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=tN89b5lX46otPfK9builCXVNLty3jVx[root@a 2]# 
  </code></pre>
  
  <p>as you can see the subject is empty and body is not visible either.</p>
  
  <p>otherwise i e-mailed myself </p>
  
  <p>Subject: oooooooooooooooooooooooooooooooooooooooooo<br>
  Body : also lot's of o's but multiple lines so it'd be easy to see.</p>