Moved VirtualMailManager/Exceptions to VirtualMailManager/errors.
Renamed VMM*Exception classes to *Error.
No longer add the attribute 'message' to VMMError if it doesn't exist, like in
Python 2.4. It has been deprecated as of Python 2.6.
Also removed the methods code() and msg(), the values are now accessible via
the attributes 'code' and 'msg'.
InstallationPrerequisitesYoushouldalreadyhaveinstalledandconfiguredPostfix,DovecotandPostgreSQL.YouhavetoinstallPythonandpyPgSQL*tousetheVirtualMailManager.IfyouwanttostorethepasswordsasPLAIN-MD4digestyouhavealsotoinstallpython-crypto<http://www.amk.ca/python/code/crypto.html>.*=http://pypgsql.sourceforge.net/(Debian:python-pgsql)ConfiguringPostgreSQL(formoredetailssee:http://vmm.localdomain.org/PreparingPostgreSQL)*/etc/postgresql/8.4/main/pg_hba.conf[ifyouprefertoconnectviaTCP/IP]# IPv4 local connections:hostmailsys+mailsys127.0.0.1/32md5[ifyouwanttoconnectthroughalocalUnix-domainsocket]# "local" is for Unix domain socket connections onlylocalmailsys+mailsysmd5# reload configuration/etc/init.d/postgresql-8.4force-reload*CreateaDBuserifnecessary:DBSuperuser:createuser-s-d-r-E-e-P$USERNAMEDBUser:createuser-d-E-e-P$USERNAME*CreateDatabaseanddbusersforvmm,PostfixandDovecotconnectingtoPostgreSQL:psqltemplate1# create users, group and the databaseCREATEUSERvmmENCRYPTEDPASSWORD'DB PASSWORD for vmm';CREATEUSERdovecotENCRYPTEDpassword'DB PASSWORD for Dovecot';CREATEUSERpostfixENCRYPTEDpassword'DB PASSWORD for Postfix';CREATEROLEmailsysWITHUSERpostfix,dovecot,vmm;CREATEDATABASEmailsysWITHOWNERvmmENCODING'UTF8';\q# connect to the new databasepsqlmailsysvmm-W-h127.0.0.1# either import the database structure for Dovecot v1.0.x/v1.1.x\i/path/to/create_tables.pgsql# or import the database structure for Dovecot v1.2.x\i/path/to/create_tables-dovecot-1.2.x.pgsql# set permissionsGRANTSELECTONdovecot_password,dovecot_userTOdovecot;GRANTSELECTONpostfix_alias,postfix_gid,postfix_maildir,postfix_relocated,postfix_transport,postfix_uidTOpostfix;# leave psql\qCreatedirectoryforyourmailsmkdir/srv/mailcd/srv/mail/mkdir0123456789abcdefghijklmnopqrstuvwxyzchmod771/srv/mailchgrp-Rmail/srv/mailchmod751/srv/mail/*ConfiguringDovecot*/etc/dovecot/dovecot.conf# all your other settings#disable_plaintext_auth = nomail_location=maildir:~/Maildirmail_privileged_group=mailfirst_valid_uid=70000first_valid_gid=70000protocollda{postmaster_address=postmaster@YOUR-DOMAIN.TLD}authdefault{mechanisms=cram-md5loginplainpassdbsql{args=/etc/dovecot/dovecot-sql.conf}userdbsql{args=/etc/dovecot/dovecot-sql.conf}user=nobodysocketlisten{master{path=/var/run/dovecot/auth-mastermode=0600}client{path=/var/spool/postfix/private/authmode=0660user=postfixgroup=postfix}}}*/etc/dovecot/dovecot-sql.confdriver=pgsqlconnect=host=localhostdbname=mailsysuser=dovecotpassword=$Dovecot_PASSdefault_pass_scheme=PLAINpassword_query=SELECT"user",passwordFROMdovecot_passwordWHERE"user"='%u'AND%Lsuser_query=SELECThome,uid,gid,'maildir:'||mailASmailFROMdovecot_userWHEREuserid='%u'ProvidearootSETUIDcopyofDovecot's deliver agent for Postfixmkdir-p/usr/local/lib/dovecotchmod700/usr/local/lib/dovecotchownnobody/usr/local/lib/dovecotcp/usr/lib/dovecot/deliver/usr/local/lib/dovecot/# on BSD:chgrpnobody/usr/local/lib/dovecot/deliver# on Linux:chgrpnogroup/usr/local/lib/dovecot/deliverchmodu+s,o-rwx/usr/local/lib/dovecot/deliverStartorrestartDovecotConfiguringPostfix's master.cf# Add Dovecot's deliver agentdovecotunix-nn--pipeflags=DRhuuser=nobodyargv=/usr/local/lib/dovecot/deliver-f${sender}-d${user}@${nexthop}-n-m${extension}ConfiguringPostfix's main.cf# relocated users from the database#relocated_maps = pgsql:/etc/postfix/pgsql-relocated_maps.cf# virtual domainsvirtual_mailbox_domains=pgsql:/etc/postfix/pgsql-virtual_mailbox_domains.cfvirtual_alias_maps=pgsql:/etc/postfix/pgsql-virtual_alias_maps.cftransport_maps=pgsql:/etc/postfix/pgsql-transport.cfvirtual_minimum_uid=70000virtual_uid_maps=pgsql:/etc/postfix/pgsql-virtual_uid_maps.cfvirtual_gid_maps=pgsql:/etc/postfix/pgsql-virtual_gid_maps.cfvirtual_mailbox_base=/virtual_mailbox_maps=pgsql:/etc/postfix/pgsql-virtual_mailbox_maps.cf# dovecot LDAdovecot_destination_recipient_limit=1virtual_transport=dovecot:# dovecot SASLsmtpd_sasl_type=dovecotsmtpd_sasl_path=private/authsmtpd_sasl_auth_enable=yes# Keep smtpd_sasl_local_domain identical to Dovecot's auth_default_realm:# empty. Both are empty by default. Let it commented out.# Read more at: http://wiki.dovecot.org/Authentication/Mechanisms/DigestMD5#smtpd_sasl_local_domain =smtpd_sasl_security_options=noplaintext,noanonymous#smtpd_sasl_security_options = noanonymous#broken_sasl_auth_clients = yessmtpd_recipient_restrictions=permit_mynetworkspermit_sasl_authenticatedreject_unauth_destinationInstallingtheVirtualMailManagerandconfiguretherestInstallingfromSVNorvmm-x.y.z.tar.bz2aftercheckingoutfromsvnorextractingthearchivechangeintothenewdirectoryandtype:./install.sheditallthepgsql-*.cffilesin/etc/postfixreloadpostfix# configure the Virtual Mail Managervmmconfigure# for help typevmmhelp