You know that looping your mail is a bad idea; that is forwarding your email to Gmail and then forwarding that back to yourself, ad infinitum, you get the idea. It’s equally a bad idea to forward DSNs or bounce messages to Gmail (or anywhere really); as it causes the same sort of loop and the same kind of aggravation for your System Administrator. The following is a procmail recipe that works for me.
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/procmail.log
VERBOSE=yes
SENDMAIL=/usr/sbin/sendmail
FORMAIL=/usr/bin/formail
SUBJECT=`$FORMAIL -xSubject:`
:0
* ^X-Loop: Your_Email_Address@sonic.net
/dev/null
:0E
* ^TO_Your_Email_Address\+0x96rds@sonic\.net
$DEFAULT
:0cE
| $FORMAIL -A “X-Loop: Your_Email_Address@sonic.net” | $SENDMAIL -f Your_Email_Address+0x96rds@sonic.net -oi Your_Email_Address@gmail.com