Quotas and mail users

7 posts / 0 new
Last post
#1 Tue, 03/04/2008 - 23:35
markedwards

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?

Thu, 03/06/2008 - 18:26
Joe
Joe's picture

<div class='quote'>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?</div>

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.

--

Check out the forum guidelines!

Thu, 03/06/2008 - 18:30 (Reply to #2)
Joe
Joe's picture

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).

--

Check out the forum guidelines!

Fri, 03/07/2008 - 08:13
markedwards

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.

Sun, 03/09/2008 - 00:08
markedwards

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 &quot;mail&quot;.

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

Thanks!

Mon, 03/10/2008 - 14:57 (Reply to #5)
Joe
Joe's picture

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.

--

Check out the forum guidelines!

Mon, 03/10/2008 - 19:05
markedwards

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

Thanks.

Topic locked