Josin Etienne <josin(_at_)dimensional(_dot_)com> writes:
i have a bunch of duplicates in my 'java' mail folder. i wanted to
eliminate the dups, and store all msgs under a given size to a new
empty folder.
i went over the examples in procmailex. but things are not working.
[i get a backup copy, which i probably did not need since my original
folder file is still there, but no msgs are being copied to the
new folder]
listed below is the procmailrc i am using. (let's name it 'foo')
the command i am running is:
procmail -m foo < java
------------------------------
.PROCMAIL LOG SAYS:
formail: formail: No such file or directory
It looks like formail isn't in your PATH.
...
PATH=/bin:/usr/bin:/usr/bin
Remove this line, and try again. The default path is probably
correct. It removing that line does't fix the problem, track down
where formail is installed (probably /usr/local. Use "which formail"
to find out), then *add* that to the default path. Completely reseting
the path is usually not the right thing to do -- your sysadmins may
decide to start putting commands in other locations to make
installation and upgrading easier. Do _you_ know exactly what your
sysadmins are up to?
# Dang, formail is in /usr/local/bin and procmail doesn't have that
# in the default. Prepend it to the path.
PATH = /usr/local/bin:$PATH
...
:0 Wh: msgid.lock
| formail -D 8192 msgid.cache
Don't forget the remove and/or truncate the msgid cache when you rerun
this, otherwise _everything_ will be a duplicate.
# store all msgs under 20,000 bytes...
:0:
* < 20000
java_new
...
You should probably add a final recipe to dump the other messages
somewhere (say, /dev/null), as procmail will otherwise return failure
to indicate the failure to deliver, and formail will note that and
return failure itself.
...or it would, if it wasn't for the bug I just found and fixed in
formail. To quote the HISTORY file entry I just checked in:
Changes to formail
- Formail was ignoring the exitcode of all but the last
invocation (or last several, if -n was in effect)
Philip Guenther