* 'update_config_0.3.x-0.4.py'
* 'upgrade.sh'
* 'UPGRADE'
- added to repository
* 'install.sh'
- Removed $PF_GID
* 'INSTALL'
- Added some hints
* 'VirtualMailManager/VirtualMailManager.py'
- fixed an ugly bug
--- a/ChangeLog Tue Mar 04 23:28:04 2008 +0000
+++ b/ChangeLog Sun Apr 06 21:36:00 2008 +0000
@@ -1,4 +1,17 @@
=== 0.0.0 ===
+2008-04-06 Pascal Volk <neverseen@users.sourceforge.net>
+
+ * install.sh: Removed $PF_GID
+ * INSTALL: Added hints for pyPgSQL and smtpd_recipient_restrictions
+ * update_config_0.3.x-0.4.py:
+ * upgrade.sh:
+ * UPGRADE: Added to repository
+ * VirtualMailManager/VirtualMailManager.py (VirtualMailManager.__init__):
+ Don't call VirtualMailManager.__chkenv() if vmm is started with
+ option configure.
+ * VirtualMailManager/VirtualMailManager.py (VirtualMailManager.__chkenv):
+ Added value for placeholder in error message.
+
2008-03-05 Pascal Volk <neverseen@users.sourceforge.net>
* create_tables.pgsql: Removed unneeded newlines from views dovecot_user and
--- a/INSTALL Tue Mar 04 23:28:04 2008 +0000
+++ b/INSTALL Sun Apr 06 21:36:00 2008 +0000
@@ -1,7 +1,9 @@
Installation Prerequisites
You should already have installed and configured Postfix, Dovecot and
PostgreSQL.
-You have to install Python and pyPgSQL to use the Virtual Mail Manager.
+You have to install Python and pyPgSQL* to use the Virtual Mail Manager.
+
+* = http://pypgsql.sourceforge.net/ (Debian: python-pgsql)
Configuring PostgreSQL
@@ -135,6 +137,10 @@
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noplaintext, noanonymous
+ smtpd_recipient_restrictions =
+ permit_mynetworks
+ permit_sasl_authenticated
+ reject_unauth_destination
Installing the Virtual Mail Manager and configure the rest
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/UPGRADE Sun Apr 06 21:36:00 2008 +0000
@@ -0,0 +1,17 @@
+If you have installed vmm 0.3.x you have to proceed this steps:
+
+ * stop Postfix and Dovecot
+ * backup/dump your database.
+ * backup/dump your database!
+ * execute update_0.3.x-0.4.sh
+ * edit the pgsql parameters hosts, user, password and dbname in:
+ $(postconf -h config_directory)/pgsql-smtpd_sender_login_maps.cf
+ $(postconf -h config_directory)/pgsql-transport.cf
+ $(postconf -h config_directory)/pgsql-virtual_mailbox_domains.cf
+ * check the value of option transport in section misc in
+ /usr/local/etc/vmm.cfg
+ * start Dovecot and Postfix
+
+else:
+
+ * read INSTALL
--- a/VirtualMailManager/VirtualMailManager.py Tue Mar 04 23:28:04 2008 +0000
+++ b/VirtualMailManager/VirtualMailManager.py Sun Apr 06 21:36:00 2008 +0000
@@ -60,7 +60,8 @@
self.__Cfg.load()
self.__Cfg.check()
self.__cfgSections = self.__Cfg.getsections()
- self.__chkenv()
+ if not sys.argv[1] in ['cf', 'configure']:
+ self.__chkenv()
def __chkCfgFile(self):
"""Checks the configuration file, returns bool"""
@@ -89,9 +90,11 @@
self.__Cfg.get('maildir', 'base'), ERR.NO_SUCH_DIRECTORY))
for opt, val in self.__Cfg.items('bin'):
if not os.path.exists(val):
- raise VMMException(("%s doesn't exists.", ERR.NO_SUCH_BINARY))
+ raise VMMException(("%s doesn't exists." % val,
+ ERR.NO_SUCH_BINARY))
elif not os.access(val, os.X_OK):
- raise VMMException(("%s is not executable.", ERR.NOT_EXECUTABLE))
+ raise VMMException(("%s is not executable." % val,
+ ERR.NOT_EXECUTABLE))
def __getFileMode(self):
"""Determines the file access mode from file __cfgFileName,
--- a/install.sh Tue Mar 04 23:28:04 2008 +0000
+++ b/install.sh Sun Apr 06 21:36:00 2008 +0000
@@ -9,7 +9,6 @@
INSTALL_OPTS="-g 0 -o 0 -p -v"
PREFIX=/usr/local
PF_CONFDIR=$(postconf -h config_directory)
-PF_GID=$(id -g postfix)
DOC_DIR=${PREFIX}/share/doc/vmm
DOCS="ChangeLog COPYING INSTALL README"
@@ -22,7 +21,7 @@
python setup.py clean --all >/dev/null
install -b -m 0600 ${INSTALL_OPTS} vmm.cfg ${PREFIX}/etc/
-install -b -m 0640 -g ${PF_GID} -o 0 -p -v pgsql-*.cf ${PF_CONFDIR}/
+install -b -m 0640 ${INSTALL_OPTS} pgsql-*.cf ${PF_CONFDIR}/
install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin
[ -d ${DOC_DIR} ] || mkdir -m 0755 -p ${DOC_DIR}
@@ -35,6 +34,6 @@
install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples
echo
-echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg"
+echo "Don't forget to edit ${PREFIX}/etc/vmm.cfg - or run: vmm cf"
echo "and ${PF_CONFDIR}/pgsql-*.cf files."
echo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/update_config_0.3.x-0.4.py Sun Apr 06 21:36:00 2008 +0000
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+# Copyright 2008 VEB IT
+# See COPYING for distribution information.
+# $Id$
+
+from ConfigParser import ConfigParser
+
+cff = file('/usr/local/etc/vmm.cfg', 'r')
+cf = ConfigParser()
+cf.readfp(cff)
+cff.close()
+if not cf.has_option('misc', 'transport'):
+ cff = file('/usr/local/etc/vmm.cfg', 'w')
+ cf.set('misc', 'transport', 'dovecot:')
+ cf.write(cff)
+ cff.close()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/upgrade.sh Sun Apr 06 21:36:00 2008 +0000
@@ -0,0 +1,47 @@
+#!/bin/bash
+# $Id$
+#
+# Upgrade script for the Virtual Mail Manager
+# run: ./install.sh
+
+LANG=C
+PATH=/bin:/usr/sbin:/usr/bin
+INSTALL_OPTS="-g 0 -o 0 -p -v"
+PREFIX=/usr/local
+PF_CONFDIR=$(postconf -h config_directory)
+CFS="smtpd_sender_login_maps transport virtual_mailbox_domains"
+DOC_DIR=${PREFIX}/share/doc/vmm
+DOCS="ChangeLog COPYING INSTALL README"
+
+if [ $(id -u) -ne 0 ]; then
+ echo "Run this script as root."
+ exit 1
+fi
+
+python setup.py install --prefix ${PREFIX}
+python setup.py clean --all >/dev/null
+
+for CF in ${CFS} ; do
+ install -b -m 0640 ${INSTALL_OPTS} pgsql-${CF}.cf ${PF_CONFDIR}/
+done
+install -m 0700 ${INSTALL_OPTS} vmm ${PREFIX}/sbin
+
+[ -d ${DOC_DIR} ] || mkdir -m 0755 -p ${DOC_DIR}
+for DOC in ${DOCS}; do
+ install -m 0644 ${INSTALL_OPTS} ${DOC} ${DOC_DIR}
+done
+
+[ -d ${DOC_DIR}/examples ] || mkdir -m 0755 -p ${DOC_DIR}/examples
+install -m 0644 ${INSTALL_OPTS} pgsql-*.cf ${DOC_DIR}/examples
+install -m 0644 ${INSTALL_OPTS} vmm.cfg ${DOC_DIR}/examples
+
+./update_tables_0.3.x-0.4.py
+./update_config_0.3.x-0.4.py
+
+echo
+echo "Don't forget to check ${PREFIX}/etc/vmm.cfg"
+echo "and modify: ${PF_CONFDIR}/pgsql-*.cf files."
+for CF in ${CFS}; do
+ echo " * ${PF_CONFDIR}/pgsql-${CF}.cf"
+done
+echo