[Dovecot] Limiting size of stored emails

Dr Michael Daly gp at holisticgp.com.au
Wed Mar 13 06:11:31 EET 2013

How can you safely upgrad dovecot? I am running an even earlier version.

Re Message Size, if postfix is your MTA, in main.cfg you can set the
message_size_limit = 5242880
#e.g. for 5 megs limit!


On 3/12/2013 9:55 PM, Patrick Joy wrote:

> Would appreciate some advice on this issue.
> I'm running dovecot version 1.0.10 on ubuntu 8.04 LTS.

Ancient and no longer supported.  Upgrade to the latest 1.2.x or 2.x
that you can get from your distro ecosystem, or install from source if

> Recently a user created a draft email in their client (outlook) and
> added a 4GB attachment. The email was uploaded to the draft imap folder
> on the server. After this the client would then go into a endless
> synchronisation loop every time outlook was opened. For example in the
> most recent case 400GB of data was downloaded to the client when the
> user left outlook synchronising for 5 days.

First, beat the user with a heavy clue stick whilst educating said user
about sane attachment sizes, and use of things like FTP, burned DVD,
thumb drives, etc, for large file transfers.

> I know this may be a bug with the client or client os however I would
> like to know if there is a way to limit the size of individual emails
> that can be stored in the imap store to prevent users creating huge
> drafts. There is no reason they should need an email draft of this size
> as it can never be sent through SMTP.

You cannot limit the size of individual emails written to IMAP folders
AFAIK, but you can limit the size of folders.  See:



Dr Michael Daly MB, BS
GradDip(Integrative Medicine), GradCert(Evidence Based Practice),
M Bus(Information Innovation), GradDip(Document Management)
03 9521 0352
0413 879 029

More information about the dovecot mailing list