I'm trying to forward (resend) email to Gmail while still delivering it to local folders according to some procmail rules.

The procmail contents related to forwarding are as follows:

MAILDIR=$HOME/mail/
DEFAULT=$HOME/mail/inbox
SENDER=`formail -c -x Return-Path`
SENDMAILFLAGS="-oi -f $SENDER"

:0fw
| spamc

:0:
* ^X-Spam-Status: Yes
spam

:0c
! [redacted]@gmail.com

The messages get through to Gmail, but their headers are included in the body:

>From kluge  Tue Jul 12 15:14:43 2011
Return-path: <example@gmail.com>
Envelope-to: john.doe@example.com
Delivery-date: Tue, 12 Jul 2011 15:14:43 +0300

How can I get the mail to be resent so that it would appear as normal in Gmail?

link|improve this question
I googled before asking, but could only find bbs.archlinux.org/viewtopic.php?pid=709356. It's about the same problem but unresolved. – kluge Jul 12 '11 at 13:02
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.