title: How to write a recipe to get the real email sender
body: <p>I am trying to send email back to the sender using <code>sendmail -oi -t</code>, but somehow it extracted MTA, how to write the receipt to get the real sender since the email return-path and first From in the email header is MTA, not the real sender? So sendmail can deliver email back to: Sender: +xxxxxxxxxx@tmomail.net
  or From: +xxxxxxxxxx@tmomail.net</p>
  
  <p>Here is the procmail.log and email received:</p>
  
  <pre><code>...
  procmail: Matched "+1xxxxxxxxxx@tmomail.net"
  procmail: Match on "^Sender: \/.+"
  procmail: Assigning "LASTFOLDER= (/usr/bin/formail -rA"Precedence: junk" \
  -A"X-Loop:addr@mydomain.com" \
  -I"To: $MATCH"; \
  echo "$result"; \
  ) | /usr/sbin/sendmail -oi -t"
  procmail: Assigning "PATH=/home/r/bin:/usr/local/bin:/usr/bin:/bin"
  procmail: Unable to treat as directory "/var/mail/new"
  procmail: Skipped "/var/mail"
  procmail: Assigning "LASTFOLDER=/var/mail/r"
  procmail: Executing " (/usr/bin/formail -rA"Precedence: junk" \
  -A"X-Loop:addr2mydomain.com" \
  -I"To: $MATCH"; \
  echo "$result"; \
  ) | /usr/sbin/sendmail -oi -t"
  procmail: Opening "/var/mail/r"
  procmail: Acquiring kernel-lock
  procmail: Notified comsat: "r@884017:/var/mail/r"
  From btv1==909280b6006==+1xxxxxxxxxx/TYPE=PLMN@tmomail.net  Mon Apr 11  17:09:24 2016
  Folder: /var/mail/r             
  </code></pre>
  
  <p>Here is the email header:</p>
  
  <pre><code>From btv1==9062f44d095==+xxxxxxxxxx/TYPE=PLMN@tmomail.net  Fri Apr  8 00:19:01 2016
  Return-Path: &lt;btv1==9062f44d095==+xxxxxxxxxx/TYPE=PLMN@tmomail.net&gt;
  X-Original-To: recipient@mydomain.com
  Delivered-To: recipient@mydomain.com
  Received: from ch3p-tmo-mm3-sfw004.syniverse.com (chi-tmo-mm3.syniverse.com   [x.x.x.x])
      by mail.mydomain.com (Postfix) with ESMTP id 7D444222D0
      for &lt;recipient@mydomain.com&gt;; Fri,  8 Apr 2016 00:19:01 +0000 (UTC)
  Received: from tmobile.net ([10.166.3.161]) by ch3p-tmo-mm3-      sfw004.syniverse.com with ESMTP id RuIW8dEKbs9H2Iyg for &lt;r@mr4.biz&gt;; Fri, 08 Apr   2016 00:18:58 +0000 (GMT)
  To: recipient@mydomain.com
  From: +xxxxxxxxxx@tmomail.net
  Content-Type: multipart/related;Type="text/html";boundary="-boundaryRMS123"
  Date: Fri, 8 Apr 2016 00:18:58 GMT
  Message-ID: 20160308001858639184@mavenir.com
  Sender: +xxxxxxxxxx@tmomail.net
  User-Agent: iPhoneOS/9.2.1 (13D15)
  X-Virus-Scanned: by bsmtpd at syniverse.com
  </code></pre>
  
  <p>Here is the last part of recipe:</p>
  
  <pre><code>:0hc
  * !^X-Loop:old@domain.com
  * ^Sender: \/.+
  | (/usr/bin/formail -rA"Precedence: junk" \
                       -A"X-Loop:addr@mydomain.com" ; \
     echo "$result"; \
  ) | /usr/sbin/sendmail -oi -t
  </code></pre>