Mail User Quota - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Mail User Quota (/thread-2805.html) |
Mail User Quota - lost108 - 03-21-2008 04:50 AM Hello, We've tried searching but can't seem to find any answers... - How can we check the current disk space a certain MAIL user is utilizing? - Can we modify this MAIL user's quota using the interface? How? Thanks for all your help! RE: Mail User Quota - BeNe - 03-21-2008 08:40 PM There is no MailQuota in the current ispCP Version. So this means you have to set it alone in any way if you need it Greez BeNe RE: Mail User Quota - joximu - 03-21-2008 10:21 PM lost108 Wrote:- How can we check the current disk space a certain MAIL user is utilizing? du -hs /var/mail/virtual/<domain>/<mailname>/ lost108 Wrote:- Can we modify this MAIL user's quota using the interface? How? as BeNe said: not yet built into ispCP. You may create a mysql table with the values and setup postfix to lookup theese values... /J RE: Mail User Quota - lost108 - 03-22-2008 01:04 AM Hello, Thank you for your replies. joximu Wrote:You may create a mysql table with the values and setup postfix to lookup theese values... Below are the steps we've taken to do what you have suggested. However, postfix is still not bouncing back messages when it should. I think we're pretty close. Can you think of something we left out? We used an article we found at http://www.howtoforge.org/virtual_postfix_mysql_quota_courier_p2 to integrate the ISPCP mail_user quota with postfix. 1. Looking towards the bottom of /etc/postfix/main.cf: #virtual_create_maildirsize = yes #virtual_mailbox_extended = yes #virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/ispcp/mysql_virtual_mailbox_limit_maps.cf #virtual_mailbox_limit_override = yes #virtual_maildir_limit_message = "The user you're trying to reach is over mailbox quota." #virtual_overquota_bounce = yes Uncommented the lines shown above. 2. Created a view in the ISPCP database that will retreive just the data postfix needs: mysql> CREATE VIEW postfix_quota_checker as SELECT quota, CONCAT(mail_acc,'@',domain_name) as email from mail_users mu INNER JOIN domain d ON (mu.domain_id = d.domain_id) WHERE mail_type='normal_mail'; 3. Then, create a mysql user that post fix can use to log in to the ispcp database with: mysql> GRANT SELECT ON ispcp.postfix_quota_checker TO 'postfix_admin'@'localhost' IDENTIFIED BY 'postfix_mail_admin_password'; mysql> FLUSH PRIVILEGES; 4. Next, create the file /etc/postfix/ispcp/mysql_virtual_mailbox_limit_maps.cf : user = postfix_admin password = postfix_mail_admin_password dbname = ispcp table = postfix_quota_checker select_field = quota where_field = email hosts = 127.0.0.1 5. Give postfix permissions on this file: #> chmod o= /etc/postfix/ispcp/mysql_virtual_mailbox_limit_maps.cf #> chgrp postfix /etc/postfix/ispcp/mysql_virtual_mailbox_limit_maps.cf 6. Restart Postfix and Saslauthd: #> /etc/init.d/postfix restart #> postfix check #> /etc/init.d/saslauthd restart What are we missing? Thanks again! RE: Mail User Quota - joximu - 03-22-2008 01:24 AM I'm not the postfix god - wait for rbtux :-) But the sql statement (step 2) should be much easier from RC4 - there is now a table field with the email address... /J |