LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
 
Search this Thread
Old 07-09-2013, 05:08 AM   #1
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS
Posts: 2,233

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Define disk quota on simple Postfix + Dovecot mail server


Hi,

I just setup my new mail server on Slackware64 14.0, using Postfix and Dovecot. It's running fine, with a handful of domains and a few handfuls of users. Configuration is "Keep It Simple Stupid", so no virtual users, no MySQL, just a bunch of addresses mapped to local users (who can't login directly to the machine).

Here's my own HOWTO (in French, but the configuration listings are universal):

http://www.microlinux.fr/slackware/L...Mail-HOWTO.txt

Right now I'm wondering how I could define some quotas on a per-user basis. I don't like the idea of unlimited mail storage. My first question is: should I use Postfix quota mechanisms, or rather plain disk quota? I already know the latter, which I do use on networks with central authentication (with edquota and repquota).

Any suggestions?
 
Old 07-09-2013, 08:07 AM   #2
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware-64, Crux-64, NetBSD-64
Posts: 682

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Use Dovecot to implement quotas:

http://wiki2.dovecot.org/Quota/Configuration
 
1 members found this post helpful.
Old 07-09-2013, 09:39 AM   #3
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS
Posts: 2,233

Original Poster
Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by gezley View Post
Use Dovecot to implement quotas:

http://wiki2.dovecot.org/Quota/Configuration
I already read this page, but it's unfortunately not very well explained, e. g. I still don't know which option goes where. Here's my actual (working) /etc/dovecot/dovecot.conf file:

Code:
# /etc/dovecot/dovecot.conf
protocols = imap
listen = *
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
mail_location = maildir:~/Maildir
auth_mechanisms = plain login
passdb {
  driver = shadow
  args   =
}
passdb {
  driver = passwd
  args   =
}
userdb {
  driver = passwd
  args   =
}
service auth {
  unix_listener auth-userdb {
    mode = 0600
    user = postfix
    group = postfix
  }
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
  user = $default_internal_user
}
Let's say - for example's sake - I want a default of 100 MB mail storage per user, except users mworms and jpvergniol, who should get each one 500 MB mail storage.

How do I configure the default behaviour (100 MB quota) in dovecot.conf?

As for the quota overrides, here's the page that explains (more or less) how to do that:

http://wiki2.dovecot.org/UserDatabase/ExtraFields

I think I'm concerned by the last section (passwd-file), but what do I have to do here? Edit my /etc/passwd file and add fields like userdb_quota_rule=*:storage=500M for overrides?

I'm puzzled.
 
Old 07-09-2013, 10:36 AM   #4
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, CentOS
Posts: 2,233

Original Poster
Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
OK, I experimented some more, and implementing "classical" Linux disk quotas works very nice.

I defined some very restrictive quotas for a few users, and once their disk is full, the sender of a mail gets a "Disk quota exceeded" mail in return.

Which is all I wanted, so I'll mark this thread as SOLVED.

Thanks !
 
  


Reply

Tags
mail, quota


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
Can't connect to mail server (postfix+dovecot) sspitfire Linux - Server 2 02-22-2013 05:22 AM
simple mail server issue postfix/dovecot Gil@LQ Linux - Newbie 13 12-04-2011 10:32 PM
Is My Postfix-Dovecot Mail Server Secure Enough? bper Linux - Security 4 09-19-2010 06:19 AM
Postfix/Dovecot Mail Server Redundancy haariseshu Linux - Server 2 05-29-2009 05:55 AM
LXer: Debian Mail Server Setup with Postfix + Dovecot + SASL + Squirrel Mail LXer Syndicated Linux News 0 03-12-2008 10:50 PM


All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration