equal
  deleted
  inserted
  replaced
  
    
    
    29       | 
    29       | 
    30     # create database  | 
    30     # create database  | 
    31     CREATE DATABASE mailsys ENCODING 'UTF8';  | 
    31     CREATE DATABASE mailsys ENCODING 'UTF8';  | 
    32     # connect to the new database  | 
    32     # connect to the new database  | 
    33     \c mailsys  | 
    33     \c mailsys  | 
    34     # import db structure  | 
    34     # either import the database structure for Dovecot v1.0.x/v1.1.x  | 
    35     \i /path/to/create_tables.pgsql  | 
    35     \i /path/to/create_tables.pgsql  | 
         | 
    36     # or import the database structure for Dovecot v1.2.x  | 
         | 
    37     \i /path/to/create_tables-dovecot-1.2.x.pgsql  | 
    36   | 
    38   | 
    37     # create users and group  | 
    39     # create users and group  | 
    38     CREATE USER postfix ENCRYPTED password 'DB PASSWORD for Postfix';  | 
    40     CREATE USER postfix ENCRYPTED password 'DB PASSWORD for Postfix';  | 
    39     CREATE USER dovecot ENCRYPTED password 'DB PASSWORD for Dovecot';  | 
    41     CREATE USER dovecot ENCRYPTED password 'DB PASSWORD for Dovecot';  | 
    40     CREATE ROLE mailsys WITH USER postfix, dovecot;  | 
    42     CREATE ROLE mailsys WITH USER postfix, dovecot;  | 
   101   | 
   103   | 
   102     mkdir -p /usr/local/lib/dovecot  | 
   104     mkdir -p /usr/local/lib/dovecot  | 
   103     chmod 700 /usr/local/lib/dovecot  | 
   105     chmod 700 /usr/local/lib/dovecot  | 
   104     chown nobody /usr/local/lib/dovecot  | 
   106     chown nobody /usr/local/lib/dovecot  | 
   105     cp /usr/lib/dovecot/deliver /usr/local/lib/dovecot/  | 
   107     cp /usr/lib/dovecot/deliver /usr/local/lib/dovecot/  | 
   106     chmod u+s /usr/local/lib/dovecot/deliver  | 
   108     chgrp nogroup /usr/local/lib/dovecot/deliver  | 
         | 
   109     chmod u+s,o-rwx /usr/local/lib/dovecot/deliver  | 
         | 
   110   | 
   107   | 
   111   | 
   108   | 
   112   | 
   109 Start or restart Dovecot  | 
   113 Start or restart Dovecot  | 
   110   | 
   114   | 
   111   | 
   115   |