Solved getmail delivery error: refuse to deliver mail as GID 0

I have configured to run mail/getmail delivering all messages to a local qmail-style maildir.

When running > getmail -v fetching works as it should but delivery to ~/Maildir/ fails like this:

Code:
2015-07-17 02:13:43 Delivery error (maildir delivery 6359 error (127, maildir delivery process failed (refuse to deliver mail as GID 0)))

In .getmail/getmailrc I have
Code:
[destination]
type = Maildir
path = ~/Maildir/

Code:
/home/getopt > ls -l Maildir/
total 2
drwxrwx--x  2 getopt  wheel  2 15 Jul 21:31 cur
drwxrwx--x  2 getopt  wheel  2 15 Jul 21:32 new
drwxrwx--x  2 getopt  wheel  2 15 Jul 21:32 tmp

In the Getmail documentation can be read
Delivery error: maildir delivery process failed (refuse to deliver mail as root)

getmail will not deliver to a maildir as the root user. You may specify an alternate user to deliver as with the user directive in the destination section of your getmailrc file, or let getmail default to the user who is the owner of the maildir.

Problem is that the error message suggests that Getmail has been run as root, but this is not true. I did run it as a user. I tried to change the permissions of the directories with no success. Now I'm stuck.
 
I tried mail/getmail quite a while back and remember vaguely running into a similar problem. I think the fix, though I could be wrong, was using the complete path to the mail directory in getmailrc. (e.g. /usr/home/$USER/Maildir)
 
I tried mail/getmail quite a while back and remember vaguely running into a similar problem. I think the fix, though I could be wrong, was using the complete path to the mail directory in getmailrc. (e.g. /usr/home/$USER/Maildir)
Unfortunately that did not solve it.
The user is member of group "wheel". Maybe this is a problem?
 
Not sure. Possibly, though that wouldn't make any sense to me. I don't remember group ids being a problem when I had it installed but again I could be mistaken.
 
Back
Top