INSTALL
author martin f. krafft <madduck@madduck.net>
Sun, 08 Apr 2012 11:54:17 +0200
branchv0.6.x
changeset 498 419c929739fd
parent 378 af56cee51e67
child 563 b17a9d7a59ae
permissions -rw-r--r--
Ignore more Debian-build-related files Debian produces log and debhelper files in debian/* that do not need to be known to mercurial. Hence, this patch adds the globs to .hgignore.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     1
Installation Prerequisites
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     2
You should already have installed and configured Postfix, Dovecot and
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     3
PostgreSQL.
268
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
     4
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
     5
The Virtual Mail Manager depends on:
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
     6
    - Python (>= 2.4.0)
356
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
     7
    - Psycopg 2¹ or pyPgSQL²
14
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 11
diff changeset
     8
268
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
     9
If you are using Python <= 2.5.0:
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    10
    - if you want to store your users' passwords as PLAIN-MD4 digest in
356
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
    11
      the database, vmm will try to use Crypto.Hash.MD4 from PyCrypto³.
268
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    12
    - if you are using Dovecot >= v1.1.0 and you want to store your users'
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    13
      passwords as SHA256 or SSHA256 hashes, vmm will try to use
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    14
      Crypto.Hash.SHA256 from PyCrypto². For SHA256/SSHA256 you should have
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    15
      at least use PyCrypto in version 2.1.0alpha1.
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    16
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    17
    When the Crypto.Hash module couldn't be imported, vmm will use
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    18
    dovecotpw/doveadm, if the misc.password_scheme setting in the vmm.cfg
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    19
    is set to PLAIN-MD4, SHA256 or SSHA256
beb8f4421f92 VMM: added new modules password and pycompat.hashlib.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 248
diff changeset
    20
356
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
    21
[1] Psycopg: <http://initd.org/psycopg/> (Debian: python-psycopg2)
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
    22
[2] pyPgSQL: <http://pypgsql.sourceforge.net/> (Debian: python-pgsql)
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
    23
[3] PyCrypto: <http://www.pycrypto.org/> (Debian: python-crypto)
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    24
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    25
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    26
Configuring PostgreSQL
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    27
(for more details see: http://vmm.localdomain.org/PreparingPostgreSQL)
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    28
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    29
* /etc/postgresql/8.4/main/pg_hba.conf
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    30
  [ if you prefer to connect via TCP/IP ]
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    31
    # IPv4 local connections:
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    32
    host    mailsys     +mailsys    127.0.0.1/32          md5
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    33
  [ if you want to connect through a local Unix-domain socket ]
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    34
    # "local" is for Unix domain socket connections only
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    35
    local   mailsys     +mailsys                          md5
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    36
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    37
    # reload configuration
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    38
    /etc/init.d/postgresql-8.4 force-reload
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    39
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    40
* Create a DB user if necessary:
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    41
    DB Superuser:
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    42
    createuser -s -d -r -E -e -P $USERNAME
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    43
    DB User:
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    44
    createuser -d -E -e -P $USERNAME
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    45
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    46
* Create Database and db users for vmm, Postfix and Dovecot
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    47
    connecting to PostgreSQL:
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    48
    psql template1
128
cf8116625866 Converted VirtualMailManager and Postconf to new-style classes.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 127
diff changeset
    49
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    50
    # create users, group and the database
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    51
    CREATE USER vmm ENCRYPTED PASSWORD 'DB PASSWORD for vmm';
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    52
    CREATE USER dovecot ENCRYPTED password 'DB PASSWORD for Dovecot';
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    53
    CREATE USER postfix ENCRYPTED password 'DB PASSWORD for Postfix';
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    54
    CREATE ROLE mailsys WITH USER postfix, dovecot, vmm;
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    55
    CREATE DATABASE mailsys WITH OWNER vmm ENCODING 'UTF8';
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    56
    \q
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    57
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    58
    # connect to the new database
165
7e50e4c49ed7 INSTALL: Adapted pgsql configuration steps to that in the wiki.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
    59
    psql mailsys vmm -W -h 127.0.0.1
127
97a9f6dd954b Updated documentation
Pascal Volk <neverseen@users.sourceforge.net>
parents: 100
diff changeset
    60
    # either import the database structure for Dovecot v1.0.x/v1.1.x
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    61
    \i /path/to/create_tables.pgsql
127
97a9f6dd954b Updated documentation
Pascal Volk <neverseen@users.sourceforge.net>
parents: 100
diff changeset
    62
    # or import the database structure for Dovecot v1.2.x
97a9f6dd954b Updated documentation
Pascal Volk <neverseen@users.sourceforge.net>
parents: 100
diff changeset
    63
    \i /path/to/create_tables-dovecot-1.2.x.pgsql
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    64
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    65
    # set permissions
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    66
    GRANT SELECT ON dovecot_password, dovecot_user TO dovecot;
15
1607f7b2dba9 * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 14
diff changeset
    67
    GRANT SELECT ON postfix_alias, postfix_gid, postfix_maildir,
1607f7b2dba9 * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 14
diff changeset
    68
    postfix_relocated, postfix_transport, postfix_uid TO postfix;
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    69
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    70
    # leave psql
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    71
    \q
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    72
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    73
Create directory for your mails
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    74
  mkdir /srv/mail
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    75
  cd /srv/mail/
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    76
  mkdir 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    77
  chmod 771 /srv/mail
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    78
  chmod 751 /srv/mail/*
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    79
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    80
Configuring Dovecot
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    81
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    82
* /etc/dovecot/dovecot.conf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    83
    # all your other settings
75
af813ede1e19 * 'create_optional_types_and_functions.pgsql'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 30
diff changeset
    84
    #disable_plaintext_auth = no
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    85
    mail_location = maildir:~/Maildir
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    86
    first_valid_uid = 70000
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    87
    first_valid_gid = 70000
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    88
    protocol lda {
75
af813ede1e19 * 'create_optional_types_and_functions.pgsql'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 30
diff changeset
    89
      postmaster_address = postmaster@YOUR-DOMAIN.TLD
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    90
    }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    91
    auth default {
91
0e5b2835414d * 'INSTALL'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 75
diff changeset
    92
      mechanisms = cram-md5 login plain
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    93
      passdb sql {
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    94
        args = /etc/dovecot/dovecot-sql.conf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    95
      }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    96
      userdb sql {
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    97
        args = /etc/dovecot/dovecot-sql.conf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    98
      }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    99
      user = nobody
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   100
      socket listen {
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   101
        master {
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   102
          path = /var/run/dovecot/auth-master
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   103
          mode = 0600
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   104
        }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   105
        client {
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   106
          path = /var/spool/postfix/private/auth
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   107
          mode = 0660
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   108
          user = postfix
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   109
          group = postfix
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   110
        }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   111
      }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   112
    }
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   113
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   114
* /etc/dovecot/dovecot-sql.conf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   115
    driver = pgsql
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   116
    connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS
24
48ea255e8a85 * 'vmm.cfg.5'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 20
diff changeset
   117
    default_pass_scheme = PLAIN
364
cfd29e65e4f2 INSTALL: Use the %L modifier for %u variable in password_query
Pascal Volk <neverseen@users.sourceforge.net>
parents: 247
diff changeset
   118
    password_query = SELECT "user", password FROM dovecot_password WHERE "user"='%Lu' AND %Ls
378
af56cee51e67 INSTALL: Updated "user_query".
Pascal Volk <neverseen@users.sourceforge.net>
parents: 365
diff changeset
   119
    user_query = SELECT home, uid, gid, mail FROM dovecot_user WHERE userid = '%Lu'
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   120
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   121
Provide a root SETUID copy of Dovecot's deliver agent for Postfix
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   122
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   123
    mkdir -p /usr/local/lib/dovecot
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   124
    chmod 700 /usr/local/lib/dovecot
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   125
    chown nobody /usr/local/lib/dovecot
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   126
    cp /usr/lib/dovecot/deliver /usr/local/lib/dovecot/
247
dbcb29ac89fa INSTALL: simplified the 'SETUID copy of deliver' part
Pascal Volk <neverseen@users.sourceforge.net>
parents: 135
diff changeset
   127
    chown root:`id -g nobody` /usr/local/lib/dovecot/deliver
127
97a9f6dd954b Updated documentation
Pascal Volk <neverseen@users.sourceforge.net>
parents: 100
diff changeset
   128
    chmod u+s,o-rwx /usr/local/lib/dovecot/deliver
97a9f6dd954b Updated documentation
Pascal Volk <neverseen@users.sourceforge.net>
parents: 100
diff changeset
   129
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   130
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   131
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   132
Start or restart Dovecot
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   133
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   134
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   135
Configuring Postfix's master.cf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   136
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   137
    # Add Dovecot's deliver agent
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   138
    dovecot   unix  -       n       n       -       -       pipe
378
af56cee51e67 INSTALL: Updated "user_query".
Pascal Volk <neverseen@users.sourceforge.net>
parents: 365
diff changeset
   139
      flags=DORhu user=nobody argv=/usr/local/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -n -m ${extension}
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   140
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   141
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   142
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   143
Configuring Postfix's main.cf
100
b581e747e720 INSTALL, man/*: small enhancement and corrections
Pascal Volk <neverseen@users.sourceforge.net>
parents: 92
diff changeset
   144
    # relocated users from the database
b581e747e720 INSTALL, man/*: small enhancement and corrections
Pascal Volk <neverseen@users.sourceforge.net>
parents: 92
diff changeset
   145
    #relocated_maps = pgsql:/etc/postfix/pgsql-relocated_maps.cf
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   146
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   147
    # virtual domains
75
af813ede1e19 * 'create_optional_types_and_functions.pgsql'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 30
diff changeset
   148
    virtual_mailbox_domains = pgsql:/etc/postfix/pgsql-virtual_mailbox_domains.cf
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   149
    virtual_alias_maps = pgsql:/etc/postfix/pgsql-virtual_alias_maps.cf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   150
    transport_maps = pgsql:/etc/postfix/pgsql-transport.cf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   151
    virtual_minimum_uid = 70000
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   152
    virtual_uid_maps = pgsql:/etc/postfix/pgsql-virtual_uid_maps.cf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   153
    virtual_gid_maps = pgsql:/etc/postfix/pgsql-virtual_gid_maps.cf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   154
    virtual_mailbox_base = /
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   155
    virtual_mailbox_maps = pgsql:/etc/postfix/pgsql-virtual_mailbox_maps.cf
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   156
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   157
    # dovecot LDA
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   158
    dovecot_destination_recipient_limit = 1
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   159
    virtual_transport = dovecot:
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   160
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   161
    # dovecot SASL
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   162
    smtpd_sasl_type = dovecot
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   163
    smtpd_sasl_path = private/auth
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   164
    smtpd_sasl_auth_enable = yes
92
aa741e8657b9 * 'INSTALL'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 91
diff changeset
   165
    # Keep smtpd_sasl_local_domain identical to Dovecot's auth_default_realm:
aa741e8657b9 * 'INSTALL'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 91
diff changeset
   166
    # empty. Both are empty by default. Let it commented out.
aa741e8657b9 * 'INSTALL'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 91
diff changeset
   167
    # Read more at: http://wiki.dovecot.org/Authentication/Mechanisms/DigestMD5
aa741e8657b9 * 'INSTALL'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 91
diff changeset
   168
    #smtpd_sasl_local_domain =
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   169
    smtpd_sasl_security_options = noplaintext, noanonymous
75
af813ede1e19 * 'create_optional_types_and_functions.pgsql'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 30
diff changeset
   170
    #smtpd_sasl_security_options = noanonymous
af813ede1e19 * 'create_optional_types_and_functions.pgsql'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 30
diff changeset
   171
    #broken_sasl_auth_clients = yes
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   172
14
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 11
diff changeset
   173
    smtpd_recipient_restrictions =
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 11
diff changeset
   174
      permit_mynetworks
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 11
diff changeset
   175
      permit_sasl_authenticated
ebc9b864bc9a * 'update_config_0.3.x-0.4.py'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 11
diff changeset
   176
      reject_unauth_destination
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   177
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   178
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   179
Installing the Virtual Mail Manager and configure the rest
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   180
356
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
   181
    Installing from Mercurial or vmm-x.y.z.tar.bz2
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
   182
    after cloning from the hg repo or extracting the archive change into the
61e732e4cb3e Updated INSTALL and setup.py.
Pascal Volk <neverseen@users.sourceforge.net>
parents: 271
diff changeset
   183
    new directory and type:
30
24d8baf0cd6b * 'INSTALL'
Pascal Volk <neverseen@users.sourceforge.net>
parents: 24
diff changeset
   184
        ./install.sh
0
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   185
    edit all the pgsql-*.cf files in /etc/postfix
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   186
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   187
    reload postfix
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   188
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   189
    # configure the Virtual Mail Manager
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   190
    vmm configure
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   191
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   192
    # for help type
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   193
    vmm help
bb0aa2102206 Initial import @sf.net
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
   194