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


Post Reply 
Mail User Quota
Author Message
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
Post Reply 


Messages In This Thread
Mail User Quota - lost108 - 03-21-2008, 04:50 AM
RE: Mail User Quota - BeNe - 03-21-2008, 08:40 PM
RE: Mail User Quota - joximu - 03-21-2008, 10:21 PM
RE: Mail User Quota - lost108 - 03-22-2008 01:04 AM
RE: Mail User Quota - joximu - 03-22-2008, 01:24 AM

Forum Jump:


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