Postfix mail server limit the mailbox size

by on October 28, 2006 · 6 comments· LAST UPDATED October 19, 2007

in , ,

So how do you limit the mailbox size for users configured with the Postfix mail server?

It is good choice to avoid problem (disk DoS) by limiting mailbox size. This will avoid the user or hacker to eat up all hard disk space.

Display the default mailbox size limit

Type the following command:
# postconf mailbox_size_limit
Output:

mailbox_size_limit = 51200000

51200000 bytes is default mailbox size limit.

Display the default maximum size in bytes of a message

Type the following command:
# postconf message_size_limit
Output:

message_size_limit = 10240000

Setup new mailbozsize limit

Open file /etc/postfix/main.cf and
# vi /etc/postfix/main.cf
Add/modify/set values as follows:
mailbox_size_limit = 30000000
message_size_limit = 10240000

Save and restart postfix mail server:
# /etc/init.d/postfix restart

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 6 comments… read them below or add one }

1 ashraf October 29, 2007 at 1:20 pm

this option is for all users ,
how to make diffrent mail box sizes for diffreent users or groups

Reply

2 Jorge Pelliza April 16, 2012 at 5:36 pm

Hi, you have to use LDAP or Mysql so you may create an attribute that defines the mailQuotaSize for each user.
In my site, I have a complete guide to do this, but is in spanish.
Regards,

Reply

3 A. May 23, 2014 at 11:21 am

Why don’t you post the link? Some of us may actually speak Spanish.

Reply

4 david September 23, 2012 at 8:12 am

My maths is a little rusty but I think that 3 is a smaller number than 5. In other words in effect you have shrunk the mailbox_size_limit. Perhaps adding a zero to 51200000 or just doubling the figure would do it.

all the best

Reply

5 david September 23, 2012 at 8:46 am

Scrap that. I have just realised that the post is to shrink the mailbox size. Its just that yesterday I was looking to grow the mailbox size and got fixated upon that idea.

all the best

Reply

6 tomas shapumba May 22, 2013 at 7:54 pm

what commands should i use for checking post fix size

Reply

Leave a Comment

Tagged as: , , , ,

Previous post:

Next post: