# HG changeset patch # User Pascal Volk # Date 1343573212 0 # Node ID be0906181a10e87653a283610fb0e2aa76f61a36 # Parent 20141b967c0b658ee14f6eedc7462d345421150e doc: Added source of http://vmm.localdomain.org/. diff -r 20141b967c0b -r be0906181a10 doc/web/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/Makefile Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,153 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/vmm.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/vmm.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/vmm" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/vmm" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." diff -r 20141b967c0b -r be0906181a10 doc/web/source/_static/local.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/_static/local.conf Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,140 @@ +# A minimal configuration for a vmm setup with Dovecot v2.x. +# +# You could save this file as local.conf in the dovecot configuration directory +# (commonly /etc/dovecot or /usr/local/etc/dovecot). +# When you want to use this file as your configuration file for Dovecot, make +# sure you have commented out the line "!include conf.d/*.conf". The last line +# "!include_try local.conf" is sufficient. + +### +# conf.d/10-auth.conf +### +auth_mechanisms = plain login cram-md5 +passdb { + driver = sql + args = /usr/local/etc/dovecot/dovecot-sql.conf.ext +} +userdb { + driver = sql + args = /usr/local/etc/dovecot/dovecot-sql.conf.ext +} +#!include auth-system.conf.ext + +### +# conf.d/10-mail.conf +### +first_valid_gid = 70000 +first_valid_uid = 70000 +mail_access_groups = dovemail +mail_location = maildir:~/Maildir + +# uncomment if you want to use the quota plugin +#mail_plugins = quota + +### +# conf.d/10-master.conf +### + +# if you don't want to use secure imap, you have to disable the imaps listener +##service imap-login { +## inet_listener imaps { +## port = 0 +## } +##} + +service lmtp { + unix_listener /var/spool/postfix/private/dovecot-lmtp { + user = postfix + group = postfix + mode = 0600 + } +} + +service auth { + user = doveauth + unix_listener auth-userdb { + } + unix_listener /var/spool/postfix/private/dovecot-auth { + user = postfix + group = postfix + mode = 0600 + } +} + +service auth-worker { + unix_listener auth-worker { + user = doveauth + group = $default_internal_user + mode = 0660 + } + user = doveauth +} + +service dict { + unix_listener dict { + group = dovemail + mode = 0660 + } +} + +### +# conf.d/10-ssl.conf +### +# SSL/TLS support: yes, no, required. +#ssl = yes + +ssl_cert = = 8.4) +; * verify-full (PostgreSQL >= 8.4) +sslmode = prefer +; Database user name (String) +user = dbuser +; Database password (String) +pass = dbpassword +; Database name (String) +name = mailsys + +# +# mailbox settings +# +[mailbox] +; The mailbox format to be used for user's mailboxes. (String) +; Depending on the used Dovecot version there are up to 3 supported formats: +; * maildir - since Dovecot v1.0.0 +; * mdbox - since Dovecot v2.0.beta5 +; * sdbox - since Dovecot v2.0.rc3 +format = maildir +; A colon separated list of mailbox names, that should be created (String) +; e.g.: folders = Drafts:Sent:Templates:Trash:Lists.Dovecot:Lists.Postfix +folders = Drafts:Sent:Templates:Trash +; Name of the mailbox root directory in a user's home. (String) +; Usually used names (format: name): +; * maildir: Maildir +; * mdbox: mdbox +; * sdbox: sdbox +root = Maildir +; Set to true if the mailboxes from the folders option should be listed in +; the subscriptions file. (Boolean) +subscribe = true + +# +# Domain settings +# +[domain] +; Should vmm create the postmaster account when a new domain is created? +; (Boolean) +auto_postmaster = true +; Delete domain directory recursive when deleting a domain? (Boolean) +delete_directory = false +; Permissions for domain directories (Int) +; octal 0770 -> decimal 504 +directory_mode = 504 +; Force deletion of accounts and aliases when deleting a domain (Boolean) +force_deletion = false +; +; The service settings will be evaluated and applied when a domain is +; created. The service settings of the domain will be applied when you +; create a new account. +; Use the subcommand domainservices to modify a domain's service settings. +; Or userservices in order to update the service setting of an account. +; Allow smtp by default? (Boolean) +smtp = true +; Allow pop3 by default? (Boolean) +pop3 = true +; Allow imap by default? (Boolean) +imap = true +; Allow managesieve by default? (Boolean) +sieve = true +; +; The quota_* settings will be evaluated and applied when a domain is +; created. The domain's quota_* settings will be applied when an account +; is added to a domain. +; Use the subcommand domainquota to modify a domain's quota limits. +; Or userquota in order to update an account's quota limits. +; Quota limit in bytes. 0 means unlimited (String) +; The value can have one of the suffixes: +; * b: bytes +; * k: kilobytes +; * M: megabytes +; * G: gigabytes +; 1024 is the same as 1024b or 1k +quota_bytes = 0 +; Quota limit in number of messages. 0 means unlimited (Int) +quota_messages = 0 +; +; The transport setting will be evaluated and applied when a domain is +; created. The domain's transport setting will be applied when an account +; is added to a domain. +; Use the subcommand domaintransport to modify the transport of a domain. +; Or usertransport in order to update an account's transport setting. +; default transport for domains and accounts (String) +transport = dovecot: + +# +# Account settings +# +[account] +; Delete the user's home directory recursive when deleting an account? (Boolean) +delete_directory = false +; Permissions for the user's home directory and mail directories (Int) +; octal 0700 -> decimal 448 +directory_mode = 448 +; Display disk usage in account info by default? (Boolean) +disk_usage = false +; Should vmm generate a random password when no password was given for the +; useradd subcommand? (Boolean) +random_password = false +; How many characters to include in the generated passwords? (Int) +password_length = 8 + +# +# external binaries +# +[bin] +; location of dovecotpw (String) +dovecotpw = /usr/sbin/dovecotpw +; location of disk usage (String) +du = /usr/bin/du +; location of postconf (String) +postconf = /usr/sbin/postconf + +# +# misc settings +# +[misc] +; The base directory for all domains/accounts (String) +base_directory = /srv/mail +; Number of encryption rounds for the password_scheme BLF-CRYPT (Int) +crypt_blowfish_rounds = 5 +; Number of encryption rounds for the password_scheme SHA256-CRYPT (Int) +crypt_sha256_rounds = 5000 +; Number of encryption rounds for the password_scheme SHA512-CRYPT (Int) +crypt_sha512_rounds = 5000 +; the version number from `dovecot --version` (String) +; e.g. 1.1.18; 1.2.11; 2.0.beta4 +dovecot_version = 1.2.11 +; Password scheme to use (see also: dovecotpw -l) (String) +password_scheme = CRAM-MD5 + diff -r 20141b967c0b -r be0906181a10 doc/web/source/_static/vmm_logo.png Binary file doc/web/source/_static/vmm_logo.png has changed diff -r 20141b967c0b -r be0906181a10 doc/web/source/_templates/layout.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/_templates/layout.html Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,19 @@ +{% extends "!layout.html" %} +{%- block footer %} + +{%- endblock %} diff -r 20141b967c0b -r be0906181a10 doc/web/source/conf.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/conf.py Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +# +# vmm documentation build configuration file, created by +# sphinx-quickstart on Mon Jul 2 21:23:52 2012. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.coverage'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'vmm' +copyright = u'2007 - 2012, Pascal Volk' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.6' +# The full version, including alpha/beta/rc tags. +release = '0.6.0' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = [] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'friendly' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'pyramid' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +html_logo = '_static/vmm_logo.png' + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +html_domain_indices = False + +# If false, no index is generated. +html_use_index = False + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +html_use_opensearch = 'http://vmm.localdomain.org' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'vmmdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'vmm.tex', u'vmm Documentation', + u'Pascal Volk', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'vmm', u'vmm Documentation', + [u'Pascal Volk'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'vmm', u'vmm Documentation', + u'Pascal Volk', 'vmm', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' diff -r 20141b967c0b -r be0906181a10 doc/web/source/download.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/download.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,41 @@ +=============== +Downloading vmm +=============== + +Current version +--------------- +|curr_vers_rel_date| +|rel_hist| + +Download a gzip compressed archive +---------------------------------- +vmm could be downloaded from the `download page`_ at `SourceForge`_. To +extract the downloaded archive use ``tar xzf vmm-0.6.0.tar.gz``. This will +create the new directory :file:`vmm-0.6.0` in the current working directory. + +Verify the downloaded archive +----------------------------- +If you have downloaded the archive from the download site you can +optionally verify the integrity_ of this archive. +In order to verify the integrity of the archive you have to download the +corresponding signature file (:file:`vmm-0.6.0.tar.gz.sig`) too. +The signature can be verified using GPG_ or PGP_. +For example to check the signature of the archive :file:`vmm-0.6.0.tar.gz` +you can execute this command ``gpg --verify vmm-0.6.0.tar.gz.sig``. + +The tarball was signed by Pascal Volk (ID: CEC0904E). +You can fetch the public key from a key server using the command +``gpg --recv-keys 0xCEC0904E``. + +Get vmm from the Mercurial repository +------------------------------------- +To get a tagged clone of the current vmm release from the Mercurial_ +repository use: +``hg clone http://hg.localdomain.org/vmm/ -r vmm-0.6.0 vmm-0.6.0``. +This will put the files into the new created directory :file:`vmm-0.6.0`. + +When you omit the ``-r vmm-0.6.0`` option, you will get the latest changes +from the `vmm repository`_. This code may work for you or not. + +.. include:: substitutions.rst +.. include:: ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/ext_references.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/ext_references.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,46 @@ +.. External references +.. _AuthDatabase/SQL: http://wiki.dovecot.org/AuthDatabase/SQL +.. _COPYING: http://hg.localdomain.org/vmm/file/tip/COPYING +.. _Client Authentication: \ + http://wiki.postgresql.org/wiki/Client_Authentication +.. _Dovecot wiki: http://wiki2.dovecot.org/ +.. _Dovecot: http://dovecot.org/ +.. _GID: http://en.wikipedia.org/wiki/Group_identifier_%28Unix%29 +.. _GPG: http://en.wikipedia.org/wiki/GNU_Privacy_Guard +.. _IDN: http://en.wikipedia.org/wiki/Internationalized_domain_name +.. _LDA: http://wiki.dovecot.org/LDA +.. _Maildir: http://wiki2.dovecot.org/MailboxFormat/Maildir +.. _MainConfig: http://wiki.dovecot.org/MainConfig +.. _Mercurial: http://mercurial.selenic.com/ +.. _PGP: http://en.wikipedia.org/wiki/Pretty_Good_Privacy +.. _Postfix: http://www.postfix.org/ +.. _PostgreSQL: http://www.postgresql.org/ +.. _Psycopg: http://initd.org/psycopg/ +.. _PyCrypto: http://www.pycrypto.org/ +.. _Python: http://www.python.org/ +.. _SourceForge: http://sourceforge.net/ +.. _UID: http://en.wikipedia.org/wiki/User_identifier_%28Unix%29 +.. _Upgrading: http://wiki2.dovecot.org/Upgrading +.. _dbox: http://wiki2.dovecot.org/MailboxFormat/dbox +.. _download page: https://sourceforge.net/projects/vmm/files/ +.. _freenode: http://freenode.net/ +.. _integrity: http://en.wikipedia.org/wiki/Data_integrity +.. _issue tracker: https://bitbucket.org/pvo/vmm/issues +.. _mxDateTime: http://www.egenix.com/products/python/mxBase/mxDateTime/ + http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html +.. _mxTools: http://www.egenix.com/products/python/mxBase/mxTools/ +.. _passdb: http://wiki.dovecot.org/PasswordDatabase +.. _pg_dump: http://www.postgresql.org/docs/current/static/app-pgdump.html +.. _pg_hba.conf: \ +.. _pgsql_table(5): http://www.postfix.org/pgsql_table.5.html +.. _pipe(8): http://www.postfix.org/pipe.8.html +.. _pyPgSQL: http://pypgsql.sourceforge.net/ +.. _relocated: http://www.postfix.org/relocated.5.html +.. _setuid: http://en.wikipedia.org/wiki/Setuid +.. _transport: http://www.postfix.org/transport.5.html +.. _userdb: http://wiki.dovecot.org/UserDatabase +.. _virtual_alias_expansion_limit: \ + http://www.postfix.org/postconf.5.html#virtual_alias_expansion_limit +.. _vmm repository: http://hg.localdomain.org/vmm/ +.. _vmm-users: http://lists.sourceforge.net/lists/listinfo/vmm-users +.. _vmm: irc://chat.freenode.net/vmm diff -r 20141b967c0b -r be0906181a10 doc/web/source/features.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/features.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,69 @@ +=============== +Features of vmm +=============== + +General features +---------------- + ‣ Unicode/UTF-8 capable (input/storage/output) + ‣ supports IDN_ + ‣ supports the mailbox format Maildir_ and Dovecot's own high-performance + mailbox formats single- and multi-\ dbox_ + ‣ configurable basic mailbox structure, including sub-mailboxes + ‣ multilingual — currently: + + * Dutch + * English + * Finnish + * French + * German + * Vietnamese + +Domain features +--------------- + ‣ configurable transport_ setting per domain + ‣ unique group identifier (GID) per domain + ‣ each domain may have one or more alias domain names + ‣ activate or deactivate services (SMTP, POP3, IMAP and ManageSieve) for new + or all accounts of a domain + ‣ configurable quota limits (size and/or number of messages) for the + domain's accounts + ‣ supports relocated_ users + ‣ the postmaster account can be created automatically when a new domain is + created + ‣ supports per-domain catch-all aliases + +Alias domain features +--------------------- + ‣ alias domain names can be switched between domains + +Account features +---------------- + ‣ configurable transport per account + ‣ activate or deactivate one/more/all services (SMTP, POP3, IMAP and + ManageSieve) per account + ‣ configurable quota limit (size and/or number of messages) per user + ‣ per-account configuration overrides defaults defined by the domain, + otherwise the setting is inherited + ‣ unique user identifier (UID) per user + +Alias features +-------------- + ‣ supports multiple destinations per e-mail alias + ‣ destinations can be deleted separately + ‣ respects Postfix' virtual_alias_expansion_limit_ on creation + ‣ destinations can be interpolated using the original address' local-part + and domain, allowing aliases to have different meaning in alias domains, + e.g. with the following defined in example.org:: + + postmaster@example.org → postmaster+%d@admin.example.org + + If example.com is an alias domain of example.org, the alias will become:: + + postmaster@example.org → postmaster+example.org@admin.example.org + postmaster@example.com → postmaster+example.com@admin.example.org + +Wanted features +--------------- + ‣ Do you want more? Please use the `issue tracker`_ to submit your proposal. + +.. include:: ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/index.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/index.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,43 @@ +============================ +vmm - a virtual mail manager +============================ +**vmm** is the easy to use and configurable command line tool for +administrators and postmasters, to manage domains, alias-domains, accounts +and relocated mail users. See the :doc:`features` page for more details. +It allows the fast and easy management of mail servers. + +vmm is written in Python_. It's designed for installations using Dovecot_ +and Postfix_ with a PostgreSQL_ backend. vmm should work on each +Linux/UNIX-like operation system. + +Current version +--------------- +|curr_vers_rel_date| +|rel_hist| + +Contacts +-------- +There's the vmm-users_ mailing list for general vmm discussion. There's +also the #\ vmm_ IRC channel on the freenode_ network. +Please use the `issue tracker`_ to report any kind of bugs. + +License +------- +In short: "**New BSD License**" aka "3-clause license". For a few more +details see the COPYING_ file. + +Contents +-------- + +.. toctree:: + :maxdepth: 1 + + features + download + install + upgrade + +* :ref:`search` + +.. include:: substitutions.rst +.. include:: ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/install.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/install.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,13 @@ +============ +Installation +============ + +.. toctree:: + :maxdepth: 1 + + installation/prerequisites + installation/system_preparation + installation/postgresql_configuration + installation/dovecot_configuration + installation/postfix_configuration + installation/install_vmm diff -r 20141b967c0b -r be0906181a10 doc/web/source/installation/dovecot_configuration.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/installation/dovecot_configuration.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,340 @@ +===================== +Dovecot configuration +===================== +This page describes in short how to configure Dovecot. + +If you are upgrading your Dovecot installation from v1.\ **1**.x to +v1.\ **2**.x or v\ **1**.x to v\ **2**.x, you should also read Upgrading_ +in the `Dovecot wiki`_. + +Dovecot v1.x +------------ +This setup uses two configuration files. +:file:`dovecot.conf`, the MainConfig_ of the Dovecot server and +:file:`dovecot-sql.conf`, containing the settings for passdb_ and userdb_ +lookups. +For more details see also `AuthDatabase/SQL`_ in the Dovecot wiki. + +dovecot.conf +^^^^^^^^^^^^ +The following configuration example can be used as complete configuration +file. You can also adjust your existing settings. +Use :command:`dovecot -n | head -n 1` to locate your :file:`dovecot.conf`. + +.. note:: Please modify the `postmaster_address` to meet your specific needs. + +.. code-block:: text + + # all your other settings + #disable_plaintext_auth = no + mail_location = maildir:~/Maildir + first_valid_uid = 70000 + first_valid_gid = 70000 + protocol lda { + postmaster_address = postmaster@YOUR-DOMAIN.TLD + # uncomment this to use server side filtering (Dovecot v1.0.x/v1.1.x) + #mail_plugins = cmusieve + # uncomment this to use server side filtering (Dovecot v1.2.x) + #mail_plugins = sieve + } + protocol pop3 { + pop3_uidl_format = %08Xu%08Xv + } + # uncomment this to use the ManageSieve protocol, if supported by your installation + #protocol managesieve { + # # only valid with Dovecot v1.0.x/v1.1.x. + # # see also: http://wiki.dovecot.org/ManageSieve/Configuration#v1.0.2BAC8-v1.1 + # sieve = ~/.dovecot.sieve + # sieve_storage = ~/sieve + #} + auth default { + mechanisms = cram-md5 login plain + passdb sql { + args = /etc/dovecot/dovecot-sql.conf + } + userdb sql { + args = /etc/dovecot/dovecot-sql.conf + } + user = doveauth + socket listen { + master { + path = /var/run/dovecot/auth-master + mode = 0600 + } + client { + path = /var/spool/postfix/private/dovecot-auth + mode = 0660 + user = postfix + group = postfix + } + } + } + # uncomment this if you use the ManageSieve protocol with Dovecot v1.2.x + #plugin { + # # Sieve and ManageSieve settings + # # see also: http://wiki.dovecot.org/ManageSieve/Configuration#v1.2 + # sieve = ~/.dovecot.sieve + # sieve_dir = ~/sieve + #} + + +.. _dovecot-sql-conf: + +dovecot-sql.conf +^^^^^^^^^^^^^^^^ +This lines contains all information that are required by Dovecot to access +the database and to do the lookups in passdb and userdb. + +.. code-block:: text + + driver = pgsql + connect = host=localhost dbname=mailsys user=dovecot password=$Dovecot_PASS + default_pass_scheme = CRAM-MD5 + password_query = SELECT userid AS "user", password FROM dovecotpassword('%Ln', '%Ld') WHERE %Ls + user_query = SELECT SELECT home, uid, gid, mail FROM dovecotuser('%Ln', '%Ld') + +Dovecot v2.x +------------ +Beginning with Dovecot version 2.0 the configuration was split into multiple +files. +It isn't required to use multiple configuration files. +:file:`dovecot.conf` is still the most important configuration file. +Use the command :command:`doveconf -n | head -n 1` to locate your +:file:`dovecot.conf`. +You could put all settings in your :file:`dovecot.conf`. +You can also include multiple files into your :file:`dovecot.conf`. + +I personally prefer it to comment out most of the :file:`dovecot.conf` +and include only my :file:`local.conf`, which contains all the necessary +settings. +You can download my :download:`local.conf <../_static/local.conf>` and use +it in your setup. + +If you want to use multiple configuration files, you have to apply the +following settings to the configuration files mentioned down below. +Everything that isn't mentioned, was commented out. + +.. _dovecot2.conf: + +dovecot.conf +^^^^^^^^^^^^ +.. code-block:: text + + protocols = imap lmtp + # uncomment if your users should be able to manage their sieve scripts + #protocols = imap lmtp sieve + + # uncomment if you want to use the quota plugin + #dict { + # quota = pgsql:/usr/local/etc/dovecot/dovecot-dict-sql.conf.ext + #} + +See also :ref:`dovecot-dict-sql-conf-ext` below. + +.. warning:: Adjust the paths of the :file:`dovecot-dict-sql.conf.ext` + (above) and :file:`dovecot-sql.conf.ext` (below) files to suit your needs. + + +.. _conf-d-10-auth-conf: + +conf.d/10-auth.conf +^^^^^^^^^^^^^^^^^^^ +.. code-block:: text + + auth_mechanisms = plain login cram-md5 + passdb { + driver = sql + args = /usr/local/etc/dovecot/dovecot-sql.conf.ext + } + userdb { + driver = sql + args = /usr/local/etc/dovecot/dovecot-sql.conf.ext + } + #!include auth-system.conf.ext + +See also :ref:`dovecot-sql-conf-ext` below. + + +conf.d/10-mail.conf +^^^^^^^^^^^^^^^^^^^ +.. code-block:: text + + first_valid_gid = 70000 + first_valid_uid = 70000 + mail_access_groups = dovemail + mail_location = maildir:~/Maildir + + # uncomment if you want to use the quota plugin + #mail_plugins = quota + +conf.d/10-master.conf +^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: text + + # if you don't want to use secure imap, you have to disable the imaps listener + ##service imap-login { + ## inet_listener imaps { + ## port = 0 + ## } + ##} + + service lmtp { + unix_listener /var/spool/postfix/private/dovecot-lmtp { + user = postfix + group = postfix + mode = 0600 + } + } + + service auth { + user = doveauth + unix_listener auth-userdb { + } + unix_listener /var/spool/postfix/private/dovecot-auth { + user = postfix + group = postfix + mode = 0600 + } + } + + service auth-worker { + unix_listener auth-worker { + user = doveauth + group = $default_internal_user + mode = 0660 + } + user = doveauth + } + + service dict { + unix_listener dict { + group = dovemail + mode = 0660 + } + } + +conf.d/10-ssl.conf +^^^^^^^^^^^^^^^^^^ +.. code-block:: text + + # SSL/TLS support: yes, no, required. + #ssl = yes + + ssl_cert = MO…|g" `postconf -h config_directory`/pgsql-*.cf + root@host:~# + +If your `sed` doesn't like the `-i` option (is unable to edit files in place), +you can do it with :command:`perl`: + +.. code-block:: console + + # perl -pi -e "s|\bpostfix\b|_postfix|g" `postconf -h config_directory`/pgsql-*.cf + +.. note:: Don't forget to start or restart Dovecot and Postfix. + +vmm configure +------------- +Finally you have to edit your :file:`vmm.cfg`. You can edit the configuration +file in your favorite editor or execute :command:`vmm configure`. +vmm's configuration parameters are described in :manpage:`vmm.cfg(5)`. +The initial :doc:`../vmm.cfg` is also well documented. + +Ready, set, go! +--------------- +For a list of available subcommands execute :command:`vmm help`. +For details about the subcommands see :manpage:`vmm(1)`. + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/installation/postfix_configuration.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/installation/postfix_configuration.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,75 @@ +===================== +Postfix configuration +===================== +This page mentions all Postfix configuration parameters, which have to be +modified and/or added in/to the Postfix :file:`main.cf`. + +main.cf +------- +Add or replace the following configuration parameters in the global Postfix +configuration file. +The Postfix PostgreSQL client configuration files (:file:`pgsql-{*}.cf`) +mentioned below will be created when vmm will be installed. + +.. code-block:: text + + sql = pgsql:${config_directory}/ + proxysql = proxy:${sql} + + # relocated users from the database + #relocated_maps = ${proxysql}pgsql-relocated_maps.cf + + # transport settings from our database + transport_maps = ${proxysql}pgsql-transport_maps.cf + + # virtual domains, mailboxes and aliases + virtual_mailbox_domains = ${proxysql}pgsql-virtual_mailbox_domains.cf + virtual_alias_maps = ${proxysql}pgsql-virtual_alias_maps.cf + virtual_minimum_uid = 70000 + virtual_uid_maps = ${sql}pgsql-virtual_uid_maps.cf + virtual_gid_maps = ${sql}pgsql-virtual_gid_maps.cf + virtual_mailbox_base = / + virtual_mailbox_maps = ${proxysql}pgsql-virtual_mailbox_maps.cf + + # dovecot LDA (only recommended with Dovecot v1.x) + #dovecot_destination_recipient_limit = 1 + #virtual_transport = dovecot: + + # dovecot lmtp (requires Dovecot ≧ v2.0.0) + virtual_transport = lmtp:unix:private/dovecot-lmtp + + # dovecot SASL + smtpd_sasl_type = dovecot + smtpd_sasl_path = private/dovecot-auth + smtpd_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://wiki2.dovecot.org/Authentication/Mechanisms/DigestMD5 + #smtpd_sasl_local_domain = + smtpd_sasl_security_options = noplaintext, noanonymous + #broken_sasl_auth_clients = yes + + smtpd_recipient_restrictions = + permit_mynetworks + permit_sasl_authenticated + reject_unauth_destination + +mater.cf +-------- +.. note:: This step is only necessary if you are still using Dovecot v\ **1**.x + +Add the service `dovecot` to Postfix's master process configuration file. +Append this lines: + +.. code-block:: text + + dovecot unix - n n - - pipe + flags=DORhu user=nobody argv=/usr/local/lib/dovecot/deliver -f ${sender} + -d ${user}@${nexthop} -n -m ${extension} + +The command of the `argv` attribute points to the +:ref:`root SETUID copy of deliver `. +For more details about the `flags` used above see: `pipe(8)`_. +All other arguments are explained in the Dovecot LDA_ documentation. + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/installation/postgresql_configuration.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/installation/postgresql_configuration.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,109 @@ +======================== +PostgreSQL configuration +======================== +Adjust pg_hba.conf +------------------ +The connection to a PostgreSQL server can be established either through a +local Unix-domain socket or a TCP/IP socket. The :file:`pg_hba.conf` file +defines which users/groups are allowed to connect from which clients and +how they have to authenticate. +The :file:`pg_hba.conf` file is mostly stored in the database cluster's data +directory. The data directory is often :file:`/usr/local/pgsql/data` or +:file:`/var/lib/pgsql/data.` On Debian GNU/Linux systems the +:file:`pg_hba.conf` is located in :file:`/etc/postgresql/{VERSION}/{CLUSTER}` +(for example: :file:`/etc/postgresql/9.1/main`). + +Some information about the :file:`pg_hba.conf` is available in the PostgreSQL +Wiki/`Client Authentication`_, even more detailed in the pg_hba.conf_ +documentation. + +For TCP/IP connections +^^^^^^^^^^^^^^^^^^^^^^ +Add a line like the following to your :file:`pg_hba.conf` if you want to +connect via a TCP/IP connection to the PostgreSQL server. +Make sure to adjust the CIDR address if PostgreSQL is running on a +different system:: + + # IPv4 local connections: + host mailsys +mailsys 127.0.0.1/32 md5 + +For Unix-domain socket connections +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +If you want to use PostgreSQL's local Unix domain socket for database +connections add a line like the second one to your :file:`pg_hba.conf`:: + + # "local" is for Unix domain socket connections only + local mailsys +mailsys md5 + local all all ident sameuser + +.. note:: `ident sameuser` will not work, because `dovecot-auth` will be + executed by the unprivileged user `doveauth` + (see :ref:`System Preparation `), not by the `dovecot` user. + +Create database users and the database +-------------------------------------- +You should create some database users for vmm, Dovecot and Postfix as well +as their group. +Each of them will get different privileges granted. +Finally create a new database. + +Create a database superuser, which will be able to create users and databases, +if necessary. If you have sudo privileges run: + +.. code-block:: console + + user@host:~$ sudo su - postgres + [sudo] password for user: + postgres@host:~$ createuser -s -d -r -E -e -P $USERNAME + +If you are root, omit the :command:`sudo` command. Just execute +:command:`su - postgres` and create the database superuser. + +Start :command:`psql` as superuser and connect to the database `template1`: + +.. code-block:: console + + user@host:~$ psql template1 + +Then create users, their group and the empty database: + +.. code-block:: postgresql-console + + template1=# CREATE ROLE vmm LOGIN ENCRYPTED PASSWORD 'DB PASSWORD for vmm'; + template1=# CREATE ROLE dovecot LOGIN ENCRYPTED password 'DB PASSWORD for Dovecot'; + template1=# CREATE ROLE postfix LOGIN ENCRYPTED password 'DB PASSWORD for Postfix'; + template1=# CREATE ROLE mailsys WITH USER postfix, dovecot, vmm; + template1=# CREATE DATABASE mailsys WITH OWNER vmm ENCODING 'UTF8'; + template1=# \q + +Import tables and functions +--------------------------- +Now start :command:`psql` and connect as your `vmm` user to the database +`mailsys`: + +.. code-block:: console + + user@host:~$ psql mailsys vmm -W -h localhost + +In PostgreSQL's terminal-based front-end import the database layout/tables +and functions into your database. + +Dovecot v1.2.x/v2.0.x/v2.1.x +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: postgresql-console + + mailsys=> \i /path/to/vmm-0.6.0/pgsql/create_tables-dovecot-1.2.x.pgsql + mailsys=> \q + +Dovecot v1.0.x/v1.1.x +^^^^^^^^^^^^^^^^^^^^^ +.. code-block:: postgresql-console + + mailsys=> \i /path/to/vmm-0.6.0/pgsql/create_tables.pgsql + mailsys=> \q + +Set database permissions +------------------------ +.. include:: ../pgsql_set_permissionspermissions.rst + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/installation/prerequisites.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/installation/prerequisites.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,117 @@ +========================== +Installation Prerequisites +========================== +You already should have installed and configured Postfix and Dovecot with +PostgreSQL support. You also need access to a local or remote PostgreSQL +server. + +Check for pgsql support in Dovecot and Postfix +---------------------------------------------- +To verify that your Dovecot and Postfix installation has support for +PostgreSQL use the :command:`postconf` and :command:`dovecot` commands as +shown below: + +.. code-block:: console + + root@host:~# postconf -m | grep pgsql + pgsql + root@host:~# postconf -a | grep dovecot + dovecot + root@host:~# dovecot --build-options | grep postgresql + SQL drivers: mysql postgresql sqlite + +vmm depends on Python (≥ 2.4.0) and Psycopg_ (≥ 2.0) or pyPgSQL_ (≥ 2.5.1) +[#]_. Psycopg and pyPgSQL are depending on parts of the *eGenix.com mx Base +Distribution* (mxDateTime_ and mxTools_). + +If you are using Python ≤ 2.5.0: + + ‣ if you want to store your users' passwords as ``PLAIN-MD4`` digest in + the database, vmm will try to use ``Crypto.Hash.MD4`` from PyCrypto_ + ‣ if you are using Dovecot ≥ v1.1.0 and you want to store your users' + passwords as ``SHA256`` or ``SSHA256`` hashes, vmm will try to use + ``Crypto.Hash.SHA256`` from PyCrypto. For ``SHA256``/``SSHA256`` you + should have installed PyCrypto, at least in version 2.1.0alpha1. + + When the Crypto.Hash module couldn't be imported, vmm will use + dovecotpw/doveadm, if the *misc.password_scheme* setting in your + :file:`vmm.cfg` is set to ``PLAIN-MD4``, ``SHA256`` or ``SSHA256``. + +If your Dovecot and/or Postfix installation shouldn't support PostgreSQL you +could possibly fix this by installing the missing package (see below) or by +recompiling the corresponding part. + +Package names by OS/Distribution +-------------------------------- +Debian GNU/Linux (Squeeze/Wheezy) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ‣ `postfix `_ and + `postfix-pgsql `_ + ‣ Squeeze: + + * `dovecot-common `_ + + ‣ Wheezy (and Squeeze backports): + + * `dovecot-core `_ and + `dovecot-lmtpd `_ + + ‣ `dovecot-imapd `_ and/or + `dovecot-pop3d `_ + ‣ `postgresql-client `_ + (or `postgresql `_ , if you do not + have a dedicated PostgreSQL server.) + ‣ `python `_, + `python-egenix-mxdatetime \ + `_ + and `python-psycopg2 `_ + optionally `python-crypto `_ + ‣ `gettext `_ + +FreeBSD +^^^^^^^ +Packages or build from ports: + ‣ dovecot + ‣ postfix + ‣ postgresql-client (and postgresql-server, if you do not have a dedicated + PostgreSQL server.) + ‣ python25, py25-mx-base and py25-pyPgSQL optionally py25-pycrypto + +Gentoo Linux +^^^^^^^^^^^^ + ‣ `dev-python/pypgsql `_ + ‣ `mail-mta/postfix `_ + ‣ `net-mail/dovecot `_ + ‣ `dev-db/postgresql-base `_ + ‣ `dev-db/postgresql-server \ + `_ + +Applied use-Flags (/etc/portage/package.use):: + + mail-mta/postfix dovecot-sasl postgres -pam sasl + net-mail/dovecot postgres -pam pop3d sieve + dev-db/postgresql-server -perl + +OpenBSD +^^^^^^^ +Packages or build from ports: + ‣ postfix + ‣ dovecot + ‣ postgresql-client + ‣ python and py-mxDateTime optionally py-crypto + +Build from source: + ‣ pyPgSQL_ + +openSUSE Linux +^^^^^^^^^^^^^^ + ‣ postfix and postfix-postgresql + ‣ postgresql-server and postgresql + ‣ dovecot + ‣ python and pyPgSQL optionally python-crypto + + +.. rubric:: Footnotes +.. [#] Beginning with version 0.7.0 of vmm support for pyPgSQL will be dropped. + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/installation/system_preparation.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/installation/system_preparation.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,61 @@ +================== +System Preparation +================== +.. _doveauth: + +We have to create a system user, named `doveauth`. +The `doveauth` user will execute Dovecot's authentication processes. + +We will also create an additional system group, named `dovemail`. +The GID of the group `dovemail` will be the supplementary GID for all +mail related Dovecot processes, e.g. the `dict` service for quota limits. + +And finally we will create the ``base_directory``, with it's subdirectories. +It is the location for all domain directories and the virtual user's home +directories. + +The example below shows the steps executed on a Debian GNU/Linux system. + +.. code-block:: console + + root@host:~# adduser --system --home /nonexistent --no-create-home --group \ + > --disabled-login --gecos "Dovecot IMAP/POP3 authentication user" doveauth + root@host:~# addgroup --system dovemail + root@host:~# mkdir /srv/mail + root@host:~# cd /srv/mail + root@host:/srv/mail# 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 + root@host:/srv/mail# chmod 771 /srv/mail + root@host:/srv/mail# chmod 751 /srv/mail/* + +.. _root-setuid-copy-of-deliver: + +root SETUID copy of deliver +--------------------------- +.. note:: This step is only necessary if you are still using Dovecot v\ **1**.x + +For security reasons the permissions in the domain/user directories will +be very restricted. +Each user will get its own unique UID_ and the GID_ from the domain. +So it will be only possible for a user of the domain to access the domain +directory (read only) and the user will get granted read write access only +for its home directory. + +For this reason it is necessary to provide a setuid_-root copy of Dovecot's +LDA_ (:command:`deliver`) for Postfix. +Because Postfix will refuse to execute commands with root privileges, or +with the privileges of the mail system owner (normally `postfix`) you should +`nobody` let do the job. +Therefore the permissions will be set very restrictive again. +Only `nobody` will be able to execute the setuid-root copy of +:command:`deliver`. + +.. code-block:: console + + root@host:~# mkdir -p /usr/local/lib/dovecot + root@host:~# chmod 700 /usr/local/lib/dovecot + root@host:~# chown nobody /usr/local/lib/dovecot + root@host:~# cp /usr/lib/dovecot/deliver /usr/local/lib/dovecot/ + root@host:~# chown root:`id -g nobody` /usr/local/lib/dovecot/deliver + root@host:~# chmod u+s,o-rwx /usr/local/lib/dovecot/deliver + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/pgsql_set_permissionspermissions.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/pgsql_set_permissionspermissions.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,33 @@ +There's a python script which grants permissions to your Dovecot and Postfix +database users. + +.. code-block:: console + + user@host:~$ python /path/to/vmm-0.6.0/pgsql/set-permissions.py -h + Usage: set-permissions.py OPTIONS + + Set permissions for Dovecot and Postfix in the vmm database. + + Options: + -h, --help show this help message and exit + -a, --askpass Prompt for the database password. + -H HOST, --host=HOST Hostname or IP address of the database server. Leave + blank in order to use the default Unix-domain socket. + -n NAME, --name=NAME Specifies the name of the database to connect to. + Default: mailsys + -p PASS, --pass=PASS Password for the database connection. + -P PORT, --port=PORT Specifies the TCP port or the local Unix-domain socket + file extension on which the server is listening for + connections. Default: 5432 + -U USER, --user=USER Connect to the database as the user USER instead of + the default: root + -D USER, --dovecot=USER + Database user name of the Dovecot database user. + Default: dovecot + -M USER, --postfix=USER + Database user name of the Postfix (MTA) database + user. Default: postfix + user@host:~$ python /path/to/vmm-0.6.0/pgsql/set-permissions.py -a -H 127.0.0.1 -U vmm + Password: + user@host:~$ + diff -r 20141b967c0b -r be0906181a10 doc/web/source/release_history.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/release_history.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,16 @@ +====================== +Release history of vmm +====================== + +=========== ============ ====================================================== +Version Release Date Download URL +=========== ============ ====================================================== +vmm-0.6.0 Jun 28 2012 https://sourceforge.net/projects/vmm/files/vmm/0.6.0 +vmm-0.5.2 Sep 09 2009 https://sourceforge.net/projects/vmm/files/vmm/0.5.2 +vmm-0.5.1 Aug 12 2009 https://sourceforge.net/projects/vmm/files/vmm/0.5.1 +vmm-0.5 Nov 27 2008 https://sourceforge.net/projects/vmm/files/vmm/0.5 +vmm-0.4-r41 May 02 2008 https://sourceforge.net/projects/vmm/files/vmm/0.4-r41 +vmm-0.4 May 01 2008 https://sourceforge.net/projects/vmm/files/vmm/0.4 +vmm-0.3.1 Jan 08 2008 https://sourceforge.net/projects/vmm/files/vmm/0.3.1 +vmm-0.3 Jan 06 2008 https://sourceforge.net/projects/vmm/files/vmm/0.3 +=========== ============ ====================================================== diff -r 20141b967c0b -r be0906181a10 doc/web/source/substitutions.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/substitutions.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,4 @@ +.. |curr_vers_rel_date| replace:: The most current version of vmm is 0.6.0, + released on 28 June 2012. +.. |rel_hist| replace:: Older releases are listed in the :doc:`release_history`. + diff -r 20141b967c0b -r be0906181a10 doc/web/source/upgrade.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/upgrade.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,10 @@ +============= +Upgrading vmm +============= +Upgrade instructions for different versions of vmm. + +.. toctree:: + :maxdepth: 1 + + upgrade/0.5-0.6 + upgrade/0.4.x-0.5 diff -r 20141b967c0b -r be0906181a10 doc/web/source/upgrade/0.4.x-0.5.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/upgrade/0.4.x-0.5.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,140 @@ +====================== +Upgrading to vmm 0.5.x +====================== +This page is valid only for vmm-0.4/vmm-0.4-r41 and vmm-0.5/vmm-0.5.1. +If you are using vmm-0.3.x please upgrade first to +`vmm-0.4-r41 `_. + +Upgrading from vmm-0.4.x +------------------------ +Database backup +^^^^^^^^^^^^^^^ +It is always wise to back up your database from time to time. +Particularly with regard to an impending structure modification. + +Example: Backing up the `mailsys` database with pg_dump_. + +.. code-block:: console + + root@host:~# pg_dump -h localhost -U vmm -W mailsys > mailsys-0.4.sql + +Stopping Postfix and Dovecot +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Before updating the database you have to stop Postfix and Dovecot. + +.. code-block:: console + + root@host:~# /etc/init.d/postfix stop + Stopping Postfix Mail Transport Agent: postfix. + root@host:~# /etc/init.d/dovecot stop + Stopping IMAP/POP3 mail server: dovecot. + +Database update +^^^^^^^^^^^^^^^ +Connect as your `vmm` database user to your database. + +.. code-block:: console + + root@host:~# psql mailsys vmm -W -h localhost + +In the PostgreSQL interactive terminal you have to run the following +commands to perform the update. + +.. code-block:: postgresql-console + + mailsys=> \i /path/to/vmm-0.5.2/update_tables_0.4.x-0.5.pgsql + mailsys=> GRANT SELECT ON postfix_alias TO postfix; + mailsys=> \q + +.. _database-update-for-dovecot-v1-2-x: + +Database update for Dovecot v1.2.x +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +When you are already using Dovecot v1.2.x, you have to perform one or two +**additional** database updates. + +.. code-block:: postgresql-console + + mailsys=> \i /path/to/vmm-0.5.2/update_tables_0.5.x_for_dovecot-1.2.x.pgsql + mailsys=> GRANT SELECT ON dovecot_password TO dovecot; + mailsys=> -- If you are using the function dovecotpassword() in the + mailsys=> -- password_query setting of your dovecot-sql.conf update it also: + mailsys=> \i /path/to/vmm-0.5.2/update_types_and_functions_0.5.x_for_dovecot-1.2.x.pgsql + mailsys=> \q + +.. _adjusting-permissions-of-the-setuid-root-deliver-copy: + +Adjusting permissions of the setuid root deliver copy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Starting with Dovecot version 1.2.0 the LDA ``deliver`` will no longer +work, if the binary has the setuid-root bit set **and** it's executable +for everyone. +Independent of the directory permissions, where the ``deliver`` binary +is located. +For this reason you have to adjust the permission of the ``deliver`` binary. + +.. code-block:: console + + root@host:~# chown root:`id -g nobody` /usr/local/lib/dovecot/deliver + root@host:~# chmod u+s,o-rwx /usr/local/lib/dovecot/deliver + +.. _check-update-postfix-master-cf: + +Check/update Postfix' master.cf +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +In prior setups the service *dovecot* was configured slightly different. +If you have set the command attribute user to ``nobody:mail``, either +remove the group *mail* or replace it with the group *nobody* or *nogroup*. +The second line of the service *dovecot* entry should look similar to this:: + + flags=DORhu user=nobody argv=/usr/local/lib/dovecot/deliver … + +Start Dovecot and Postfix again +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +After a successfully update start Dovecot and Postfix again. + +.. code-block:: console + + root@host:~# /etc/init.d/dovecot start + Starting IMAP/POP3 mail server: dovecot. + root@host:~# /etc/init.d/postfix start + Starting Postfix Mail Transport Agent: postfix. + +Upgrade vmm +^^^^^^^^^^^ +Finally execute the ``upgrade.sh`` script to install the new code and +update your ``/usr/local/etc/vmm.cfg``. + +.. code-block:: console + + root@host:~# cd /path/to/vmm-0.5.2 + root@host:/path/to/vmm-0.5.2# ./upgrade.sh + + Please have a look at your /usr/local/etc/vmm.cfg + and verify the value from option 'postconf' in section 'bin'. + + root@host:/path/to/vmm-0.5.2# + +Upgrading from vmm-0.5.x +------------------------ +Upgrade vmm +^^^^^^^^^^^ +When you have already installed vmm-0.5 or vmm-0.5.1 only a single step is +necessary to update your vmm installation. +cd in the source directory and execute the ``upgrade.sh`` script. +That's it. + +.. code-block:: console + + root@host:~# cd /path/to/vmm-0.5.2 + root@host:/path/to/vmm-0.5.2# ./upgrade.sh + root@host:/path/to/vmm-0.5.2# + +When you are already using Dovecot ≧ v1.2.0, you should also respect +following points: + + ‣ :ref:`database-update-for-dovecot-v1-2-x` + ‣ :ref:`adjusting-permissions-of-the-setuid-root-deliver-copy` + ‣ :ref:`check-update-postfix-master-cf` + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/upgrade/0.5-0.6.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/upgrade/0.5-0.6.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,122 @@ +====================== +Upgrading to vmm 0.6.x +====================== +This document describes the procedure to upgrade a vmm-0.5.2 installation +to version 0.6.x + +If you still have installed vmm-0.4/vmm-0.4-r41 you have to proceed this +step first: + + ‣ :doc:`0.4.x-0.5` + +Upgrading from vmm-0.5.2 +------------------------ + +Stop Postfix and Dovecot +^^^^^^^^^^^^^^^^^^^^^^^^ +Before updating your database layout you have to stop Postfix and Dovecot. + +.. code-block:: console + + root@host:~# /etc/init.d/postfix stop + Stopping Postfix Mail Transport Agent: postfix. + root@host:~# /etc/init.d/dovecot stop + Stopping IMAP/POP3 mail server: dovecot. + +Create a database backup +^^^^^^^^^^^^^^^^^^^^^^^^ +It is always wise to back up your database from time to time. +Particularly with regard to an impending structure modification. + + +Example: Backing up the `mailsys` database with pg_dump_. + +.. code-block:: console + + user@host:~$ pg_dump -h localhost -U vmm -W mailsys > mailsys-0.5.2.sql + +Database update +^^^^^^^^^^^^^^^ +Connect as your `vmm` database user to your database. + +.. code-block:: console + + user@host:~$ psql mailsys vmm -W -h localhost + +In the PostgreSQL interactive terminal you have to run one of the following +commands to perform the update. + +Dovecot v1.2.x/v2.0.x/v2.1.x +"""""""""""""""""""""""""""" +.. code-block:: postgresql-console + + mailsys=> \i /path/to/vmm-0.6.0/pgsql/update_tables_0.5.x-0.6-dovecot-1.2.x.pgsql + mailsys=> \q + +Dovecot v1.0.x/v1.1.x +""""""""""""""""""""" +.. code-block:: postgresql-console + + mailsys=> \i /path/to/vmm-0.6.0/pgsql/update_tables_0.5.x-0.6.pgsql + mailsys=> \q + +Set database permissions +^^^^^^^^^^^^^^^^^^^^^^^^ +.. include:: ../pgsql_set_permissionspermissions.rst + +Start Dovecot and Postfix again +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. warning:: All the views (*dovecot_…* and *postfix_…*) have been + replaced by database functions. + So you have to adjust all your ``postfix/pgsql-*.cf`` files and also your + ``/etc/dovecot/dovecot-sql.conf`` or ``/etc/dovecot/dovecot-sql.conf.ext``. + + See the `vmm-0.6.0/postfix/pgsql-*.cf` files and + :ref:`Dovecot configuration `/`dovecot-sql.conf.ext` + or :ref:`Dovecot configuration `/`dovecot-sql-conf`. + +After a successfully update start Dovecot and Postfix again. + +.. code-block:: console + + root@host:~# /etc/init.d/dovecot start + Starting IMAP/POP3 mail server: dovecot. + root@host:~# /etc/init.d/postfix start + Starting Postfix Mail Transport Agent: postfix. + +Upgrade vmm +^^^^^^^^^^^ +Finally execute the :file:`upgrade.sh` script. +This will install the new code and also update your :file:`vmm.cfg`. + +.. code-block:: console + + root@host:~# cd /path/to/vmm-0.6.0 + root@host:/path/to/vmm-0.6.0# ./upgrade.sh + Please have a look at your configuration: /usr/local/etc/vmm.cfg + This are your Modified/Renamed/New settings: + R account.delete_directory = false + R account.directory_mode = 448 + R account.disk_usage = false + R domain.delete_directory = false + R domain.directory_mode = 504 + R domain.force_deletion = false + R domain.imap = true + R domain.pop3 = true + R domain.sieve = true + R domain.smtp = true + R domain.transport = dovecot: + R mailbox.folders = Drafts:Sent:Templates:Trash + R mailbox.root = Maildir + R misc.base_directory = /srv/mail + M misc.dovecot_version = 2.1.7 + R misc.dovecot_version = 2.1.7 + R misc.password_scheme = PLAIN + + Removed section "config" with option "done" (obsolte) + + Removed option "gid_mail" from section "misc" (obsolte) + + +.. include:: ../ext_references.rst diff -r 20141b967c0b -r be0906181a10 doc/web/source/vmm.cfg.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/web/source/vmm.cfg.rst Sun Jul 29 14:46:52 2012 +0000 @@ -0,0 +1,10 @@ +========================== +Configuration file for vmm +========================== +When you have installed vmm as described in :doc:`installation/install_vmm` +a copy of :download:`vmm.cfg <_static/vmm.cfg>` will be stored in +:file:`{$PREFIX}/share/doc/vmm`. + +.. literalinclude:: _static/vmm.cfg + :language: cfg +