Custom Search

Postfix VDA


Description

  • Mailbox / Maildir size limit, known also as "soft quota", to avoid user take all you disk space
  • Customizable "limit" message when the soft quota limit is reached. NOTE: message is sent to senders, but NOT to the owner of the mailbox.
  • Limit only 'INBOX', because some people use IMAP and don't want the same limit in IMAP folder that are differents from INBOX.
  • Support for 'Courier' style Maildir, usefull for people that use courier as pop3/imap server and to get fast soft quota summary. Note that it is also compatible with qmail maildir per default.
  • Supports for Courier 'maildirsize' file in Maildir folder that is used to read quotas quickly. Note that this option is not actived per default and can be dangerous on some NFS client implementation (like for example Solaris that cache some filesystem operations).
  • Customisable suffix for Maildir support, when share same external dict between postfix and pop3/imap server sometime "Maildir/" suffix is needed to avoid extra database handling (eg LDAP, MySQL...).

Patches for postfix releases and snapshots
  • CVS

  • Postfix 2.5 Support
  • Postfix 2.5-NG by Luca Longinotti
  • Tomas Macek 64 bit version - PLEASE, apply VDA patch first - Thank you Tomas :)
  • Postfix 2.5.6-NG: SHASUM 43de277b16bfe9238e7661b0053f8d5bee3284b9 http
  • Postfix 2.5.5-NG-64bit: SHASUM 9597ec0d799210afdb519660ce1b44da3d784f43 http
  • Postfix 2.5.5-NG: SHASUM 84b3dabc26236121fdc666da4f0fa98cc0cfbe8b http
  • Postfix 2.5.4-NG-64bit: SHASUM e52835b75eb1c2ae0caf2301683f6c87993011db http
  • Postfix 2.5.4-NG: SHASUM 3580dddd63152859ecaf4d3ae7384fc572dc9ea8 http
  • Postfix 2.5.3-NG: SHASUM 05c33224119e1c1b02eb6c273bbca8bd00bf0e6f http
  • Postfix 2.5.1-NG: SHASUM b16ec12e848ed30ee9b7fe2c26822da20262b268 http

  • Postfix 2.4 Support
  • Postfix 2.4-NG by Luca Longinotti
  • Postfix 2.4.6-NG: SHASUM ad22558466f26bad1a06aaee2a4a228c9ea5dbb4 http
  • Postfix 2.4.5-NG: SHASUM 7bc3a9639e64747b49bd862dc7cc326ab3aacd72 http
  • Postfix 2.4.4-NG: SHASUM 4e2905606da03a3f117fa4b4b703c3c5b2f1c174 http
  • Postfix 2.4.3-NG: SHASUM f92874fd782c7b4833d9bf6ad4fdbf13b99ae8ac http
  • Postfix 2.4.2-NG: SHASUM bd1276718a30906813d4d9682db17bfc0da86783 http
  • Postfix 2.4.1-NG: SHASUM 2f65e42d89128e4d1c3059542fbe62bb0d026a07 http
  • Postfix 2.4.0-beta: SHASUM 14e926e1a60c8bef48c9ad3696ac85d8d74a55c9 http
  • Postfix 2.4.0: SHASUM 0e1de0bb9de24ea9766d9930a945e3b94fc2a250 http

  • Postfix 2.3 Support
  • Postfix 2.3.7: SHASUM bb2a9d906c89c0f55f101a78a0d2dc968f50b8d9 http
  • Postfix 2.3.6: SHASUM 52bbbeedd5ff32509a787c0f9b47a26239dfcca8 http
  • Postfix 2.3.5: SHASUM 99e1d19e5ed12eb0a2c651fb60e0c7b884c95f3f http
  • Postfix 2.3.4: SHASUM c0249f93bc55c1bd9b074c944ee8eb3c94949359 http
  • Postfix 2.3.3: SHASUM f5523ea9ddfd1581cbfe4a451c6f6027055fc496 http
  • Postfix 2.3.2: SHASUM b2f94c70801c39a9022c264ee96ff9b48c17817c http
  • Postfix 2.3.1: http
  • Thanks for Chris Stratford for your NFS patch
  • Postfix 2.3.0: 1 RELEASE - Possible bugs :) http

  • Postfix 2.2 Support
  • Postfix 2.2.10: http
  • Postfix 2.2.9: http
  • Postfix 2.2.8: http
  • Postfix 2.2.7: http
  • Postfix 2.2.6: http
  • Postfix 2.2.5: Bug correction http
  • Postfix 2.2.4: http
  • Postfix 2.2.3: http
  • Postfix 2.2.2: http
  • Postfix 2.2.1: http
  • Postfix 2.2.0: http

Sample configuration
Note that this configuration is just a dummy example I use for testing purposes, it can be used for understand better how this patch works
main.cf configuration
Here is in short the configuration for main.cf file :
# I use only virtual as localdelivery... This permit me to have full
# virtual domain hosting without using a lots of maps
mailbox_transport = virtual

# All my virtuals users are located on a separate disk
virtual_mailbox_base = /var/mailusers

# Maps of virtuals users
virtual_mailbox_maps = hash:/etc/postfix/vmailbox

# All ids < 1000 are bad ids...
virtual_minimum_uid = 1000

# I use same uid and gid for all my users
virtual_uid_maps = static:4000
virtual_gid_maps = static:4000

# A maximum limit of a mailbox
virtual_mailbox_limit = 100000000

# Limits only INBOX part (usefull when
# using when you have IMAP users)
virtual_mailbox_limit_inbox = yes

# maps of soft disk quotas
virtual_mailbox_limit_maps = hash:/etc/postfix/vquota
virtual_mailbox_limit_override = yes

# I use Courier IMAP compatibles files.
virtual_maildir_extended = yes

# Usefull for Courier IMAP..
virtual_maildir_suffix = Maildir/

# Generate maildirsize files or not
virtual_create_maildirsize = yes

vmailbox maps file
The software diskquota can be user either on Maildir format or mailbox
# This are maibox users
user1@domain.com.br com/d/do/domain.com.br/user1
user2@domain.com.br com/d/do/domain.com.br/user2
# This are Maidir users
user1@domain.net.br net/d/do/domain.net.br/user1/
user2@domain.net.br net/d/do/domain.net.br/user2/

vquota maps file
This file contains in bytes the maximum diskspace authorised per emails.
# domain.com.br are unlucky one... they have a max to 2M diskquota
user1@domain.com.br 2048000
user2@domain.com.br 2048000
# domain.net.br are more lucky... and some don't have any limits (0 !)
user1@domain.net.br 5192000
user2@domain.net.br 0
And now ?
For this example I used flat files and hash: postfix dictionary, now you can use allmost every postfix dicts, like ldap, mysql, hash, static, tcp and so on.

PLEASE - ATTENTION!!
Don't Forget:
set the transport to VIRTUAL, or this patch not work!
transport_maps = hash:/etc/postfix/transport
Example:
transport:
domain.com.br virtual:
domain.net.br virtual:

Mailing List
Please DO NOT send me direct emails about configurations, postfix hints, etc, use the mailing list instead.  The mailing list is located here.


TODO List
Well, there is a lots todo :
  • Add suport for vacations messages for virtual users.
  • Hoping that will be integrated into Postfix mainstream... Unfortunatly it seems that Wietse Venema doesn't want to do...
  • Add support to customized bounce reason also on mbox supports
  • Any other ideas?




contact: Anderson Nadal
PGP public key 0x7D3ACEFC9D28DF94 at www.rnp.br/keyserver



Valid HTML 4.01!