Current time: 11-17-2024, 06:30 AM Hello There, Guest! (LoginRegister)


Post Reply 
Mail User Quota
Author Message
lost108 Offline
Junior Member
*

Posts: 11
Joined: Mar 2008
Reputation: 0
Post: #1
Mail User Quota
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!
03-21-2008 04:50 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: Mail User Quota
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 Sad

Greez BeNe
03-21-2008 08:40 PM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #3
RE: Mail User Quota
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
03-21-2008 10:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
lost108 Offline
Junior Member
*

Posts: 11
Joined: Mar 2008
Reputation: 0
Post: #4
RE: Mail User Quota
Hello,

Thank you for your replies.

joximu Wrote:You may create a mysql table with the values and setup postfix to lookup theese values...
/J

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_postfi...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!
03-22-2008 01:04 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #5
RE: Mail User Quota
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
03-22-2008 01:24 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)