I am getting errors relating to the way Procmail is configured, however I am having big problems configuring it in a way that makes sense. I am set up using Qmail-style mailboxes ($HOME/Maildir/).
I modified /etc/postfix/main.cf to reflect that and can send and receive mail just fine. With Procmail installed and enabled, I now get Procmail errors, one of which is the subject of this thread: "procmail: Unable to treat as directory"
I modified the source (configure.h and then autoconf.h, which is the file that really needed editing, but wasn't created until after installation) to set the MAILDIR variable to "$HOME/Maildir", DEFAULT (mail directories) to "$MAILDIR/", and the ORGMAIL (ORiGinal MAILbox) to "$DEFAULT". Nowhere in my configuration is "/var/spool/mail/anything" indicated. Note that used to be the default mailbox setting for Procmail, and it was completely unresponsive to attempts to modify that variable's value using the normal means, like including the setting in a procmailrc file. Just ignored it. (I could tell by running "procmail -v", plus there were lots of errors indicating that Procmail was trying to write to /var/spool/mail/USERNAME until I made those mods.)
So now "procmail -v" displays the correct settings. Frankly, I don't know why Procmail would need to write anything to ANY directory except for /dev/null, as I have NO forwarding rules, no locking rules ... nothing but "dump 'em if you see 'em" rules.
Since I have a lot of users who used to work with this company but who are now gone and still receiving valid messages from older clients, I use aliasing to direct their mail to valid accounts with Maildir's. These are all system (not virtual) users for many reasons. These are most of the accounts that produce Procmail errors. So I went through each user's configuration and adjusted their HOME directories to ALL point to the same "/home/catchall" directory, even though that directory should NEVER receive any mail for those users.
Of course, now I get errors about how Procmail can't create "/home/catchall/USERNAME" directories. I say "of course" because Procmail runs as the recipient user, and no user has permission to modify anything in the "catchall" directory.
BUT IT DOESN'T NEED TO WRITE ANYTHING THERE, ANYWAY! There's no mail going there!
The thing is, I was getting the same errors when their HOME directories were the traditional "/home/USERNAME", and in any case, the "procmail: Unable to treat as directory" error remains regardless of who's Maildir it is.
Scouring the web for about a week turns up the same bogus "fix", which is NOT to make the modifications I made, but rather to accept the default setup and simply MAKE /var/spool/mail CHMOD 777! World-executable! This goes against every notion of directory security I have ever learned.
Does anyone have anything to contribute that might be newer than 2003? The Procmail mailing list is useless, as their advice is to do the 777 thing. Same with Postfix lists.
Is it possible that Postfix and Procmail simply do not work well together?
Thanks for any tips and thoughts.