User Tools

Site Tools


start:howto:dovecot_plus_database_quota

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
start:howto:dovecot_plus_database_quota [2011/07/04 05:41]
127.0.0.1 external edit
start:howto:dovecot_plus_database_quota [2012/01/09 11:50]
aseques
Line 1: Line 1:
-====== ​Replace Courier with Dovecot ​plus Database quota ======+**__ALERT: This is a document being rewritten, only experienced people should use this__** 
 + 
 +====== Dovecot ​modifications from default imscp install ​======
 This is an improved version from the original article in ispcp (http://​isp-control.net/​documentation/​howto:​mail:​replace_courier_with_dovecot) This is an improved version from the original article in ispcp (http://​isp-control.net/​documentation/​howto:​mail:​replace_courier_with_dovecot)
-It describes how to replace ​the courier-pop/​imap/​authdaemon/​maildrop with dovecot taking advantage ​of the features in dovecot ​1.2+All the parts related ​to the default install where removed since imscp already takes care of that, and it's focused to add the functionality that is available only on dovecot ​(instead of courier).
  
-===== The improvements ​from the original document ​===== +===== Changes ​from standard dovecot in imscp ===== 
-  * Quotas are stored on database so they will be shown from the control panel +  * Quotas are stored on database so they can be shown from the control panel 
-  * Required dovecot version is now 1.2 (almost everything could be done in 1.1 but with 1.2 it'​s ​easier and cleaner+  * Required dovecot version is now 1.2 (squeeze'​s ​default
-  * Filtering is enabled by default +  * Filtering is enabled by default ​(to archive spam)
-  * Following the installation is easier now.+
  
-===== Introduction ​=====+===== Reasons to use dovecot ​=====
  
-What do you win by changing from courier to dovecot: 
   * You can do server-side filtering with sieve (for example saving spam to junk folder)   * You can do server-side filtering with sieve (for example saving spam to junk folder)
   * Reading your logs for problems will be easier   * Reading your logs for problems will be easier
Line 22: Line 22:
 http://​forum.i-mscp.net/​showthread.php?​tid=61 http://​forum.i-mscp.net/​showthread.php?​tid=61
  
-**NOTE:​** ​i-MSCP is already assigning 10MB quota to each mail account created, but currently ​it is not editable by default (ticket #2219). To be able to edit the quota from the control panel you will have to follow this thread, as a bonus you will see the current values. +**NOTE:​** ​There are currently ​no means to configure ​the quota for imscp other than fiddling with the databaseThe functionality from http://​www.isp-control.net/​forum/​thread-8483.html ​should be imported.
-http://​www.isp-control.net/​forum/​thread-8483.html+
  
 **NOTE:** If you want to edit the quota directly; it is stored in bytes in the table "​mail_users"​ in a field named "​quota"​. **NOTE:** If you want to edit the quota directly; it is stored in bytes in the table "​mail_users"​ in a field named "​quota"​.
  
-===== Prerequisites ​===== +===== Replace Courier with Dovecot ​=====
-==== Your system'​s hostname has to be resolvable ==== +
-You can check this by executing +
-  hostname +
-This should print your system'​s hostname.+
  
-==== Script for password verification ==== +You can do it by re-running ​the installer and changing the default imap server when asked you can choose between courier or dovecot.
-The passwords are stored encripted on the database. To be able to use dovecot ​you have to get the script written by scy2tech that handles the verification of passwords for Dovecot: http://​forum.i-mscp.net/​attachment.php?aid=54+
  
-Copy it to **/​var/​www/​imscp/​engine/​imscp-dovecot-mngr** and do a 
-   chmod 0755 /​var/​www/​imscp/​engine/​imscp-dovecot-mngr 
- 
-===== Replace Courier with Dovecot ===== 
- 
-**Please replace every appearance of "​PASS_MAILRW"​ with your password!** 
  
 ==== 1. Create a new table in ispcp called quota_dovecot ==== ==== 1. Create a new table in ispcp called quota_dovecot ====
Line 55: Line 43:
     );     );
   ​   ​
-==== 2. Add sql user ==== +==== 2. Granting permissions to the sql user ==== 
-  mysql -u root -p mysql + 
-  mysql> GRANT SELECT ON ispcp.* to '​ispcp_dovecot'​@'​localhost'​ identified by '​PASS_MAILRW';​ +  mysql> GRANT SELECT,​INSERT,​UPDATE ON imscp.quota_dovecot to '​ispcp_dovecot'​@'​localhost'​
-  mysql> GRANT SELECT,​INSERT,​UPDATE ON ispcp.quota_dovecot to '​ispcp_dovecot'​@'​localhost'​+
   mysql> FLUSH PRIVILEGES;   mysql> FLUSH PRIVILEGES;
-  mysql> ​quit; +  mysql> ​QUIT;
- +
-==== 2. Stop Courier services ==== +
- +
-  /​etc/​init.d/​courier-pop stop +
-  /​etc/​init.d/​courier-imap stop +
-  /​etc/​init.d/​courier-authdaemon stop +
-  /​etc/​init.d/​saslauthd stop +
- +
-==== 3. Install Dovecot ==== +
- +
-  apt-get update +
-  apt-get install dovecot-common dovecot-imapd dovecot-pop3d+
  
 ==== 4. Configure Dovecot ==== ==== 4. Configure Dovecot ====
- 
  
 Replace /​etc/​dovecot/​dovecot.conf with the following one (you should backup the original because there are a lot of comments in it explaining all the configuration parameters). Replace /​etc/​dovecot/​dovecot.conf with the following one (you should backup the original because there are a lot of comments in it explaining all the configuration parameters).
/var/www/virtual/i-mscp.net/wiki/htdocs/data/pages/start/howto/dovecot_plus_database_quota.txt · Last modified: 2013/06/21 07:36 by aseques