Am 2009-04-22 10:19:02, schrieb Zhengquan Zhang:
find .maildir/{cur,new} .maildir/.*/{cur,new} -type f -print | \
while read file
do mail -s 'test mnovak forwarding'
zhang(_dot_)zhengquan(_at_)gmail(_dot_)com < "$file"
echo 'sending' "$file"
done
<snip>
I wonder how to forward the mail to gmail and
get the attachments correct.
COUNT=1
for FILE in $(find .maildir/{cur,new} .maildir/.*/{cur,new} -type f)
do
echo "To: zhang(_dot_)zhengquan(_at_)gmail(_dot_)com
From: zhang(_dot_)zhengquan(_at_)gmail(_dot_)com
Date: $(date --rfc-822)
Subject: Forwarded Message ${COUNT}
Message-Id: <$(date --rfc-822)@localhost>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="foo-blub-blah"
--foo-blub-blah
Content-Type: text/plain
Forwarded Message ${COUNT}
--foo-blub-blah
Content-Type: message/rfc822
$(cat ${FILE})
--foo-blub-blah--
" |sendmail -oi -t
printf "%00i) sending %s\n" ${COUNT} ${FILE}
COUNT=$((COUNT+1))
done
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/> Michelle Konzack
<http://www.can4linux.org/> Apt. 917
<http://www.flexray4linux.org/> 50, rue de Soultz
Jabber linux4michelle(_at_)jabber(_dot_)ccc(_dot_)de 67100
Strasbourg/France
IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947
ICQ #328449886 Tel. FR: +33 6 61925193
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail