LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > 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

Reply
 
LinkBack Search this Thread
Old 09-27-2008, 03:50 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,489
Blog Entries: 1

Rep: Reputation: 67
Question procmail: Couldn't create "/var/mail/test"


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)?
 
Old 09-28-2008, 04:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,576
Blog Entries: 47

Rep: Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402Reputation: 1402
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?
 
Old 09-28-2008, 07:54 PM   #3
racracracrac
Member
 
Registered: Sep 2008
Posts: 44

Rep: Reputation: 15
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 06:01 AM. Reason: removed spammed link
 
Old 09-29-2008, 12:16 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,489
Blog Entries: 1

Original Poster
Rep: Reputation: 67
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?
 
  


Reply

Tags
mail, procmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 03:45 AM
Renamed bogus "/var/mail/macleanl" into "/var/mail/BOGUS.macleanl.xPVB" paul_mat Linux - Networking 1 07-04-2006 12:50 PM
procmail: Couldn't create or rename temp file "/var/spool/mail/tmp/.... paul_mat Linux - Software 0 05-02-2006 06:16 PM
script to count the mails in an users folder "/var/spool/mail/user" sharad Linux - Software 1 03-16-2006 10:58 PM
postfix error procmail: Couldn't create "/var/spool/mail/ bentman78 Linux - Software 4 05-26-2004 12:04 AM


All times are GMT -5. The time now is 02:48 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration