On Sun, Aug 19, 2007 at 12:25:43PM +1000, Chris wrote:
> fetchmail was complaining that procmail cannot create /var/mail/me
> while fetching mail. The permission on /var/mail/ directory was set to
> -
> 
> drwxr-xr-x  2 root  wheel  512 Aug 19 12:16 /var/mail/
> 
> I changed it to -
> 
> drwxrwxr-x  2 root  wheel  512 Aug 19 12:16 /var/mail/
> 
> It's working fine now since user "me" is in wheel group.
> 
> Do I need to make /var/mail world-writable to get mail for other
> users? Is there any other way of doing this - fetching mail in
> /home/username?
> 
> Any suggestions would be much appreciated. Thanks.

Create the mail directory as root - this only has to be done once. Then
fetchmail will be happy.

I.e. the following will work:

0755    root:wheel      /var/mail/
0700    chris:chris     /var/mail/chris/

This is assuming maildir; if using mbox format (i.e. /var/mail/chris is
a file, not a directory), 0600 would suffice for /var/mail/chris.

If you, at some point in the future, have a lot of users and want to
automate this, change the group of /var/mail to a new group you could
call 'mail', change the mode to 0775, and make sure that fetchmail runs
as a user who is a member of 'mail'. Do note that most likely no user
should be a member of 'mail' in this setup.

                Joachim

-- 
TFMotD: release (8) - building an OpenBSD release

Reply via email to