

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Problem with maildrop...| From | Sent On | Attachments |
|---|---|---|
| Marco Bertorello | Nov 25, 2005 4:05 am | |
| Roman Dergam | Nov 26, 2005 3:28 pm | |
| Sam Varshavchik | Nov 26, 2005 8:18 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [maildropl] Problem with maildrop & mysql for virtual quota | Actions... |
|---|---|---|
| From: | Roman Dergam (lis...@intu.cz) | |
| Date: | Nov 26, 2005 3:28:41 pm | |
| List: | net.sourceforge.lists.courier-maildrop | |
Dne pá 25. listopadu 2005 13:05 Marco Bertorello napsal(a):
cat /etc/maildropmysql.config
Hello,
here is my file, made out of a commented version I found somewhere on the internet (thanks to its author). I hope it will help.
Roman
cat /etc/courier/maildropmysql.config # maildropmysql.config - this file defines how maildrop connects to # your MySQL database and how it maps the attributes it needs to # extract from your database to your fields.
# Host name of your MySQL server. # DEFAULT: localhost hostname localhost
# Port for TCP connections to your MySQL server. # OPTIONAL: if undefined, MySQL client library will use your my.cnf # settings # DEFAULT: 3306 #port 3306
# Path to the UNIX domain socket for your MySQL server. # OPTIONAL: if undefined, MySQL client library will use your my.cnf # settings # DEFAULT: none #socket /var/lib/mysql/mysql.sock
# MySQL database user. # DEFAULT: none (error if undefined) dbuser xxxx
# MySQL database user's password. # DEFAULT: none (error if undefined) dbpw xxxx
# Name of the MySQL database holding the table that maildrop will # query. # DEFAULT: none (error if undefined) database xxxx
# MySQL Field definitions. # # This section allows you to specify the actual fields you # use in your MySQL table. You can map the attributes below to # any schema, but here is a schema using the defaults: # # CREATE TABLE maildrop ( # address VARCHAR(128) NOT NULL, # uid MEDIUMINT, # optional # gid MEDIUMINT, # optional # homedir VARCHAR(255) NOT NULL, # mailbox VARCHAR(255) NOT NULL, # quota VARCHAR(64) # optional # ); # # IMPORTANT: all fields mentioned below must be returned by the query, # but that doesn't mean they have to exist in your table. Some are # optional, and can be set to an empty literal string. # i.e. # quota_field '' # # Also, the field definitions don't necessarily have to be a single # field name. You can use most valid MySQL supported SQL functions. # For example, to build the 'homedirectory_field' from several # database columns, you can use a definition like: # homedirectory_field CONCAT_WS('/','/var/mail',domain,owner) # # Below is an approximate (pseudo-SQL) template of the query maildrop # will execute. The items shown in angle brackets correspond with the # configuration attributes that you can set below. # # SELECT <address_field>, # <uidnumber_field> | <default_uidnumber>, # <gidnumber_field> | <default_uidnumber>, # <homedirectory_field>, # <mailbox_field>, # <quota_field> | <default_quota> # FROM <dbtable> # WHERE <address_field> = "us...@yourdomain.com" # <where_clause>
# Name of the MySQL table that maildrop will query. # DEFAULT: maildrop dbtable users
# The full email address of the user (i.e. us...@yourdomain.com). # This is the primary field searched upon by maildrop. # DEFAULT: address address_field address
uid_field id
# The numeric UID of the user that owns the mail files for this user. # This may be a specific UID per user, or a single (static) UID for # every user (full 'virtual' user configuration), or a combination. # # You can specify static values using string literals, for example: # uidnumber_field '5000' # # OPTIONAL: uses value defined by 'default_uidnumber' if this is # undefined. # DEFAULT: '' uidnumber_field uid
# Default uid number to use in case no data is returned by the query # for the uidnumber_field. # DEFAULT: ?? (error if undefined) default_uidnumber '5000'
# The GID of the user that owns the mail files for this user. # This may be a specific GID per user, or a single (static) GID for # every user (full 'virtual' user configuration), or a combination. # # You can specify static values using string literals, for example: # gidnumber_field '5000' # # OPTIONAL: uses value defined by 'default_gidnumber' if this is # undefined. # DEFAULT: '' gidnumber_field gid
# Default GID number to use in case no data is returned by the query # for the gidnumber_field. # DEFAULT: ?? (error if undefined) default_gidnumber '8'
# Absolute path to the user's home directory. # This may be the same as the user's maildir. # # Tip: you can add a static prefix to what you have stored in your # database using a definition like: # homedirectory_field CONCAT('/var/mail/',user) # where the user field contains a user ID, resulting in a returned # value like '/var/mail/smith'. Or combine several fields as suggested # above in the introduction. # # DEFAULT: homedir homedirectory_field CONCAT(home,'/',maildir)
# The path to the user's mailbox, which is either the path to a file # in the case of an mbox format mailbox, or a path to a directory, # with a trailing slash, in the case of a Maildir format mailbox. The # path can be absolute or relative to the value returned by # 'homedirectory_field'. # # Tip: you can add a static prefix or combine several fields. See # examples above for details. # # DEFAULT: mailbox (error if undefined) maildir_field maildir
# The quota for this user. # (See 'default_quota' below for the format of the data that should be # returned by this field.) # # OPTIONAL: uses value defined by 'default_quota' if this is # undefined. If neither contains a value, quotas are disabled. # DEFAULT: '' #quota_field CONCAT(quota,'S') quota_field quota
# Default quota to use in case no data is returned by the query # for the quota_field. # Format: <bytes>S,<messages>C # You can specify either or both of <bytes> or <messages>. i.e.: # default_quota 10485760S,10000C # See ??? man page for the specifics of the format. # # OPTIONAL: not used unless defined # DEFAULT: '' #default_quota 1073741824S
# An an additional WHERE clause. It can be set to any SQL that would # be valid in a WHERE clause, and is appended to the existing WHERE # clause used in the query template, so it will typically need to # start with an 'AND'. i.e. # where_clause "AND active='Y'" # # OPTIONAL: not used unless defined # DEFAULT: '' #where_clause ""







