PDA

View Full Version : Change quota for users


chameleon
24th February 2008, 18:50
I have just installed a mail server following this how-to:

http://www.howtoforge.com/virtual_users_and_domains_with_postfix_debian_etch

Great how-to.
Everything works, but I noticed that when I create a user with quota 4GB and send him an e-mail, everything is ok except the quota.
For some reason it was truked to 2GB (2147483647).
In mysql database everything is ok.
But the value in maildirsize in /home/vmail/domain.tld/user1/ is 2147483647S.
I checked every step on how-to and there is no errors.

Can you help me with this one?

Thanks in advance.

falko
25th February 2008, 18:09
What filesystem are you using? Any errors in your logs?

chameleon
26th February 2008, 01:44
Debian Etch is the OS.
No no errors in the log.
Here is what I see in the mail.log:

Feb 26 01:41:22 mail amavis[2897]: (02897-02) Passed CLEAN, <root@mail.domain.com> -> <test4@domain.com>, Message-ID: <20080225234115.CA31112AC1E3@mail.domain.com>, mail_id: Lv64gKr65WC2, Hits: 1.269, queued_as: 6E68A12AC184, 6661 ms
Feb 26 01:41:22 mail postfix/smtp[3863]: CA31112AC1E3: to=<test4@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=6.7, delays=0.03/0/0/6.7, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=02897-02, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 6E68A12AC184)
Feb 26 01:41:22 mail postfix/qmgr[2958]: CA31112AC1E3: removed
Feb 26 01:41:22 mail postfix/virtual[3868]: 6E68A12AC184: to=<test4@domain.com>, relay=virtual, delay=0.07, delays=0.05/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Feb 26 01:41:22 mail postfix/qmgr[2958]: 6E68A12AC184: removed

I create user in mysql:
INSERT INTO `users` (`email`, `password`, `quota`) VALUES ('test4@domain.com', ENCRYPT('test4'),5368709120);

And whe I check the user maildirsize, I get this:

cat /home/vmail/domain.com/test4/maildirsize
2147483647S
922 1

I hope this will help

falko
26th February 2008, 20:39
What's the output of mount and df -h?

chameleon
26th February 2008, 22:54
Here is the output of mount command:

/dev/sda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)

Here is the output of df -h:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 227G 1.4G 214G 1% /
tmpfs 1014M 0 1014M 0% /lib/init/rw
udev 10M 40K 10M 1% /dev
tmpfs 1014M 0 1014M 0% /dev/sh

falko
27th February 2008, 14:14
Looks ok. What's the output of uname -a?

chameleon
28th February 2008, 09:26
Linux mail 2.6.18-6-686 #1 SMP Sun Feb 10 22:11:31 UTC 2008 i686 GNU/Linux

falko
29th February 2008, 14:37
Looks ok, too. On old Linux systems (kernel 2.4 and older) there was a max. file size of 2GB - I was thinking that maybe this is the problem here, but everything looks ok.

Now that I think about it again, I think the problem is that the quota field in the users table is of type int(10):

CREATE TABLE users (
email varchar(80) NOT NULL,
password varchar(20) NOT NULL,
quota INT(10) DEFAULT '10485760',
PRIMARY KEY (email)
) TYPE=MyISAM;

Change it to bigint and try again.

chameleon
29th February 2008, 17:30
Hello,

I already did that. But without any luck. See the output:
cat /home/vmail/domain.com/test/maildirsize
2147483647S
809 1

I double check everything. And even rebuild postfix packe with quota patch like it was done in the how-to, but there is no effekt.
I'm stuck.

BR,
Chameleon

falko
1st March 2008, 18:25
What do you use for the quota field now? Can you post the table definition (using phpMyAdmin)?

chameleon
2nd March 2008, 16:58
CREATE TABLE `users` (
`email` varchar(80) NOT NULL,
`password` varchar(20) NOT NULL,
`quota` bigint(10) default '4294967296',
PRIMARY KEY (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

falko
3rd March 2008, 20:09
Use bigint(20) instead.

chameleon
4th March 2008, 09:08
Yep, I've just changed it.
But no luck.
I will try to patch the postfix again and will change this:

+# A maximum limit of a mailbox
+virtual_mailbox_limit = 100000000

With bigger number and the number will start for example with 4 or 5.
I hope this will help

BR,
chameleon

chameleon
6th March 2008, 11:51
No effect...:(

chameleon
12th March 2008, 18:35
Can someone help me with this one.
I'm still trying to solve it, but no luck so far.

Thanks

falko
13th March 2008, 18:54
Unfortunately I have no idea... :(