LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-20-2010, 11:46 PM   #1
cj_cheema
Member
 
Registered: Mar 2006
Location: INDIA
Distribution: RedHat, SuSE, Debian
Posts: 156

Rep: Reputation: 15
Question How do I set Quota for mail boxes in postfix


Hi

I am going to setup postfix mail server for my client on RHEL 5.5 64 bit server, But I don't know how do I set quota in users mail boxes as I have found postfix don't have this feature, so If I will use linux disk quota technology in my mail server for solving this purpose will this help.
Please suggest procedure if it is possible or any other alternate.

Thanks & Regards
 
Old 07-21-2010, 05:24 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
Postfix can be patched to use a quota. Here is a link that shows an example of how to do this: http://www.howtoforge.com/virtual_po..._quota_courier
 
Old 07-23-2010, 12:45 PM   #3
cj_cheema
Member
 
Registered: Mar 2006
Location: INDIA
Distribution: RedHat, SuSE, Debian
Posts: 156

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Noway2 View Post
Postfix can be patched to use a quota. Here is a link that shows an example of how to do this: http://www.howtoforge.com/virtual_po..._quota_courier
I don't want to do patching to postfix as this is server is in production. Thus I want to follow standard procedure which is available in RHEL. My question If I choose disk quota will it help.
 
Old 07-24-2010, 06:40 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776Reputation: 776
Here is another option that may provide some help: http://johnny.chadda.se/article/mail...rey-and-dspam/ Search for the work 'quota' in the page. You will want to look through the comments too. It uses virtual users (don't know if you do or not) and the POP/IMAP application rather than Postfix to enforce quotas. It may work without virtual users.

You may be able to do this with disk quotas, but I suspect that the effect will be to "push the problem elsewhere", much like the pipe leaks in cartoons where they put their finger on one leak and it springs up somewhere else. In order to use disk quota, you will need to put the mail into a directory and assign limits to that directory, or user, or something, somehow. Not sure how you would do it, but it sounds like it would work. Note, 'virtual users' still stores the mail in a directory. It is just in a central location such as /var instead of the user's home directory.

The problem I think you will see with disk limits is that if someone goes over the quota, the mail programs won't see it that way. Instead they will see a disk error and defer the mail rather than bounce and that this could cause a clog in your Postfix queues or cause a bunch of bad traffic for rejected and deferred mail that will cause issues.
 
Old 07-24-2010, 09:57 PM   #5
cj_cheema
Member
 
Registered: Mar 2006
Location: INDIA
Distribution: RedHat, SuSE, Debian
Posts: 156

Original Poster
Rep: Reputation: 15
Thanks I also suspect might disk quota will create such problem, but anyway I will try this solution also mentioned in this link provided by yoy if any problem comes I will update you. Thanks once again for support.

Regards
Charanjit
 
Old 07-25-2010, 03:34 AM   #6
pswen
LQ Newbie
 
Registered: Dec 2008
Posts: 26

Rep: Reputation: 0
in postfix main.cf


messsage_size_limit=1000000
set limit 10MB to mail

mailbox_size_limit=1000000000
set limit 1G to mailbox
 
Old 07-25-2010, 06:05 AM   #7
sleddog
Member
 
Registered: Jan 2002
Location: Labrador, Canada
Distribution: CentOS, Debian
Posts: 182

Rep: Reputation: 35
Quote:
Originally Posted by Noway2 View Post
The problem I think you will see with disk limits is that if someone goes over the quota, the mail programs won't see it that way. Instead they will see a disk error and defer the mail rather than bounce and that this could cause a clog in your Postfix queues or cause a bunch of bad traffic for rejected and deferred mail that will cause issues.
This is not true in my experience. For me, Postfix generates and sends a bounce message. The wording of the message is a tad cryptic for inexperienced users, but the gist of it is is that the recipient has exceeded their disk quota.

This is not to say that disk quotas are without problems. Two issues I've encountered are:

1. The pop/imap server (Dovecot in my case) is unable to write to its uidlist files when quota is exceeded if those files are stored along with mail. There's a workaround for this (see link below).

2. It's impossible to move mail to Trash using imap (either a client or a imap-based webmail app) as most imap servers first copy the mail to Trash and then delete it from the original location. The 'copy to Trash' part fails when the disk quota is exceeded.

So both problems are on the imap/pop side rather than issues for Postfix. You may want to research how you imap/pop server hands disk quotas. Some info about Dovecot is here: http://wiki.dovecot.org/Quota/FS
 
Old 08-02-2010, 01:45 PM   #8
cj_cheema
Member
 
Registered: Mar 2006
Location: INDIA
Distribution: RedHat, SuSE, Debian
Posts: 156

Original Poster
Rep: Reputation: 15
Thanks pswen & sleddog for your support also I will check this steps and let you know if its work or not work..
Regards
Charanjit Singh
 
  


Reply

Tags
mail, quota, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix private IP for mail boxes and limiting. newbinaryfilr Linux - Server 2 07-06-2010 04:06 PM
[SOLVED] Can't get Postfix mail boxes from /var/mail to ~/Maildir phillinux Linux - Server 6 06-01-2010 09:48 AM
Mail Quota on Postfix shawnbishop Linux - Server 2 12-02-2009 11:36 PM
Mail Quota in postfix and squirrelmail stefanolima Linux - Software 3 06-11-2009 10:30 AM
Mail usage quota graph with postfix vm_devadas Linux - Software 6 09-20-2006 11:36 AM


All times are GMT -5. The time now is 07:48 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration