Martin A. Hansen wrote: > i have set up procmail to sort incoming mail into subfolders. the mail > is sortet and put in the subfolders all right, but every mail is put > inside its own folder so i get: > > [EMAIL PROTECTED]:/home/maasha/mail# ls -al debian-user/ > total 44 > drwxr-xr-x 2 maasha maasha 8192 Dec 17 09:50 . > drwx------ 6 maasha maasha 4096 Dec 17 10:01 .. > -rw------- 1 maasha maasha 3091 Dec 17 09:11 msg.OWeB > -rw------- 1 maasha maasha 2462 Dec 17 09:45 msg.WWeB > -rw------- 1 maasha maasha 3142 Dec 17 09:18 msg.XWeB > -rw------- 1 maasha maasha 2537 Dec 17 09:20 msg.YWeB > -rw------- 1 maasha maasha 4202 Dec 17 09:48 msg.dWeB > -rw------- 1 maasha maasha 2607 Dec 17 09:06 msg.mVeB > -rw------- 1 maasha maasha 2224 Dec 17 09:50 msg.uWeB > > and each folder contains the correct mail. > > this is most annoying :) ! i didnt ask (i think) for any msg.foo folders! > > this is my .procmailrc file: > > [EMAIL PROTECTED]:~$ cat .procmailrc > > PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:. > MAILDIR=$HOME/mail > PMDIR=$HOME/procmail > > LOGFILE=$PMDIR/procmaillog > INCLUDERC=$PMDIR/maashamail.rc > > LOCKFILE=$HOME/.lockmail > > > and this is the rc file: > > [EMAIL PROTECTED]:~/procmail$ cat maashamail.rc > > #Redirects > :0: > * ^Resent-From:[EMAIL PROTECTED] > debian-user > > :0: > * ^To:[EMAIL PROTECTED] > sslug
The .procmail and .rc files look okay. You don't seem to be telling procmail to use a "one message per file" format such as maildir or mh. Besides, the filenames are all wrong for either of those. Did the directory /home/maasha/mail/debian-user already exist when you set up procmail this way? It could be that procmail sees that you're specifying a directory, rather than an mbox file, as the destination, and perhaps that causes it to put each message in its own file within that directory? You could test this hypothesis as follows: 1. Stop fetchmail. 2. Rename the directory debian-user to any other name just to get it out of the way. Let's say you call it "du", just so we have a name to refer to it in the following steps. 3. cd into the "du" directory and run the following command: for f in *; do cat $f | procmail; done This will take all your old debian-user messages and run them back through procmail again. 4. Now find out where procmail put those messages. If it created an mbox file called /home/maasha/mail/debian-user, and put both messages into it, then your problem is solved. If it just re-created the debian-user directory, and put each message into a separate file in that directory, then you still have no solution. Either way, you can now delete the "du" directory and all the files in it, as procmail has created duplicates of all those messages in the new debian-user file/directory. 5. Restart fetchmail. Hope this helps. Craig