3 May 2007 13:26
RE: Filter and Resend Message
Dallman Ross <dman <at> nomotek.com>
2007-05-03 11:26:27 GMT
2007-05-03 11:26:27 GMT
> 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 <at> 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(Continue reading)
RSS Feed