LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2003, 12:49 PM   #1
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Calling chmod from a procmailrc


What is the preferred way to call chmod from a procmailrc?

:h
|chmod g+w /var/mail/mailbox
would unnecessarily feed the mail message to the chmod command,

DUMMYVARIABLE=`chmod g+w /var/mail/mailbox`
would create an unnecessary variable just to run chmod.

Is there a third way to run a command from a procmailrc?

Also: it might turn out that g+w is not enough and I have to grant o+w on all mailboxes. What is your opinion about this? You may be cruel, since I want to know the truth.
 
Old 02-16-2003, 01:36 PM   #2
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Original Poster
Rep: Reputation: 58
Oops! After a thorough revision, this turned out to be a difficult issue:

I have to call chmod from procmailrc AFTER the actual delivery receipt.
If I call it before, and the mailbox is empty, then nothing will be chmoded and procmail will give the mailbox the default permissions of 600 - disregarding any umask setting (which is my experience).

So, is it possible to call a command from a procmailrc file after, or as a last element of a delivery recipe?

Also, if I do not want o+w on the mailboxes, then I have to chgroup them to grant group 'email' write permissions to all of them (then g+w is sufficient). Presently the mailboxes are owned by their users and the users' default login groups.
Does it involve any side effect if I chgoup the mailboxes to an other group?
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
.procmailrc jayakrishnan Linux - Networking 0 11-19-2005 02:13 AM
Procmailrc file how many do I Need ?? wylie1001 Linux - Software 2 09-07-2005 07:20 PM
procmailrc davidsrsb Slackware 3 06-15-2005 11:07 AM
odd recursion: calling "by hand" vs calling by cronscript... prx Programming 4 02-12-2005 04:59 PM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:00 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration