nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Postfix User Mailbox Quota

This is a discussion on Postfix User Mailbox Quota within the Mail Servers forums, part of the Mastering Servers category; I have been doing some research on implementing a user quota on a production mail server. It seems like this ...


Go Back   nixCraft Linux Forum > Mastering Servers > Mail Servers

Linux answers from nixCraft.


Mail Servers Discussion on Postfix/Sendmail Mail servers and related program such as IMAP/POP3, Anti-Spam technologies.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-05-2009, 01:21 AM
Junior Member
User
 
Join Date: Nov 2008
OS: Redhat Enterprise 5, Centos 5
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jgijanto is on a distinguished road
Default Postfix User Mailbox Quota

I have been doing some research on implementing a user quota on a production mail server. It seems like this is a feature that is missing in postfix, and in order to do so, one must compile the program with an external plugin. Can anyone confirm or deny this?
Reply With Quote
  #2 (permalink)  
Old 08-05-2009, 05:36 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Are you talking about disk quota or mailbox size or outgoing / incoming email quota (like only allow 200emails per day)?

Almost all of them can be implemented in postfix. but we need more info..
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 08-05-2009, 05:44 PM
Junior Member
User
 
Join Date: Nov 2008
OS: Redhat Enterprise 5, Centos 5
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jgijanto is on a distinguished road
Default

Sorry for not being more clear - I'm referring to actual disk quota. I'd like to set a 300mb limit on all users, but have the ability to change the limit of an individual user on the fly.
Reply With Quote
  #4 (permalink)  
Old 08-05-2009, 06:45 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

For virtual email box use:
Code:
virtual_mailbox_limit = size_in_bytes
For direct loca mailbox use:
Code:
mailbox_size_limit = size_in_bytes
If you are looking to set different size for different users use program such as Postfixadmin with mysql backend+virtual mail box size.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #5 (permalink)  
Old 08-05-2009, 06:58 PM
Junior Member
User
 
Join Date: Nov 2008
OS: Redhat Enterprise 5, Centos 5
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jgijanto is on a distinguished road
Default

Thanks for getting back to me Vivek. I'm still a rookie at this whole unix admin thing - but I subscribe to your mailing list and find it very informative.

As it turns out, the main.cf file already has those limits set:

message_size_limit = 20240000
virtual_mailbox_limit = 30480000
mailbox_size_limit = 30480000

However, they're not being enforced, as I have several accounts that are far above quota. Any thoughts?
Reply With Quote
  #6 (permalink)  
Old 09-05-2009, 02:45 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Are you using any other external command that are executed by postfix local delivery agent? Also, you need to configure IMAP or POP3 server such as dovecot. For e.g. following line must exists to work it correctly:
Code:
virtual_mailbox_limit_inbox = yes
Here is what I typically use in main.cf
Code:
mailbox_size_limit = 51200000
message_size_limit = 10240000
virtual_mailbox_base = /nas/mailstorage/virtual
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_limit_inbox = yes
virtual_mailbox_limit_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_lock = fcntl, dotlock
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #7 (permalink)  
Old 09-05-2009, 02:52 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Oh, if you are not using mysql as backend, then you need something as follows:
Code:
# disk quotas config per mailbox
virtual_mailbox_limit_maps = hash:/etc/postfix/vquota
virtual_mailbox_limit_override = yes
# A maximum limit of a mailbox
virtual_mailbox_limit = 100000000
# Limits only INBOX part for IMAP
virtual_mailbox_limit_inbox = yes
And /etc/postfix/vquota:
Code:
# 2048000 bytes limit
user1@domain.com    2048000
user2@domain.com    2048000 
# 5192000 bytes limit
user3@domain.com    5192000
# no limit
user4@domain.com    0
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply

Tags
mailbox_size_limit , mta , postfix , postfix tutorial , virtual_mailbox_limit


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Difference betwwen : Locked User Account & Disabled User Accounts in Linux ? avklinux CentOS / RHEL / Fedora 1 02-03-2009 04:02 PM
Sendmail Attachment Size & User Quota Restriction. nishith Mail Servers 2 31-12-2008 12:05 PM
postfix one user multiple instance irfan1234 Mail Servers 0 10-08-2008 04:53 PM
Cyrus - can't create user mailbox satimis Mail Servers 0 08-06-2008 04:32 PM
Quota ricc Linux software 2 08-08-2006 03:20 AM


All times are GMT +5.5. The time now is 12:49 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38