Quotas and mail users

I’ve noticed that new mail delivered to users on my system is owned by the group “mail” instead of the domain’s group.

The problem is that such files will not get factored towards the domain’s quota, since that is based on group ownership.

Is there something wrong with my config? Shouldn’t all mail be owned by the domain group? Is this the fault of postfix, procmail or dovecot?

Is there something wrong with my config? Shouldn't all mail be owned by the domain group? Is this the fault of postfix, procmail or dovecot?

Yes. Yes. And Postfix and/or Procmail.

I suspect procmail isn’t actually delivering your mail…check the maillog or mail.log to confirm that. The setting in Postfix to set it is:

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

Or:

mailbox_command = /usr/bin/procmail

Depending on whether you’re using Virtualmin Professional or GPL.

Oh, yeah, you didn’t mention your OS/version. We had a weird issue similar to this a while back on Gentoo, though I don’t remember exactly what was going on…but basically Procmail wasn’t dropping privileges due to a bug in dealing with a non-existent /var/mail or /var/spool/mail directory (even though Maildir is being used and this directory never gets anything written to it…procmail just seemingly has some crufty old code that assumes it exists, and quietly fails to do the right thing if it doesn’t).

I’m using Virtualmin GPL 1.53 on Debian 4.0, installed with the script.

Postfix mailbox_command setting is:

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

/var/mail and /var/spool/mail exist.

Not sure what to go on here. I haven’t done any significant alteration to the default setup by the install script.

I think I solved it. I added DROPPRIVS=yes to my /etc/procmailrc file, so that file looks like this:

DROPPRIVS=yes
DEFAULT=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/

Now delivered mail files have the proper group, instead of "mail".

Now, is this a bug in the Virtualmin install script? Should I report this as such?

Thanks!

It probably is a bug. We seem to be having a lot of mail-related issues this past week or so, so I think something is failing midway through configuration that is causing many of the steps to be skipped. I need to make virtualmin-base a bit more robust, methinks.

Ah. So the DROPPRIVS=YES is not the ultimate solution? You think it is a bug in procmail-wrapper?

Thanks.