Jan wrote regarding 'Re: [SLE] Procmail + postfix' on Thu, Sep 09 at 02:48: [...]
But there is still one problem with the file rights. I filter via procmail all the exe, bat, pif ... files and keep them in file /tmp/executable.files. This file has the rights as above -rw------, and i dont want to have it divided acording to $LOGNAME. sometimes i check the executable files with pine -f /tmp/executable.files. I would be annoying to check every users executable files. How to solve this one?
Make a directory for those things, say, /tmp/executable.files/, and put each user's messages into a file names $LOGNAME within that directory. You can then use any arbitrary program to see fi the files have grown. If you set the mode to 1775 (or 1777 if you don't wanna make a group), then users can only modify their own files or create new ones. If you have a mail program that can handle maildirs, you could make /tmp/executable.files/ as a directory, then make 3 dirs inside - "cur", "new", and "tmp". Make all three of those subdirs mode 1775 (or 1777, as above). Then the permission problem goes away, since each message is stored as a seperate file, but you can see them all when you view that directory in, say, mutt. Set procmail to deliver to the /tmp/executable.files/ directory (note the trailing slash!) and forget that there are three dirs in there. You can use solution #2 even if you don't have a maildir-compatible reader. The messages will go into the "new" subdir by default, and each message will be a seperate file. Personally, I prefer to just reject those messages using header checks in postfix, but that's just me. There's lots of documentation on how to do that online - both at postfix.org and on the postfix mailing list (which is searchable on google groups as the list mailers.postfix.users or something like that). In general, if you want to do somethign server-wide, you shoudl probably be doing it with a filter in postfix rather than as a global procmail rule. IMHO. --Danny