LinuxQuestions.org
Social Bookmarking all things Linux and Open Source
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 09-27-2008, 04:50 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,174
Blog Entries: 1
Thanked: 0
Question procmail: Couldn't create "/var/mail/test"


[Log in to get rid of this advertisement]
I have this problem with procmail.

If the spool file for a user is already created, I have no problem to send email to the user. However, if the file is not there already, procmail can't create it on its own.

Permissions for the spool directory:
Code:
drwxrwxr-x 2 root mail 4096 Sep 26 14:15 /var/spool/mail/
Now... why can't procmail create the spool file? I know that it's a permission problem... but how can I fix it? Is it OK if I just chmod g+s /usr/bin/procmail (it belongs to the mail group)?
eantoranz is offline  
Tag This Post ,
Reply With Quote
Old 09-28-2008, 05:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Procmail isn't installed setuid-anything by default IIRC, so setting it shouldn't be the first workaround to look at. I could imagine a small, centrally run recipe checking if the user's spool got created before doing anything else, but wouldn't it be "better" to trigger file creation instead on creation of the account?
unSpawn is offline     Reply With Quote
Old 09-28-2008, 08:54 PM   #3
racracracrac
Member
 
Registered: Sep 2008
Posts: 44
Thanked: 0
Very close!

Somehow your /var/mail directory lost its setguid. Overzealous security? Maybe.

chmod g+s /var/mail

Alternatively you can add everyone to the mail group, but then everyone can read everyone elses mail file!

Last edited by reddazz; 10-14-2008 at 07:01 AM.. Reason: removed spammed link
racracracrac is offline     Reply With Quote
Old 09-29-2008, 01:16 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,174
Blog Entries: 1
Thanked: 0

Original Poster
OK, racra.. that will make new files created inside the directory keep the gid of "mail"... but I think that won't allow procmail to write new files in the directory if I remove the SGID from the executable. Am I wrong?
eantoranz is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
my var in bash doesn't work: ARRAY_$a_$b="test" SlackerJack Linux - General 3 01-13-2008 04:45 AM
Renamed bogus "/var/mail/macleanl" into "/var/mail/BOGUS.macleanl.xPVB" paul_mat Linux - Networking 1 07-04-2006 01:50 PM
procmail: Couldn't create or rename temp file "/var/spool/mail/tmp/.... paul_mat Linux - Software 0 05-02-2006 07:16 PM
script to count the mails in an users folder "/var/spool/mail/user" sharad Linux - Software 1 03-16-2006 11:58 PM
postfix error procmail: Couldn't create "/var/spool/mail/ bentman78 Linux - Software 4 05-26-2004 01:04 AM


All times are GMT -5. The time now is 03:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration