# Directory Permissions (Postfix)



## motty (Jun 4, 2010)

Hi, 
I'm a newbie and hope am in the right place. I have a folder where Postfix delivers email. i have an account name "motty" that is in the same group as vmail. i have set all the right permissions to that folder but all new email coming to that folder does not inherit the permission and manually i have to give that account motty permissions to access email. 

My questions is how to make all permission to  stick to new items been deliver to folder? 

Thanks, 
Motty


----------



## pprocacci (Jun 5, 2010)

Hello,

I don't know the specific answer, but it's my understanding that postfix should be doing deliveries *as* the user in question.  I honestly don't know postfix all that well, but this would make the most sense.

Sorry I really can't be much help.

~Paul


----------



## hydra (Jun 6, 2010)

If you are delivering with virtual, check out:
http://www.postfix.org/VIRTUAL_README.html

You need to set virtual_uid_maps and virtual_gid_maps (statically to your vmail user).


----------



## motty (Jun 7, 2010)

Postfix is delivering email fine! the problem is when i try to access spam email in that folder /home/vmail/ i have to run permissions everytime a new item come in. Does anybody know what the command is to stick the permissions for all new items been deliver to folder /home/vmail?

Thanks, 
Motty


----------



## hydra (Jun 8, 2010)

How do you access your mail (pop3/imap) ?


----------



## motty (Jun 8, 2010)

hi Hydra, i access my email with dovecot. my email server works fine. my questions is when i access email to see the headers in /home/vmail has the right permissions but every time a new email arrives in that directory i have to set permissions because it does not inherit permissions from parent directory.  I'm using freebsd 8.0. i don't know what the command is to set permissions and stick those permissions to any new items in that directory.  i hope this is more specific. 

Thanks,
Motty


----------



## hydra (Jun 8, 2010)

Could you please provide the output of: *postconf -n* and *dovecot -n* ? Please, also show the ouput of *ls -ld /home/vmail*, *ls -la /home/vmail*, *id motty* and *id vmail*.


----------



## motty (Jun 9, 2010)

Hello hydra, 
i'm won't be able to provide with that output since, my job in that server is to process email tag as spam through the spamassassin learner. I do not have admin rights a very limited user. for that reason the person that manages that server sets permission every time i need to process spam. SO i wonder if there is a command or permissions that can be impose on that directory without recurring to the admin to give me permission every time i need to process spam. 
Thanks, 
-Motty


----------



## hydra (Jun 11, 2010)

Have you tried to run any of those commands ? You should be able run each command as NON-root.


----------

