On Thu, May 03, 2007 at 11:09:43AM +0800, DR. Lee - NS1 wrote:
The solution, from the technical point of view, maybe clumsy but
it does what I need anyway, In business, we can not afford to
look for perfect solution.
[snip]
I acknowledge your "Don't let the good be the enemy of the perfect";
in that vein, here is something easier on the eyes and, probably,
the process table:
MY_TO = `formail -zx To: -zx Cc: | fmt -1 |
grep @ourdomain\. | uniq -c | tr -d '[[]()<>, ]'`
(That was a tab after the comma in the final brackets.)
By the way, if you are delivering to folders, such as maildir+
folders, you don't need separate procmail delivery recipes for
each local folder. You can put them all on one delivery line.
After you massage MY_TO appropriately to have the various
mailfolder paths in the lines, you would do this:
MAILDIR = /var/spool/mail # or wherever the mailspool is
MY_TO = "$MAILDIR/john/ $MAILDIR/paula/ $MAILDIR/jill/"
:0
$MY_TO
Dallman
____________________________________________________________
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