Hai,
Am 2009-11-13 14:05:51, schrieb LuKreme:
Not sure if procmail is the best solution for this or not.
I use procmail to sort all my list mail into separate mailboxes, but
since getting my iPhone it only scans for unread messages in INBOX,
so I'd like to create an email in my inbox that us something like:
Subject: 15 unread messages in 4 mailboxes
To: kremels(_at_)…
Procmail: 3 messages
Postfix: 11 messages
Foobar: 1 message
Now, the trick is I would run this every so often, so I want the
solution to delete the message and recreate it everytime.
Aalterbatively, I could have the message sent to a PUSH enabled
account, but that is less desirable.
Any suggestions?
Something like:
----8<------------------------------------------------------------------
1 .Electronic.Forum.Mikrocontroller_net.NXP_verschenkt_ARM-Chips/
2 .ML_electronic.Microchip_Forum.Development_Tools.Evaluation_and_Dem
4 .ML_electronic.Microchip_Forum.Microcontroller_Discussion_Group.16-
3 .ML_electronic.Microchip_Forum.Microcontroller_Discussion_Group.Get
6 .ML_electronic.Microchip_Forum.Microcontroller_Discussion_Group.SCI
3 .ML_electronic.Microchip_Forum.Microcontroller_Discussion_Group.USB
4 .ML_electronic.Microchip_Forum.TCP_IP.Ethernet/
1 (_dot_)ML_embedded(_dot_)ecos-discuss(_at_)ecos_sourceware_org/
2 (_dot_)ML_embedded(_dot_)openembedded-devel(_at_)lists_openembedded_org/
1 (_dot_)ML_mail(_dot_)users(_at_)spamassassin_apache_org/
9 (_dot_)ML_misc(_dot_)users(_at_)openoffice_org/
4 (_dot_)ML_perl(_dot_)modperl(_at_)perl_apache_org/
1 .ML_pgsql.admin/
5 .ML_pgsql.general/
1 (_dot_)ML_pgsql(_dot_)slony1-general(_at_)lists_slony_info/
4 (_dot_)ML_php(_dot_)php-objects(_at_)yahoogroups_com/
1 .ML_redhat.fedora-devel-announce/
2 .ML_redhat.fedora-devel-list/
6 .ML_redhat.fedora-list/
2 (_dot_)ML_xwindow(_dot_)xorg(_at_)lists_freedesktop_org/
2 .Private.IAEA/
2 .Private.RSS.PressTV_Iran/
65 .Private.RSS.Spiegel_Online.Politik_-_Islamische_Dschihad_Union_\(I
27 .Private.RSS.Spiegel_Online.Politik_-_Islamischer_Dschihad/
20 .Private.RSS.Spiegel_Online.Politik_-_Kampf_gegen_moderne_Piraten/
50 .Private.RSS.Spiegel_Online.Politik_-_KGB/
----8<------------------------------------------------------------------
That is what I use:
----[ '~/bin/td_show_messages' ]----------------------------------------
#!/bin/bash
TOTAL_MSG=0
TMPFILE=$(mktemp -t td_show_messages.XXXXXX || exit 1)
function(
for DIR in $(ls -d \.*/ 2>/dev/null) ; do
MSGS=$(ls ${DIR}/new/ 2>/dev/null |wc -l)
if [ ${MSGS} -gt 0 ] ; then
printf "%3i %s\n" ${MSGS} ${DIR}
fi
TOTAL_MSG=$((TOTAL_MSG+MSGS))
done
printf "\n%3i Total Messages\n" ${TOTAL_MSG}
)
echo "From: td_show_messages(_at_)invalid
To: lukreme(_at_)gmail(_dot_)com
Subject: You have ${TOTAL_MSGS} new messages
Date: $(date --rfc-822)
" >${HOME}/Maildir/new/td_show_messages
function >>${HOME}/Maildir/new/td_show_messages
------------------------------------------------------------------------
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
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
Strabourg/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