New doc: ignore.trash.folder.in.quota.html.

This commit is contained in:
Zhang Huangbin 2014-09-26 15:17:35 +08:00
parent 9476a75ca4
commit 6c14910972
6 changed files with 216 additions and 19 deletions

View File

@ -0,0 +1,56 @@
# Ignore Trash folder in mailbox quota
Per-user mailbox quota rule is defined in Dovecot, in one of below files:
* `/etc/dovecot/dovecot-mysql.conf`: MySQL backend
* `/etc/dovecot/dovecot-pgsql.conf`: PostgreSQL backend
* `/etc/dovecot/dovecot-mysql.conf`: MySQL backend
If no per-user quota rules found, Dovecot will use 'quota_rule[X]' defined in
`/etc/dovecot/dovecot.conf`. For example:
```
# File: /etc/dovecot/dovecot.conf
plugin {
quota = dict:user::proxy::quotadict
quota_rule = *:storage=1G
#quota_rule2 = *:messages=0
#quota_rule3 = Trash:storage=1G
#quota_rule4 = Junk:ignore
...
}
```
So, if you want to ignore quota of `Trash` folder, you can add new quota_rule
in either `/etc/dovecot/dovecot.conf` or `/etc/dovecot/dovecot-{mysql,pgsql,ldap}.conf`.
* Sample setting #1:
```
# File: /etc/dovecot/dovecot.conf
plugin {
quota = dict:user::proxy::quotadict
quota_rule = *:storage=1G
quota_rule2 = Trash:ignore
...
}
```
* Sample setting #2:
```
# File: /etc/dovecot/dovecot-ldap.conf
user_attrs = ...,mailQuota=quota_rule=*:bytes=%$,=quota_rule2=Trash:ignore
# File: /etc/dovecot/dovecot-mysql.conf, or dovecot-pgsql.conf
user_query = SELECT ... \
CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule \
'Trash:ignore' AS quota_rule2 \
FROM ...
```

View File

@ -6,6 +6,7 @@ We're working on migrating [old wiki documents](http://www.iredmail.org/wiki) to
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](src/default/4-howto/configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](src/default/4-howto/disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](src/default/4-howto/enable.smtps.md)
* [Ignore Trash folder in mailbox quota](src/default/4-howto/ignore.trash.folder.in.quota.md)
* [LDAP: Add an alias domain](src/default/4-howto/ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](src/default/4-howto/ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](src/default/4-howto/ldap.add.mail.list.md)

View File

@ -551,3 +551,97 @@
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantine clean mail into SQL database](quarantining.clean.mail.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [How to migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantine clean mail into SQL database](quarantining.clean.mail.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [How to migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)
# How to
* [Allow user to send email without authentication](allow.user.to.send.email.without.authentication.md)
* [Amavisd + SpamAssassin not working, no mail header (X-Spam-*) inserted.](amavisd.no.x-spam.headers.md)
* [Completely disable Amavisd + ClamAV + SpamAssassin](completely.disable.amavisd.clamav.spamassassin.md)
* [Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)](configure.thunderbird.md)
* [Disable spam virus scanning for outgoing mails](disable.spam.virus.scanning.for.outgoing.mails.md)
* [Enable SMTPS service (SMTP over SSL, port 465)](enable.smtps.md)
* [Ignore Trash folder in mailbox quota](ignore.trash.folder.in.quota.md)
* [LDAP: Add an alias domain](ldap.add.alias.domain.md)
* [LDAP: Add a mail alias account](ldap.add.mail.alias.md)
* [LDAP: Add a mail list account](ldap.add.mail.list.md)
* [LDAP: User mail forwarding.](ldap.user.mail.forwarding.md)
* [Monitor incoming and outgoing mails with BCC](monitor.incoming.and.outgoing.mails.with.bcc.md)
* [Pipe incoming email for certain user to external script ](pipe.incoming.email.for.certain.user.to.external.script.md)
* [Quarantine clean mail into SQL database](quarantining.clean.mail.md)
* [Force Dovecot to recalculate mailbox quota](recalculate.mailbox.quota.md)
* [SQL: Create an mail alias account with SQL command line](sql.create.mail.alias.md)
* [Store SpamAssassin bayes in SQL](store.spamassassin.bayes.in.sql.md)
* [Perform silent/unattended iRedMail installation](unattended.iredmail.installation.md)
# Third-party integrations.
* [SOGo: How to install SOGo on CentOS 6 with iRedMail (MySQL backend)](sogo-centos-6-mysql.md)
# Cluster solutions
* [An Ultra-HA, full Mult-Master E-mail cluster with iRedMail, MariaDB, and IPVS ](full.mult-master.iredmail.cluster.with.mariadb.and.ipvs.md)
# Backup, restore and migration
* [How to migrate old iRedMail server to the latest stable release](migrate.to.new.iredmail.server.md)
* [Password hashes](password.hashes.md)
# Troubleshooting and Debug
* [Turn on debug mode in Amavisd](turn.on.debug.mode.in.amavisd.md)
* [Turn on debug mode in Dovecot](turn.on.debug.mode.in.dovecot.md)
* [Turn on debug mode in OpenLDAP](turn.on.debug.mode.in.openldap.md)
# Frequently Asked Questions
* [Why append timestamp in maildir path](why.append.timestamp.in.maildir.path.md)

View File

@ -0,0 +1,64 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ignore Trash folder in mailbox quota</title>
<link href="./css/markdown.css" rel="stylesheet"></head>
</head>
<body>
<div id="navigation">
<a href="http://www.iredmail.org" target="_blank">iRedMail web site</a>
// <a href="./index.html">Document Index</a>
</div><h1 id="ignore-trash-folder-in-mailbox-quota">Ignore Trash folder in mailbox quota</h1>
<p>Per-user mailbox quota rule is defined in Dovecot, in one of below files:</p>
<ul>
<li><code>/etc/dovecot/dovecot-mysql.conf</code>: MySQL backend</li>
<li><code>/etc/dovecot/dovecot-pgsql.conf</code>: PostgreSQL backend</li>
<li><code>/etc/dovecot/dovecot-mysql.conf</code>: MySQL backend</li>
</ul>
<p>If no per-user quota rules found, Dovecot will use 'quota_rule[X]' defined in
<code>/etc/dovecot/dovecot.conf</code>. For example:</p>
<pre><code># File: /etc/dovecot/dovecot.conf
plugin {
quota = dict:user::proxy::quotadict
quota_rule = *:storage=1G
#quota_rule2 = *:messages=0
#quota_rule3 = Trash:storage=1G
#quota_rule4 = Junk:ignore
...
}
</code></pre>
<p>So, if you want to ignore quota of <code>Trash</code> folder, you can add new quota_rule
in either <code>/etc/dovecot/dovecot.conf</code> or <code>/etc/dovecot/dovecot-{mysql,pgsql,ldap}.conf</code>.</p>
<ul>
<li>Sample setting #1:</li>
</ul>
<pre><code># File: /etc/dovecot/dovecot.conf
plugin {
quota = dict:user::proxy::quotadict
quota_rule = *:storage=1G
quota_rule2 = Trash:ignore
...
}
</code></pre>
<ul>
<li>Sample setting #2:</li>
</ul>
<pre><code># File: /etc/dovecot/dovecot-ldap.conf
user_attrs = ...,mailQuota=quota_rule=*:bytes=%$,=quota_rule2=Trash:ignore
# File: /etc/dovecot/dovecot-mysql.conf, or dovecot-pgsql.conf
user_query = SELECT ... \
CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule \
'Trash:ignore' AS quota_rule2 \
FROM ...
</code></pre><br /><p>If you found something wrong in this document, please do <a href="http://www.iredmail.org/contact.html">conect us</a> to fix it.</p></body></html>

View File

@ -17,6 +17,7 @@
<li><a href="configure.thunderbird.html">Configure Thunderbird as mail client (IMAP, SMTP and global ldap address book)</a></li>
<li><a href="disable.spam.virus.scanning.for.outgoing.mails.html">Disable spam virus scanning for outgoing mails</a></li>
<li><a href="enable.smtps.html">Enable SMTPS service (SMTP over SSL, port 465)</a></li>
<li><a href="ignore.trash.folder.in.quota.html">Ignore Trash folder in mailbox quota</a></li>
<li><a href="ldap.add.alias.domain.html">LDAP: Add an alias domain</a></li>
<li><a href="ldap.add.mail.alias.html">LDAP: Add a mail alias account</a></li>
<li><a href="ldap.add.mail.list.html">LDAP: Add a mail list account</a></li>

View File

@ -1,19 +0,0 @@
<http://www.iredmail.org/wiki/index.php?title=IRedMail/FAQ/Ignore.Trash.Folder.in.Quota>
# How to ignore Trash folder in mailbox quota
Quota\_rule is overrode in `/etc/dovecot/dovecot-mysql.conf` or `/etc/dovecot/dovecot-ldap.conf`, so please change them instead. If no per-user quota rules found, Dovecot will use 'quota_ruleX' in dovecot.conf.
For example, with OpenLDAP backend, you have `/etc/dovecot/dovecot-ldap.conf`, update it with 'Trash:ignore' like below:
<pre>
user_attrs = ...,mailQuota=quota_rule=*:bytes=%$,=quota_rule2=Trash:ignore
</pre>
With MySQL backend, update `/etc/dovecot/dovecot-mysql.conf`:
<pre>
user_query = SELECT ... \
CONCAT('*:bytes=', mailbox.quota*1048576) AS quota_rule \
'Trash:ignore' AS quota_rule2 \
FROM ...
</pre>