summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul@7b491191-dbf0-0310-aff6-d879d4d69008>2006-12-19 17:40:40 +0000
committerpaul <paul@7b491191-dbf0-0310-aff6-d879d4d69008>2006-12-19 17:40:40 +0000
commit28754ab1e2c94f7c4f37ac2bb0d8936e4103387a (patch)
tree1fece5c5667b48b4817b613a15f672c3d05dba67
parent91e705ce4ea63d238e1b4b0e226a7e8198a74d67 (diff)
merging git tree
git-svn-id: https://svn.ic-s.nl/svn/dbmail/trunk/dbmail@2404 7b491191-dbf0-0310-aff6-d879d4d69008
-rw-r--r--ChangeLog122
-rw-r--r--INSTALL2
-rw-r--r--Makefile.am5
-rw-r--r--README16
-rw-r--r--README.smtp2
-rw-r--r--acinclude.m4372
-rw-r--r--acl.c14
-rw-r--r--acl.h3
-rw-r--r--check_dbmail_db.c5
-rw-r--r--check_dbmail_imapd.c16
-rw-r--r--check_dbmail_mailbox.c17
-rw-r--r--check_dbmail_message.c49
-rw-r--r--check_dbmail_server.c2
-rw-r--r--configure.in33
-rwxr-xr-xcontrib/expirebox.sh36
-rw-r--r--db.c544
-rw-r--r--db.h22
-rw-r--r--dbmail-imapsession.c25
-rw-r--r--dbmail-mailbox.c4
-rw-r--r--dbmail-message.c424
-rw-r--r--dbmail-message.h2
-rw-r--r--dbmail.h.in4
-rw-r--r--dbmail.schema95
-rw-r--r--dbmailtypes.h6
-rw-r--r--dbmodule.c13
-rw-r--r--dbmodule.h2
-rw-r--r--debian/compat1
-rw-r--r--debian/control14
-rwxr-xr-xdebian/dbmail-ldap.postinst2
-rwxr-xr-xdebian/dbmail-mysql.postinst23
-rw-r--r--debian/dbmail-pgsql.postinst23
-rwxr-xr-xdebian/dbmail-sieve.config77
-rw-r--r--debian/dbmail-sieve.postinst2
-rw-r--r--debian/dbmail-sieve.templates23
-rw-r--r--debian/dbmail-sqlite.postinst25
-rw-r--r--debian/dbmail.dirs1
-rw-r--r--debian/dbmail.examples1
-rw-r--r--debian/dbmail.init70
-rw-r--r--debian/dbmail.postinst39
-rw-r--r--debian/dbmail.preinst40
-rw-r--r--debian/dbmail.prerm8
-rw-r--r--debian/dbmail.templates18
-rw-r--r--debian/po/cs.po195
-rw-r--r--debian/po/de.po196
-rw-r--r--debian/po/es.po200
-rw-r--r--debian/po/fr.po199
-rw-r--r--debian/po/it.po202
-rw-r--r--debian/po/ja.po196
-rw-r--r--debian/po/nl.po197
-rw-r--r--debian/po/pt_BR.po201
-rw-r--r--debian/po/templates.pot146
-rwxr-xr-xdebian/rules56
-rw-r--r--dm_imaputil.c24
-rw-r--r--dm_imaputil.h1
-rw-r--r--export.c5
-rw-r--r--imap4.c11
-rw-r--r--imapcommands.c26
-rw-r--r--list.c4
-rw-r--r--misc.c13
-rw-r--r--modules/Makefile.am15
-rw-r--r--modules/dbingres.c605
-rw-r--r--modules/dbmysql.c20
-rw-r--r--modules/dbpgsql.c40
-rw-r--r--modules/dbsqlite.c19
-rw-r--r--pipe.c20
-rw-r--r--serverparent.c7
-rw-r--r--sql/mysql/create_tables.mysql1
-rw-r--r--sql/mysql/migrate_from_2.0_to_2.2.mysql1
-rw-r--r--sql/postgresql/create_tables.pgsql4
-rw-r--r--sql/postgresql/migrate_from_2.0_to_2.2.pgsql3
-rw-r--r--sql/sqlite/create_tables.sqlite1
-rw-r--r--test-scripts/testfetch.txt1
-rwxr-xr-xtest-scripts/testimap.py6
-rw-r--r--test-scripts/testsearch.imap1
74 files changed, 3013 insertions, 1805 deletions
diff --git a/ChangeLog b/ChangeLog
index a0282deb..0be4ae14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,125 @@
+2006-12-19 Paul J Stevens <paul@nfg.nl>
+
+ * Makefile.am, acinclude.m4, configure.in, debian/rules,
+ modules/Makefile.am:
+ add ingres support to autotools setup
+ * acl.c, acl.h:
+ change acl_has_right from int to gboolean
+ * ChangeLog, INSTALL, README, README.smtp, db.c, debian/rules,
+ imapcommands.c:
+ merge doc changes by Guido
+
+2006-12-18 Paul J Stevens <paul@nfg.nl>
+
+ * configure.in, configure:
+ cleanup AM_CONDITIONALS after acinclude.m4 changes
+
+2006-12-17 Paul J Stevens <paul@nfg.nl>
+
+ * Makefile.in, config.in, configure, man/Makefile.in, modules/Makefile.in:
+ rebuild configure after changes in automake files
+
+2006-12-16 Aaron Stone <aaron@serendipity.cx>
+
+ * acinclude.m4:
+ Fixed bug #195 fix that left AUTHLDAP and SIEVE always defined.
+
+2006-12-16 Paul J Stevens <paul@nfg.nl>
+
+ * check_dbmail_server.c, db.c, test-scripts/testfetch.txt:
+ fix bug #464
+
+2006-12-15 Aaron Stone <aaron@serendipity.cx>
+
+ * pipe.c:
+ Fixed parse_and_escape to handle incomplete addresses (closes bug #477)
+
+2006-12-13 Aaron Stone <aaron@serendipity.cx>
+
+ * acinclude.m4, configure.in, Makefile.am, modules/Makefile.am:
+ Updated tests for libSieve and LDAP headers and libraries (closes bug #195).
+
+2006-12-12 Paul J Stevens <paul@nfg.nl>
+
+ * dm_imaputil.c, dm_imaputil.h, imap4.c, test-scripts/testsearch.imap:
+ remove redundant checkchars function from imap code (closes #473)
+
+2006-12-11 Paul J Stevens <paul@nfg.nl>
+
+ * check_dbmail_mailbox.c, dbmail-mailbox.c:
+ prevent excessive merging of search results in OR subsearches (closes
+ #471)
+
+2006-12-10 Paul J Stevens <paul@nfg.nl>
+
+ * check_dbmail_imapd.c, dbmail-imapsession.c, dbmail.h.in, dm_imaputil.c,
+ imap4.c, imapcommands.c:
+ cleanup MAX_LIZESIZE and set to 65k
+ * Makefile.in, aclocal.m4, buildtools/compile, buildtools/config.guess,
+ buildtools/config.sub, buildtools/depcomp, buildtools/install-sh,
+ buildtools/ltmain.sh, buildtools/missing, config.in, configure,
+ contrib/expirebox.sh, man/Makefile.in, man/dbmail-export.8,
+ man/dbmail-imapd.8, man/dbmail-lmtpd.8, man/dbmail-pop3d.8,
+ man/dbmail-sievecmd.8, man/dbmail-smtp.1, man/dbmail-timsieved.8,
+ man/dbmail-users.8, man/dbmail-util.8, man/dbmail.1,
+ man/dbmail.conf.5, modules/Makefile.in:
+ add files that belong in the stable branch
+ * check_dbmail_message.c, dbmail-message.c, dbmail-message.h:
+ reduce copying in message code
+ * list.c:
+ fix minor leak
+
+2006-12-08 Aaron Stone <aaron@serendipity.cx>
+
+ * misc.c:
+ Fixed segfault on NULL or zero-length strings in imap_cleanup_address
+ (closes bug #461).
+
+2006-12-06 Aaron Stone <aaron@serendipity.cx>
+
+ * imapcommands.c:
+ Fixed incorrect strlen in _ic_list (closes bug #467).
+ * misc.c:
+ Added # sign to AcceptedMailboxnameChars (bug #467).
+
+2006-12-05 Guido A.J. Stevens <guido@nfg.nl>
+
+ * README, INSTALL, README.smtp:
+ documentation corrections
+ * db.c:
+ comment correction, sql layout refactoring
+
+2006-12-04 Paul J Stevens <paul@nfg.nl>
+
+ * sql/mysql/create_tables.mysql, sql/mysql/migrate_from_2.0_to_2.2.mysql,
+ sql/postgresql/create_tables.pgsql,
+ sql/postgresql/migrate_from_2.0_to_2.2.pgsql,
+ sql/sqlite/create_tables.sqlite:
+ adding useful indexes to headername/headervalue tables
+ * db.c:
+ fix fallout from #457
+
+2006-11-27 Paul J Stevens <paul@nfg.nl>
+
+ * check_dbmail_db.c, check_dbmail_message.c, db.c, dbmail-imapsession.c,
+ dbmail-message.c, modules/dbpgsql.c:
+ remove the query global
+ * db.c:
+ fix bug #457
+ * debian/compat, debian/control, debian/dbmail-ldap.postinst,
+ debian/dbmail-mysql.postinst, debian/dbmail-pgsql.postinst,
+ debian/dbmail-sieve.config, debian/dbmail-sieve.postinst,
+ debian/dbmail-sieve.templates, debian/dbmail-sqlite.postinst,
+ debian/dbmail.dirs, debian/dbmail.examples, debian/dbmail.init,
+ debian/dbmail.postinst, debian/dbmail.preinst, debian/dbmail.prerm,
+ debian/dbmail.templates, debian/po/cs.po, debian/po/de.po,
+ debian/po/es.po, debian/po/fr.po, debian/po/it.po, debian/po/ja.po,
+ debian/po/nl.po, debian/po/pt_BR.po, debian/po/templates.pot,
+ debian/rules:
+ cleanup in the debian packaging
+ * dbmail.schema:
+ cleanup dbmail ldap schema
+
2006-11-21 Paul J Stevens <paul@nfg.nl>
* sql/ingres/create_tables.sql:
diff --git a/INSTALL b/INSTALL
index 0c469904..e08acb79 100644
--- a/INSTALL
+++ b/INSTALL
@@ -7,7 +7,7 @@ DBMAIL installation
===================
This file describes the installation of DBMail. To read about extra
-features in dbmail you should consult the EXTRAS file.
+features in dbmail you should consult the README.* files.
Remember, DBmail is easy to install, as long as you exactly follow
these instructions.
diff --git a/Makefile.am b/Makefile.am
index c135b8e0..4324586f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -67,8 +67,7 @@ MODULES = dbmodule.c \
sortmodule.c
-# CFLAGS
-#AM_CFLAGS = -fomit-frame-pointer
+AM_CFLAGS = @SIEVEINC@ @LDAPINC@
INCLUDES = -I$(top_srcdir)
@@ -111,7 +110,7 @@ AM_LDFLAGS = -export-dynamic -lcrypt
libdbmail_la_SOURCES = $(COMMON) $(SERVER) $(DELIVER) $(MODULES)
else
libdbmail_la_SOURCES = $(COMMON) $(SERVER) $(DELIVER)
-libdbmail_la_LIBADD = @MYSQLLTLIB@ @PGSQLLTLIB@ @SQLITELTLIB@ @SORTLTLIB@ @AUTHLTLIB@
+libdbmail_la_LIBADD = @MYSQLLTLIB@ @PGSQLLTLIB@ @SQLITELTLIB@ @INGRESLTLIB@ @SORTLTLIB@ @AUTHLTLIB@
endif
libdbmail_la_LDFLAGS = $(AM_LDFLAGS)
diff --git a/README b/README
index b07467df..08b4dd81 100644
--- a/README
+++ b/README
@@ -12,7 +12,7 @@ retrieved from a database.
Read the INSTALL file for installation of DBMail.
-Read the EXTRAS file about extra features of DBMail.
+Read the README.* files about extra features of DBMail.
Why is it useful?
@@ -52,9 +52,9 @@ DBMail is now a community effort to create a fast, effecient and scalable
database driven mailingsystem. Both IC&S and NFG are fully behind
opensource and the GPL. Therefore DBMail has the GPL licence.
-However IC&S does provide commercial support and consultancy for this
+However NFG and IC&S do provide commercial support and consultancy for this
product. For more information about this you can send an email to
-info@ic-s.nl.
+info@nfg.nl or info@ic-s.nl or visit http://www.dbmail.eu.
***
Disclaimer: IC&S nor NFG are responsible for any damages resulting from use
@@ -79,15 +79,7 @@ Check the website for further DBMail plans.
What kind of licence is DBMail?
===============================
-DBMail is used under the GPL+ licence.
-
-The + is that i would like to know how stuff is working out. So
-If you have DBMail running and you have like 1002919183 users,
-i would want to know (to bragg about it ;).
-
-
-The rest of the licence is described below:
--------------------------------------------
+DBMail is used under the GPL licence.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
diff --git a/README.smtp b/README.smtp
index af5b1ef5..f86a43f1 100644
--- a/README.smtp
+++ b/README.smtp
@@ -1,4 +1,4 @@
-$Id: EXTRAS 1746 2005-04-08 10:05:24Z paul $
+$Id: README.smtp 1746 2005-04-08 10:05:24Z paul $
DBMail POP/IMAP before SMTP
===========================
diff --git a/acinclude.m4 b/acinclude.m4
index 65d2cd79..d536560d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -23,8 +23,14 @@ GMIME: $ac_gmime_libs
MYSQL: $MYSQLLIB
PGSQL: $PGSQLLIB
SQLITE: $SQLITELIB
+<<<<<<< master
+INGRES: $INGRESLIB
SIEVE: $SORTLIB
LDAP: $LDAPLIB
+=======
+SIEVE: $SIEVEINC $SIEVELIB
+LDAP: $LDAPINC $LDAPLIB
+>>>>>>> dbmail_2_2
SHARED: $enable_shared
STATIC: $enable_static
CHECK: $with_check
@@ -83,6 +89,7 @@ AC_DEFUN([DBMAIL_BOTH_SQL_CHECK], [dnl
usemysql="no"
usepgsql="no"
usesqlite="no"
+useingres="no"
AC_ARG_WITH(mysql,
[ --with-mysql use MySQL as database. Uses mysql_config
@@ -96,9 +103,14 @@ AC_ARG_WITH(sqlite,
[ --with-sqlite use SQLite3 as database.
Uses pkg-config for finding includes and libraries],
usesqlite="$withval")
+AC_ARG_WITH(ingres,
+ [ --with-ingres use Ingres as database.
+ Specify the II_SYSTEM location],
+ useingres="$withval")
-if test [ ! "$usemysql" = "yes" -a ! "$usepgsql" = "yes" -a ! "$usesqlite" = "yes" ]; then
- AC_MSG_ERROR([You have to specify --with-mysql, --with-pgsql or --with-sqlite to build.])
+
+if test [ ! "$usemysql" = "yes" -a ! "$usepgsql" = "yes" -a ! "$usesqlite" = "yes" -a ! -d "$useingres" ]; then
+ AC_MSG_ERROR([You have to specify --with-mysql, --with-pgsql, --with-sqlite or --with-ingres to build.])
fi
])
@@ -158,137 +170,273 @@ if test [ "$usesqlite" = "yes" ]; then
AC_MSG_RESULT([$SQLITELIB])
fi
fi
+if test [ -d "$useingres" ]; then
+ AC_MSG_CHECKING([Ingres headers])
+ INGRESINC="-I $useingres/ingres/files"
+ if test [ ! -d "$useingres/ingres/files" ]; then
+ AC_MSG_ERROR([$INGRESINC])
+ fi
+ AC_MSG_RESULT([$INGRESINC])
+ AC_MSG_CHECKING([Ingres libraries])
+ INGRESLIB="-L$useingres/ingres/lib -lingres -lpthread -lm -lc -lgcc_s"
+ if test [ ! -d "$useingres/ingres/lib" ]; then
+ AC_MSG_ERROR([$INGRESINC])
+ fi
+ INGRESALIB="modules/.libs/libmod_ingres.a"
+ INGRESLTLIB="modules/libmod_ingres.la"
+ AC_MSG_RESULT([$INGRESLIB])
+fi
+
+
+
+])
+
+
+dnl Check for Sieve header.
+AC_DEFUN([DBMAIL_CHECK_SIEVE_INC],[
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([[
+ #define NULL 0
+ #include <sieve2.h>]]),
+ [$1],
+ [$2])
])
+dnl Check for Sieve library.
+AC_DEFUN([DBMAIL_CHECK_SIEVE_LIB],[
+ AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([[
+ #define NULL 0
+ #include <sieve2.h>]]),
+ [$1],
+ [$2])
+])
+
dnl DBMAIL_SIEVE_CONF
dnl check for ldap or sql authentication
AC_DEFUN([DBMAIL_SIEVE_CONF], [dnl
+WARN=0
+
+AC_ARG_WITH(sieve,[ --with-sieve=PATH path to libSieve base directory (e.g. /usr/local or /usr)],
+ [lookforsieve="$withval"],[lookforsieve="no"])
-sieveheadername="no"
-AC_MSG_RESULT([checking for sorting configuration])
-AC_ARG_WITH(sieve,[ --with-sieve=PATH full path to libSieve header directory],
- sieveheadername="$withval")
+dnl Set the default sort modules to null, as
+dnl the user may not have asked for Sieve at all.
SORTALIB="modules/.libs/libsort_null.a"
SORTLTLIB="modules/libsort_null.la"
-WARN=0
-if test [ "$sieveheadername" != "no" ]; then
- AC_MSG_RESULT([using Sieve sorting])
- AC_DEFINE([SIEVE], 1, [Define if Sieve sorting will be used.])
- # Redefine if there's actually Sieve sorting
- SORTALIB="modules/.libs/libsort_sieve.a"
- SORTLTLIB="modules/libsort_sieve.la"
- if test [ "$sieveheadername" != "yes" ]; then
- AC_MSG_CHECKING([for sieve2.h (user supplied)])
- if test [ -r "$sieveheadername/sieve2.h" ]; then
- AC_MSG_RESULT([$sieveheadername/sieve2.h])
- SIEVEINC="-I$sieveheadername"
- else
- AC_MSG_RESULT([not found])
- SIEVEINC=""
- sieveheadername=""
- AC_MSG_ERROR([
- Unable to find sieve2.h where you specified, try just --with-sieve to
- have configure guess])
+dnl Go looking for the Sieve headers and libraries.
+if test [ "x$lookforsieve" != "xno" ]; then
+
+ dnl We were given a specific path. Only look there.
+ if test [ "x$lookforsieve" != "xyes" ]; then
+ sieveprefixes=$lookforsieve
fi
- else
- AC_MSG_CHECKING([for sieve2.h])
- for sievepaths in $sieveheaderpaths
- do
- if test [ -r "$sievepaths/sieve2.h" ]; then
- SIEVEINC="-I$sievepaths"
- AC_MSG_RESULT([$sievepaths/sieve2.h])
- break
- fi
+
+ dnl Look for Sieve headers.
+ AC_MSG_CHECKING([for libSieve headers])
+ STOP_LOOKING_FOR_SIEVE=""
+ while test [ -z $STOP_LOOKING_FOR_SIEVE ]; do
+
+ dnl See if we already have the paths we need in the environment.
+ dnl ...but only if --with-sieve was given without a specific path.
+ if test [ "x$lookforsieve" = "xyes" ]; then
+ DBMAIL_CHECK_SIEVE_INC([SIEVEINC=""], [SIEVEINC="failed"])
+ if test [ "x$SIEVEINC" != "xfailed" ]; then
+ break
+ fi
+ fi
+
+ dnl Explicitly test paths from --with-sieve or configure.in
+ for TEST_PATH in $sieveprefixes; do
+ TEST_PATH="$TEST_PATH/include"
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -I$TEST_PATH"
+ DBMAIL_CHECK_SIEVE_INC([SIEVEINC="-I$TEST_PATH"], [SIEVEINC="failed"])
+ CFLAGS=$SAVE_CFLAGS
+ if test [ "x$SIEVEINC" != "xfailed" ]; then
+ break 2
+ fi
+ done
+
+ STOP_LOOKING_FOR_SIEVE="done"
done
- if test [ -z "$SIEVEINC" ]; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([
- Unable to locate sieve2.h, try specifying with --with-sieve])
+
+ if test [ "x$SIEVEINC" = "xfailed" ]; then
+ AC_MSG_ERROR([Could not find libSieve headers.])
+ else
+ AC_MSG_RESULT($SIEVEINC)
+ fi
+
+ dnl Look for Sieve libraries.
+ AC_MSG_CHECKING([for libSieve libraries])
+ STOP_LOOKING_FOR_SIEVE=""
+ while test [ -z $STOP_LOOKING_FOR_SIEVE ]; do
+
+ dnl See if we already have the paths we need in the environment.
+ dnl ...but only if --with-sieve was given without a specific path.
+ if test [ "x$lookforsieve" = "xyes" ]; then
+ DBMAIL_CHECK_SIEVE_LIB([SIEVELIB="-lsieve"], [SIEVELIB="failed"])
+ if test [ "x$SIEVELIB" != "xfailed" ]; then
+ break
+ fi
+ fi
+
+ dnl Explicitly test paths from --with-sieve or configure.in
+ for TEST_PATH in $sieveprefixes; do
+ TEST_PATH="$TEST_PATH/lib"
+ SAVE_CFLAGS=$CFLAGS
+ dnl The headers might be in a funny place, so we need to use -Ipath
+ CFLAGS="$CFLAGS -L$TEST_PATH $SIEVEINC"
+ DBMAIL_CHECK_SIEVE_LIB([SIEVELIB="-L$TEST_PATH -lsieve"], [SIEVELIB="failed"])
+ CFLAGS=$SAVE_CFLAGS
+ if test [ "x$SIEVELIB" != "xfailed" ]; then
+ break 2
+ fi
+ done
+
+ STOP_LOOKING_FOR_SIEVE="done"
+ done
+
+ if test [ "x$SIEVELIB" = "xfailed" ]; then
+ AC_MSG_ERROR([Could not find libSieve library.])
+ else
+ dnl Found it, set the settings.
+ AC_MSG_RESULT($SIEVELIB)
+ AC_DEFINE([SIEVE], 1, [Define if Sieve sorting will be used.])
+ AC_SUBST(SIEVELIB)
+ AC_SUBST(SIEVEINC)
+ SORTALIB="modules/.libs/libsort_sieve.a"
+ SORTLTLIB="modules/libsort_sieve.la"
fi
- fi
-else
- AC_MSG_RESULT([not using any sorting])
fi
])
-dnl DBMAIL_CHECK_SIEVE_LIBS
-AC_DEFUN([DBMAIL_CHECK_SIEVE_LIBS], [dnl
-# Look for libs needed to link to SIEVE first
-if test [ "$sieveheadername" != "no" ]; then
- AC_CHECK_LIB(sieve,sieve2_listextensions,[ SORTLIB="-lsieve"], [SORTLIB=""])
- if test [ -z "$SORTLIB" ]; then
- AC_MSG_ERROR([
- Unable to link against libSieve. It appears you are missing the
- development libraries or they aren't in your linker's path
- ])
- fi
-else
- SORTLIB=""
-fi
+
+dnl Check for LDAP header.
+AC_DEFUN([DBMAIL_CHECK_LDAP_INC],[
+ AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([[
+ #define NULL 0
+ #include <ldap.h>]]),
+ [$1],
+ [$2])
])
-
-dnl DBMAIL_AUTH_CONF
+dnl Check for LDAP library.
+AC_DEFUN([DBMAIL_CHECK_LDAP_LIB],[
+ AC_LINK_IFELSE(
+ AC_LANG_PROGRAM([[
+ #define NULL 0
+ #include <ldap.h>]]),
+ [$1],
+ [$2])
+])
+
+dnl DBMAIL_LDAP_CONF
dnl check for ldap or sql authentication
-AC_DEFUN([DBMAIL_AUTH_CONF], [dnl
+AC_DEFUN([DBMAIL_LDAP_CONF], [dnl
+WARN=0
-authldapheadername="no"
+dnl --with-auth-ldap is deprecated as of DBMail 2.2.2
+AC_ARG_WITH(auth-ldap,[ --with-auth-ldap=PATH deprecated, use --with-ldap],
+ [lookforauthldap="$withval"],[lookforauthldap="no"])
-AC_MSG_RESULT([checking for authentication configuration])
-AC_ARG_WITH(auth-ldap,[ --with-auth-ldap=PATH full path to ldap header directory],
- authldapheadername="$withval")
-AUTHALIB="modules/.libs/libauth_ldap.a"
-AUTHLTLIB="modules/libauth_ldap.la"
+AC_ARG_WITH(ldap,[ --with-ldap=PATH path to LDAP base directory (e.g. /usr/local or /usr)],
+ [lookforldap="$withval"],[lookforldap="no"])
-WARN=0
-if test [ "$authldapheadername" != "no" ]; then
- # --with-auth-ldap was specified
- AC_MSG_RESULT([using LDAP authentication])
- dnl CFLAGS="$CFLAGS -DAUTHLDAP"
- AC_DEFINE([AUTHLDAP], 1, [Define if LDAP authentication will be used.])
- if test [ "$withval" != "yes" ]; then
- AC_MSG_CHECKING([for ldap.h (user supplied)])
- if test [ -r "$authldapheadername/ldap.h" ]; then
- AC_MSG_RESULT([$authldapheadername/ldap.h])
- LDAPINC="-I$authldapheadername"
- else
- AC_MSG_RESULT([not found])
- LDAPINC=""
- authldapheadername=""
- AC_MSG_ERROR([Unable to find ldap.h where you specified, try just --with-auth-ldap to have configure guess])
- fi
- else
- AC_MSG_CHECKING([for ldap.h])
- for ldappath in $ldapheaderpaths; do
- if test [ -r "$ldappath/ldap.h" ]; then
- LDAPINC="-I$ldappath"
- AC_MSG_RESULT([$ldappath/ldap.h])
- break
- fi
- done
- if test [ -z "$LDAPINC" ]; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Unable to locate ldap.h, try specifying with --with-auth-ldap])
- fi
- fi
-else
- AUTHALIB="modules/.libs/libauth_sql.a"
- AUTHLTLIB="modules/libauth_sql.la"
- AC_MSG_RESULT([using SQL authentication])
-fi
-])
+dnl Set the default auth modules to sql, as
+dnl the user may not have asked for LDAP at all.
+AUTHALIB="modules/.libs/libauth_sql.a"
+AUTHLTLIB="modules/libauth_sql.la"
-dnl DBMAIL_CHECK_LDAP_LIBS
-dnl
-AC_DEFUN([DBMAIL_CHECK_LDAP_LIBS], [dnl
-# Look for libs needed to link to LDAP first
-if test [ "$authldapheadername" != "no" ]; then
- AC_CHECK_LIB(ldap,ldap_bind,[ LDAPLIB="-lldap"], [LDAPLIB=""])
- if test [ -z "$LDAPLIB" ]; then
- AC_MSG_ERROR([ Unable to link against ldap. It appears you are missing the development libraries or they aren't in your linker's path ])
- fi
-else
- LDAPLIB=""
+dnl Go looking for the LDAP headers and libraries.
+if ( test [ "x$lookforldap" != "xno" ] || test [ "x$lookforauthldap" != "xno" ] ); then
+
+ dnl Support the deprecated --with-auth-ldap per comment above.
+ if ( test [ "x$lookforauthldap" != "xyes" ] && test [ "x$lookforauthldap" != "xno" ] ); then
+ lookforldap=$lookforauthldap
+ fi
+
+ dnl We were given a specific path. Only look there.
+ if ( test [ "x$lookforldap" != "xyes" ] && test [ "x$lookforldap" != "xno" ] ); then
+ ldapprefixes=$lookforldap
+ fi
+
+ dnl Look for LDAP headers.
+ AC_MSG_CHECKING([for LDAP headers])
+ STOP_LOOKING_FOR_LDAP=""
+ while test [ -z $STOP_LOOKING_FOR_LDAP ]; do
+
+ dnl See if we already have the paths we need in the environment.
+ dnl ...but only if --with-ldap was given without a specific path.
+ if ( test [ "x$lookforldap" = "xyes" ] || test [ "x$lookforauthldap" = "xyes" ] ); then
+ DBMAIL_CHECK_LDAP_INC([LDAPINC=""], [LDAPINC="failed"])
+ if test [ "x$LDAPINC" != "xfailed" ]; then
+ break
+ fi
+ fi
+
+ dnl Explicitly test paths from --with-ldap or configure.in
+ for TEST_PATH in $ldapprefixes; do
+ TEST_PATH="$TEST_PATH/include"
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -I$TEST_PATH"
+ DBMAIL_CHECK_LDAP_INC([LDAPINC="-I$TEST_PATH"], [LDAPINC="failed"])
+ CFLAGS=$SAVE_CFLAGS
+ if test [ "x$LDAPINC" != "xfailed" ]; then
+ break 2
+ fi
+ done
+
+ STOP_LOOKING_FOR_LDAP="done"
+ done
+
+ if test [ "x$LDAPINC" = "xfailed" ]; then
+ AC_MSG_ERROR([Could not find LDAP headers.])
+ else
+ AC_MSG_RESULT($LDAPINC)
+ fi
+
+ dnl Look for LDAP libraries.
+ AC_MSG_CHECKING([for LDAP libraries])
+ STOP_LOOKING_FOR_LDAP=""
+ while test [ -z $STOP_LOOKING_FOR_LDAP ]; do
+
+ dnl See if we already have the paths we need in the environment.
+ dnl ...but only if --with-ldap was given without a specific path.
+ if ( test [ "x$lookforldap" = "xyes" ] || test [ "x$lookforauthldap" = "xyes" ] ); then
+ DBMAIL_CHECK_LDAP_LIB([LDAPLIB="-lldap"], [LDAPLIB="failed"])
+ if test [ "x$LDAPLIB" != "xfailed" ]; then
+ break
+ fi
+ fi
+
+ dnl Explicitly test paths from --with-ldap or configure.in
+ for TEST_PATH in $ldapprefixes; do
+ TEST_PATH="$TEST_PATH/lib"
+ SAVE_CFLAGS=$CFLAGS
+ dnl The headers might be in a funny place, so we need to use -Ipath
+ CFLAGS="$CFLAGS -L$TEST_PATH $LDAPINC"
+ DBMAIL_CHECK_LDAP_LIB([LDAPLIB="-L$TEST_PATH -lldap"], [LDAPLIB="failed"])
+ CFLAGS=$SAVE_CFLAGS
+ if test [ "x$LDAPLIB" != "xfailed" ]; then
+ break 2
+ fi
+ done
+
+ STOP_LOOKING_FOR_LDAP="done"
+ done
+
+ if test [ "x$LDAPLIB" = "xfailed" ]; then
+ AC_MSG_ERROR([Could not find LDAP library.])
+ else
+ AC_MSG_RESULT($LDAPLIB)
+ AC_DEFINE([AUTHLDAP], 1, [Define if LDAP sorting will be used.])
+ AC_SUBST(LDAPLIB)
+ AC_SUBST(LDAPINC)
+ AUTHALIB="modules/.libs/libauth_ldap.a"
+ AUTHLTLIB="modules/libauth_ldap.la"
+ fi
fi
])
diff --git a/acl.c b/acl.c
index 903ca86a..d9a81723 100644
--- a/acl.c
+++ b/acl.c
@@ -52,7 +52,7 @@ static int acl_get_rightsstring(u64_t userid, u64_t mboxid,
/*@out@*/ char *rightsstring);
-int acl_has_right(mailbox_t *mailbox, u64_t userid, ACLRight_t right)
+gboolean acl_has_right(mailbox_t *mailbox, u64_t userid, ACLRight_t right)
{
u64_t anyone_userid;
int test;
@@ -87,10 +87,14 @@ int acl_has_right(mailbox_t *mailbox, u64_t userid, ACLRight_t right)
/* else check the 'anyone' user */
test = auth_user_exists(DBMAIL_ACL_ANYONE_USER, &anyone_userid);
if (test == DM_EQUERY)
- return DM_EQUERY;
- if (test)
- return db_acl_has_right(mailbox, anyone_userid, right_flag);
-
+ return FALSE;
+ if (test) {
+ if (db_acl_has_right(mailbox, anyone_userid, right_flag))
+ return TRUE;
+ else
+ return FALSE;
+ }
+
return FALSE;
}
diff --git a/acl.h b/acl.h
index 7db786f2..4e94a82a 100644
--- a/acl.h
+++ b/acl.h
@@ -40,11 +40,10 @@
* \param mboxid id of mailbox
* \param right the right to check for
* \return
- * - -1 on db error
* - 0 if no right
* - 1 if user has this right
*/
-int acl_has_right(mailbox_t *mailbox, u64_t userid, ACLRight_t right);
+gboolean acl_has_right(mailbox_t *mailbox, u64_t userid, ACLRight_t right);
/**
* \brief sets new rights to a mailbox for a user.
diff --git a/check_dbmail_db.c b/check_dbmail_db.c
index 86848c5f..eb2f8673 100644
--- a/check_dbmail_db.c
+++ b/check_dbmail_db.c
@@ -40,7 +40,6 @@ extern char *configFile;
extern db_param_t _db_params;
extern int quiet;
extern int reallyquiet;
-extern char *query;
u64_t useridnr = 0;
u64_t useridnr_domain = 0;
@@ -808,7 +807,9 @@ START_TEST(test_db_imap_utf7_like)
for (i = 0; trythese[i] != NULL; i++) {
char *result = db_imap_utf7_like("name", trythese[i], "/%");
- fail_unless(strcmp(result, getthese[i])==0, "Failed to make db_imap_utf7_like string for [%s]", trythese[i]);
+ fail_unless(strcmp(result, getthese[i])==0,
+ "Possible failure to make db_imap_utf7_like string for [%s]",
+ trythese[i]);
dm_free(result);
}
diff --git a/check_dbmail_imapd.c b/check_dbmail_imapd.c
index be6a948f..a0169355 100644
--- a/check_dbmail_imapd.c
+++ b/check_dbmail_imapd.c
@@ -17,7 +17,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
+<<<<<<< master
* $Id$
+=======
+ * $Id$
+>>>>>>> dbmail_2_2
*
*
*
@@ -146,8 +150,8 @@ static clientinfo_t * ci_new(void)
FILE *fd = fopen("/dev/null","w");
ci->userData = dbmail_imap_userdata_new();
ci->rx = stdin;
- ci->tx = fd;
- //ci->tx = stderr;
+ //ci->tx = fd;
+ ci->tx = stderr;
return ci;
}
@@ -203,7 +207,6 @@ END_TEST
//dbmail_imap_session_handle_auth(self, const char *username, const char *password);
-#define MAX_LINESIZE 1024
START_TEST(test_imap_session_prompt)
{
int result;
@@ -302,8 +305,8 @@ START_TEST(test_dbmail_imap_session_fetch_get_items)
result = dbmail_imap_session_mailbox_open(s,mailbox);
fail_unless(result==0, "mailbox_open failed");
- dbmail_mailbox_set_uid(s->mailbox,TRUE);
- s->fetch_ids = dbmail_mailbox_get_set(s->mailbox,"1:*",TRUE);
+ dbmail_mailbox_set_uid(s->mailbox, TRUE);
+ s->fetch_ids = dbmail_mailbox_get_set(s->mailbox, "1:*", TRUE);
fail_unless(s->fetch_ids!=NULL, "get_set failed");
@@ -575,6 +578,7 @@ END_TEST
#define F(a,b) fail_unless(strcmp(c = imap_cleanup_address(a), b)==0, "\n[" a "] should have yielded \n[" b "] but got \n[%s]", c)
+#define Fnull(a,b) fail_unless(strcmp(c = imap_cleanup_address(a), b)==0, "\n[] should have yielded \n[" b "] but got \n[%s]", c)
START_TEST(test_imap_cleanup_address)
{
@@ -584,6 +588,8 @@ START_TEST(test_imap_cleanup_address)
F("=?iso-8859-1?Q?\"B=BA_V._F._Z=EAzere\"?=<nobody@nowhere.org>","\"=?iso-8859-1?Q?B=BA_V._F._Z=EAzere?=\" <nobody@nowhere.org>");
F("=?iso-8859-1?Q?B=BA_V._F._Z=EAzere?=<nobody@nowhere.org>","\"=?iso-8859-1?Q?B=BA_V._F._Z=EAzere?=\" <nobody@nowhere.org>");
F("\"=?iso-8859-1?Q?B=BA_V._F._Z=EAzere?=\" <nobody@nowhere.org>","\"=?iso-8859-1?Q?B=BA_V._F._Z=EAzere?=\" <nobody@nowhere.org>");
+ F("", "");
+ Fnull(NULL, "");
F("Some One <some@foo.org>", "Some One <some@foo.org>");
F(" <some@foo.org>", "<some@foo.org>");
F("=?ISO-8859-2?Q? \"Verlag=20Dash=F6fer=20-=20DU.cz?= =?ISO-8859-2?Q?\" ?= <e-noviny@smtp.dashofer.cz>",
diff --git a/check_dbmail_mailbox.c b/check_dbmail_mailbox.c
index fc8000a0..dd648d96 100644
--- a/check_dbmail_mailbox.c
+++ b/check_dbmail_mailbox.c
@@ -150,6 +150,7 @@ START_TEST(test_dbmail_mailbox_open)
struct DbmailMailbox *mb = dbmail_mailbox_new(get_mailbox_id());
result = dbmail_mailbox_open(mb);
fail_unless(result == 0, "dbmail_mailbox_open failed");
+ dbmail_mailbox_free(mb);
}
END_TEST
@@ -355,7 +356,23 @@ START_TEST(test_dbmail_mailbox_search)
dbmail_mailbox_free(mb);
g_strfreev(array);
+ //
+ idx=0;
+ sorted = 0;
+ mb = dbmail_mailbox_new(get_mailbox_id());
+ args = g_strdup("OR FROM myclient SUBJECT myclient");
+ array = g_strsplit(args," ",0);
+ g_free(args);
+ dbmail_mailbox_build_imap_search(mb, array, &idx, sorted);
+ dbmail_mailbox_search(mb);
+// found = g_tree_nnodes(mb->ids);
+// fail_unless(found==1,"dbmail_mailbox_search failed: SEARCH UID 1");
+
+ dbmail_mailbox_free(mb);
+ g_strfreev(array);
+
+
}
END_TEST
diff --git a/check_dbmail_message.c b/check_dbmail_message.c
index 8020e73c..e6c8f27a 100644
--- a/check_dbmail_message.c
+++ b/check_dbmail_message.c
@@ -17,7 +17,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*
+<<<<<<< master
* $Id$
+=======
+ * $Id$
+>>>>>>> dbmail_2_2
*
*
*
@@ -114,10 +118,12 @@ END_TEST
START_TEST(test_dbmail_message_retrieve)
{
struct DbmailMessage *m, *n;
+ GString *s;
u64_t physid;
+ s = g_string_new(multipart_message);
m = dbmail_message_new();
- m = dbmail_message_init_with_string(m, g_string_new(multipart_message));
+ m = dbmail_message_init_with_string(m, s);
dbmail_message_set_header(m,
"References",
"<20050326155326.1afb0377@ibook.linuks.mine.nu> <20050326181954.GB17389@khazad-dum.debian.net> <20050326193756.77747928@ibook.linuks.mine.nu> ");
@@ -132,6 +138,7 @@ START_TEST(test_dbmail_message_retrieve)
dbmail_message_free(m);
dbmail_message_free(n);
+ g_string_free(s,TRUE);
}
END_TEST
@@ -225,7 +232,7 @@ START_TEST(test_dbmail_message_hdrs_to_string)
m = dbmail_message_init_with_string(m, s);
result = dbmail_message_hdrs_to_string(m);
- fail_unless(strlen(result)==634, "dbmail_message_hdrs_to_string failed [%d]", strlen(result));
+ fail_unless(strlen(result)==634, "dbmail_message_hdrs_to_string failed [%d] != [634]\n[%s]\n", strlen(result), result);
g_string_free(s,TRUE);
dbmail_message_free(m);
@@ -245,7 +252,7 @@ START_TEST(test_dbmail_message_body_to_string)
m = dbmail_message_new();
m = dbmail_message_init_with_string(m,s);
result = dbmail_message_body_to_string(m);
- fail_unless(strlen(result)==1045, "dbmail_message_body_to_string failed");
+ fail_unless(strlen(result)==1045, "dbmail_message_body_to_string failed [%d] != [1045]\n[%s]\n", strlen(result),result);
dbmail_message_free(m);
g_string_free(s,TRUE);
@@ -256,7 +263,7 @@ START_TEST(test_dbmail_message_body_to_string)
m = dbmail_message_init_with_string(m,s);
result = dbmail_message_body_to_string(m);
// printf("{%d} [%s]\n", strlen(result), result);
- fail_unless(strlen(result)==329, "dbmail_message_body_to_string failed");
+ fail_unless(strlen(result)==329, "dbmail_message_body_to_string failed [%s]", result);
dbmail_message_free(m);
g_string_free(s,TRUE);
@@ -324,11 +331,15 @@ END_TEST
START_TEST(test_dbmail_message_set_header)
{
- struct DbmailMessage *m = dbmail_message_new();
- m = dbmail_message_init_with_string(m, g_string_new(multipart_message));
+ struct DbmailMessage *m;
+ GString *s;
+ s = g_string_new(multipart_message);
+ m = dbmail_message_new();
+ m = dbmail_message_init_with_string(m,s);
dbmail_message_set_header(m, "X-Foobar","Foo Bar");
fail_unless(dbmail_message_get_header(m, "X-Foobar")!=NULL, "set_header failed");
dbmail_message_free(m);
+ g_string_free(s,TRUE);
}
END_TEST
@@ -337,11 +348,13 @@ START_TEST(test_dbmail_message_get_header)
char *t;
struct DbmailMessage *h = dbmail_message_new();
struct DbmailMessage *m = dbmail_message_new();
+ GString *s, *j;
-
- m = dbmail_message_init_with_string(m, g_string_new(multipart_message));
+ s = g_string_new(multipart_message);
+ m = dbmail_message_init_with_string(m, s);
t = dbmail_message_hdrs_to_string(m);
- h = dbmail_message_init_with_string(h, g_string_new(t));
+ j = g_string_new(t);
+ h = dbmail_message_init_with_string(h, j);
g_free(t);
fail_unless(dbmail_message_get_header(m, "X-Foobar")==NULL, "get_header failed on full message");
@@ -352,6 +365,8 @@ START_TEST(test_dbmail_message_get_header)
dbmail_message_free(m);
dbmail_message_free(h);
+ g_string_free(s,TRUE);
+ g_string_free(j,TRUE);
}
END_TEST
@@ -387,12 +402,14 @@ START_TEST(test_dbmail_message_cache_headers)
{
struct DbmailMessage *m = dbmail_message_new();
char *s = g_new0(char,20);
- m = dbmail_message_init_with_string(m, g_string_new(multipart_message));
+ GString *j = g_string_new(multipart_message);
+ m = dbmail_message_init_with_string(m,j);
dbmail_message_set_header(m,
"References",
"<20050326155326.1afb0377@ibook.linuks.mine.nu> <20050326181954.GB17389@khazad-dum.debian.net> <20050326193756.77747928@ibook.linuks.mine.nu> ");
dbmail_message_store(m);
dbmail_message_free(m);
+ g_string_free(j,TRUE);
sprintf(s,"%.*s",10,"abcdefghijklmnopqrstuvwxyz");
fail_unless(MATCH(s,"abcdefghij"),"string truncate failed");
@@ -403,10 +420,12 @@ END_TEST
START_TEST(test_dbmail_message_get_header_addresses)
{
GList * result;
+ GString *s;
struct DbmailMessage *m;
+ s = g_string_new(multipart_message);
m = dbmail_message_new();
- m = dbmail_message_init_with_string(m,g_string_new(multipart_message));
+ m = dbmail_message_init_with_string(m,s);
result = dbmail_message_get_header_addresses(m, "Cc");
result = g_list_first(result);
@@ -418,16 +437,19 @@ START_TEST(test_dbmail_message_get_header_addresses)
g_list_foreach(result,(GFunc)g_free, NULL);
g_list_free(result);
dbmail_message_free(m);
+ g_string_free(s,TRUE);
}
END_TEST
START_TEST(test_dbmail_message_get_header_repeated)
{
GTuples *headers;
+ GString *s;
struct DbmailMessage *m;
+ s = g_string_new(multipart_message);
m = dbmail_message_new();
- m = dbmail_message_init_with_string(m,g_string_new(multipart_message));
+ m = dbmail_message_init_with_string(m,s);
headers = dbmail_message_get_header_repeated(m, "Received");
@@ -444,6 +466,7 @@ START_TEST(test_dbmail_message_get_header_repeated)
g_tuples_destroy(headers);
dbmail_message_free(m);
+ g_string_free(s,TRUE);
}
END_TEST
@@ -458,7 +481,7 @@ START_TEST(test_dbmail_message_construct)
"Subject: Some test\n"
"To: bar@foo.org\n"
"MIME-Version: 1.0\n"
- "Content-Type: text/plain\n"
+ "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: base64\n"
"\n"
"CnRlc3RpbmcKCuHh4eHk");
diff --git a/check_dbmail_server.c b/check_dbmail_server.c
index 5ccfaa76..0a634c7d 100644
--- a/check_dbmail_server.c
+++ b/check_dbmail_server.c
@@ -78,6 +78,7 @@ START_TEST(test_dm_sock_compare)
X(1,"inet:127.0.0.1:110","inet:127.0.0.1:143","");
X(1,"inet:127.0.0.1:143","inet:127.0.0.2:143","");
X(1,"inet:127.0.0.1:143","","inet:0.0.0.0:0");
+ X(1,"inet:10.0.0.6:143","inet:10.0.0.6:110","");
X(0,"inet:127.0.0.1:143","inet:127.0.0.1:143","");
X(0,"inet:127.0.0.1:143","inet:127.0.0.1/8:143","");
X(0,"inet:127.0.0.1:143","inet:127.0.0.0/8:143","inet:10.0.0.0/8");
@@ -92,6 +93,7 @@ START_TEST(test_dm_sock_compare)
Y(8,"inet:10.1.1.1/8:110","inet:10.1.1.1:110");
Y(16,"inet:10.1.1.1/16:110","inet:10.1.1.1:110");
Y(32,"inet:10.1.1.1/32:110","inet:10.1.1.1:110");
+ Y(0,"inet:10.0.0.6:143","inet:10.0.0.6:110");
}
END_TEST
diff --git a/configure.in b/configure.in
index cde55220..afbc824a 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,8 @@
+<<<<<<< master
# $Id$
+=======
+# $Id$
+>>>>>>> dbmail_2_2
# Copyright (C) 1999-2004 IC & S dbmail@ic-s.nl
#
# This program is free software; you can redistribute it and/or
@@ -28,8 +32,8 @@ pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
/usr/freeware/include $HOME/include $HOME/pgsql/include \
/usr/local/pgsql/include /usr/include/postgresql $HOME"
-ldapheaderpaths="/usr/include /usr/local/include"
-sieveheaderpaths="/usr/include /usr/local/include"
+ldapprefixes="/usr /usr/local"
+sieveprefixes="/usr /usr/local"
AC_DEFINE(_GNU_SOURCE,'','Defined GNU SOURCE')
@@ -46,10 +50,8 @@ AM_CONDITIONAL(STATIC, [ test "$enable_static" = "yes" ])
DM_DEFINES
DBMAIL_BOTH_SQL_CHECK
DBMAIL_CHECK_SQL_LIBS
-DBMAIL_AUTH_CONF
-DBMAIL_CHECK_LDAP_LIBS
+DBMAIL_LDAP_CONF
DBMAIL_SIEVE_CONF
-DBMAIL_CHECK_SIEVE_LIBS
DBMAIL_CHECK_GLIB
DBMAIL_CHECK_GMIME
DBMAIL_CHECK_GC
@@ -63,11 +65,20 @@ AC_PROG_CC
AC_COMPILE_WARNINGS
AC_C_CONST
AC_C_INLINE
+<<<<<<< master
AM_CONDITIONAL(MYSQL, [test -n "$MYSQLINC"])
AM_CONDITIONAL(PGSQL, [test -n "$PGSQLINC"])
AM_CONDITIONAL(SQLITE, [test -n "$SQLITEINC"])
+AM_CONDITIONAL(INGRES, [test -n "$INGRESINC"])
AM_CONDITIONAL(SIEVE, [test -n "$SIEVEINC"])
AM_CONDITIONAL(LDAP, [test -n "$LDAPINC"])
+=======
+AM_CONDITIONAL(MYSQL, [test -n "$MYSQLLIB"])
+AM_CONDITIONAL(PGSQL, [test -n "$PGSQLLIB"])
+AM_CONDITIONAL(SQLITE, [test -n "$SQLITELIB"])
+AM_CONDITIONAL(SIEVE, [test -n "$SIEVELIB"])
+AM_CONDITIONAL(LDAP, [test -n "$LDAPLIB"])
+>>>>>>> dbmail_2_2
AC_C_BIGENDIAN
AC_CHECK_HEADERS(endian.h)
AC_CHECK_HEADERS(crypt.h)
@@ -84,7 +95,16 @@ AC_SUBST(SQLITELIB)
AC_SUBST(SQLITELALIB)
AC_SUBST(SQLITELTLIB)
+<<<<<<< master
+AC_SUBST(INGRESLIB)
+AC_SUBST(INGRESLALIB)
+AC_SUBST(INGRESLTLIB)
+
AC_SUBST(SORTLIB)
+=======
+AC_SUBST(SIEVEINC)
+AC_SUBST(SIEVELIB)
+>>>>>>> dbmail_2_2
AC_SUBST(SORTALIB)
AC_SUBST(SORTLTLIB)
@@ -94,8 +114,7 @@ AC_SUBST(AUTHLTLIB)
AC_SUBST(MYSQLINC)
AC_SUBST(PGSQLINC)
AC_SUBST(SQLITEINC)
-
-AC_SUBST(SIEVEINC)
+AC_SUBST(INGRESINC)
AC_SUBST(LDAPLIB)
AC_SUBST(LDAPINC)
diff --git a/contrib/expirebox.sh b/contrib/expirebox.sh
new file mode 100755
index 00000000..e46d885a
--- /dev/null
+++ b/contrib/expirebox.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+
+MAILBOX='Spam'
+EXPIRES=30
+
+function getids()
+{
+ tmpfile=`tempfile`
+
+ cat >> $tmpfile << EOQ
+
+select message_idnr from dbmail_messages m
+ join dbmail_mailboxes b on m.mailbox_idnr=b.mailbox_idnr
+ join dbmail_physmessage p on m.physmessage_id=p.id
+where
+ b.name="$MAILBOX"
+and
+ m.status<2
+and
+ to_days(p.internal_date) < to_days(now())-$EXPIRES
+
+EOQ
+ mysql -r -B --skip-column-names dbmail < $tmpfile
+}
+
+count=`getids|wc -l`
+if [ $count -gt 0 ]; then
+ echo expiring $count messages
+ getids | xargs -l100 echo|sed 's/ /,/g'|\
+ xargs -l1 printf "update dbmail_messages set status=2 where message_idnr in (%s);\n" |\
+ mysql dbmail
+else
+ echo nothing to do
+fi
+
diff --git a/db.c b/db.c
index 02ab4652..55882f3f 100644
--- a/db.c
+++ b/db.c
@@ -27,7 +27,7 @@
* implement database functionality. This used to split out
* between MySQL and PostgreSQL, but this is now integrated.
* Only the actual calls to the database APIs are still in
- * place in the mysql/ and pgsql/ directories
+ * place in the modules/db* files
*/
#include "dbmail.h"
@@ -81,7 +81,6 @@ const char *DB_TABLENAMES[DB_NTABLES] = {
};
/** can be used for making queries to db backend */
-char query[DEF_QUERYSIZE];
/* size of buffer for writing messages to a client */
#define WRITE_BUFFER_SIZE 2048
@@ -118,6 +117,10 @@ static int user_idnr_is_delivery_user_idnr(u64_t user_idnr);
*/
int db_check_version(void)
{
+
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE, "SELECT 1=1 FROM %sphysmessage LIMIT 1 OFFSET 0", DBPFX);
if (db_query(query) == -1) {
TRACE(TRACE_FATAL, "pre-2.0 database incompatible. You need to run the conversion script");
@@ -146,8 +149,10 @@ int db_check_version(void)
int db_use_usermap(void)
{
static int use_usermap = -1;
+ char query[DEF_QUERYSIZE];
if (use_usermap != -1)
return use_usermap;
+ memset(query,0,DEF_QUERYSIZE);
snprintf(query, DEF_QUERYSIZE, "SELECT userid FROM %susermap WHERE 1 = 2",
DBPFX);
@@ -166,6 +171,8 @@ int db_use_usermap(void)
int db_begin_transaction()
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
snprintf(query, DEF_QUERYSIZE, "BEGIN");
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "error beginning transaction");
@@ -176,6 +183,8 @@ int db_begin_transaction()
int db_commit_transaction()
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
snprintf(query, DEF_QUERYSIZE, "COMMIT");
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "error committing transaction."
@@ -189,6 +198,9 @@ int db_commit_transaction()
int db_rollback_transaction()
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE, "ROLLBACK");
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "error rolling back transaction. "
@@ -210,7 +222,6 @@ int mailbox_is_writable(u64_t mailbox_idnr)
if (db_getmailbox_flags(&mb) == DM_EQUERY)
return DM_EQUERY;
-
if (mb.permission != IMAPPERM_READWRITE) {
TRACE(TRACE_INFO, "read-only mailbox");
return DM_EQUERY;
@@ -220,12 +231,14 @@ int mailbox_is_writable(u64_t mailbox_idnr)
}
int db_savepoint_transaction(const char* name)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if(!name){
TRACE(TRACE_ERROR, "error no savepoint name");
return DM_EQUERY;
}
- memset(query, 0, sizeof(query));
snprintf(query, DEF_QUERYSIZE, "SAVEPOINT %s", name);
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "error set savepoint to transaction");
@@ -236,13 +249,15 @@ int db_savepoint_transaction(const char* name)
int db_rollback_savepoint_transaction(const char* name)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
gchar *sname;
if(!name){
TRACE(TRACE_ERROR, "error no savepoint name");
return DM_EQUERY;
}
- memset(query, 0, sizeof(query));
sname = dm_stresc(name);
snprintf(query, DEF_QUERYSIZE, "ROLLBACK TO SAVEPOINT %s", sname);
g_free(sname);
@@ -260,6 +275,9 @@ int db_rollback_savepoint_transaction(const char* name)
int db_get_physmessage_id(u64_t message_idnr, u64_t * physmessage_id)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(physmessage_id != NULL);
*physmessage_id = 0;
@@ -287,7 +305,11 @@ int db_get_physmessage_id(u64_t message_idnr, u64_t * physmessage_id)
int db_get_quotum_used(u64_t user_idnr, u64_t * curmail_size)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(curmail_size != NULL);
+ *curmail_size = 0;
snprintf(query, DEF_QUERYSIZE,
"SELECT curmail_size FROM %susers "
@@ -298,7 +320,9 @@ int db_get_quotum_used(u64_t user_idnr, u64_t * curmail_size)
return DM_EQUERY;
}
- *curmail_size = db_get_result_u64(0, 0);
+ if (db_num_rows()==1)
+ *curmail_size = db_get_result_u64(0, 0);
+
db_free_result();
return DM_EGENERAL;
}
@@ -307,6 +331,9 @@ int db_get_quotum_used(u64_t user_idnr, u64_t * curmail_size)
static int user_quotum_set(u64_t user_idnr, u64_t size)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if ((result = user_idnr_is_delivery_user_idnr(user_idnr)) == DM_EQUERY)
return DM_EQUERY;
@@ -327,6 +354,9 @@ static int user_quotum_set(u64_t user_idnr, u64_t size)
static int user_quotum_inc(u64_t user_idnr, u64_t size)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if ((result = user_idnr_is_delivery_user_idnr(user_idnr)) == DM_EQUERY)
return DM_EQUERY;
@@ -349,6 +379,9 @@ static int user_quotum_inc(u64_t user_idnr, u64_t size)
static int user_quotum_dec(u64_t user_idnr, u64_t size)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if ((result = user_idnr_is_delivery_user_idnr(user_idnr)) == DM_EQUERY)
return DM_EQUERY;
@@ -370,6 +403,9 @@ static int user_quotum_dec(u64_t user_idnr, u64_t size)
static int user_quotum_check(u64_t user_idnr, u64_t msg_size)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT 1 FROM %susers "
"WHERE user_idnr = %llu "
@@ -396,6 +432,9 @@ static int user_quotum_check(u64_t user_idnr, u64_t msg_size)
int db_calculate_quotum_all()
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
u64_t *user_idnrs;
/**< will hold all user_idnr for which the quotum
has to be set again */
@@ -467,6 +506,9 @@ int db_calculate_quotum_all()
int db_calculate_quotum_used(u64_t user_idnr)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
u64_t quotum = 0;
snprintf(query, DEF_QUERYSIZE, "SELECT SUM(pm.messagesize) "
@@ -503,6 +545,9 @@ int db_get_sievescript_byname(u64_t user_idnr, char *scriptname, char **script)
{
const char *query_result = NULL;
char *escaped_scriptname;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_scriptname = dm_stresc(scriptname);
snprintf(query, DEF_QUERYSIZE,
@@ -550,6 +595,9 @@ int db_check_sievescript_active_byname(u64_t user_idnr, const char *scriptname)
{
int n;
char *name;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if (scriptname) {
name = dm_stresc(scriptname);
@@ -586,6 +634,9 @@ int db_check_sievescript_active_byname(u64_t user_idnr, const char *scriptname)
int db_get_sievescript_active(u64_t user_idnr, char **scriptname)
{
int n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(scriptname != NULL);
*scriptname = NULL;
@@ -612,6 +663,9 @@ int db_get_sievescript_active(u64_t user_idnr, char **scriptname)
int db_get_sievescript_listall(u64_t user_idnr, struct dm_list *scriptlist)
{
int i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(scriptlist);
snprintf(query, DEF_QUERYSIZE,
@@ -648,6 +702,9 @@ int db_rename_sievescript(u64_t user_idnr, char *scriptname, char *newname)
char *escaped_scriptname;
char *escaped_newname;
int active = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
db_begin_transaction();
escaped_scriptname = dm_stresc(scriptname);
@@ -707,6 +764,11 @@ int db_add_sievescript(u64_t user_idnr, char *scriptname, char *script)
unsigned esclen, startlen;
char *escaped_scriptname;
char *escaped_query;
+ const char *sid = "sievescripts_idnr";
+ char *id = NULL;
+ u64_t idnr = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
db_begin_transaction();
@@ -740,11 +802,17 @@ int db_add_sievescript(u64_t user_idnr, char *scriptname, char *script)
escaped_query = g_new0(char, maxesclen);
+ if ((idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
startlen = snprintf(escaped_query, maxesclen,
"INSERT INTO %ssievescripts "
- "(owner_idnr, name, script, active) "
- "VALUES (%llu,'%s', '",
- DBPFX, user_idnr, escaped_scriptname);
+ "(id, owner_idnr, name, script, active) "
+ "VALUES (%s, %llu,'%s', '",
+ DBPFX, id, user_idnr, escaped_scriptname);
+ g_free(id);
size_t scriptlen = strlen(script);
@@ -786,6 +854,9 @@ int db_add_sievescript(u64_t user_idnr, char *scriptname, char *script)
int db_deactivate_sievescript(u64_t user_idnr, char *scriptname)
{
char *escaped_scriptname;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_scriptname = dm_stresc(scriptname);
snprintf(query, DEF_QUERYSIZE,
@@ -807,6 +878,9 @@ int db_deactivate_sievescript(u64_t user_idnr, char *scriptname)
int db_activate_sievescript(u64_t user_idnr, char *scriptname)
{
char *escaped_scriptname;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
db_begin_transaction();
escaped_scriptname = dm_stresc(scriptname);
@@ -846,6 +920,9 @@ int db_delete_sievescript(u64_t user_idnr, char *scriptname)
{
char *escaped_scriptname;
u64_t scriptlen;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
db_begin_transaction();
escaped_scriptname = dm_stresc(scriptname);
@@ -881,7 +958,6 @@ int db_delete_sievescript(u64_t user_idnr, char *scriptname)
db_rollback_transaction();
return DM_EQUERY;
}
-
snprintf(query, DEF_QUERYSIZE,
"DELETE FROM %ssievescripts "
"WHERE owner_idnr = %llu AND name = '%s'",
@@ -968,6 +1044,9 @@ int db_get_sievescript_quota(u64_t user_idnr, u64_t * quotasize)
int db_get_notify_address(u64_t user_idnr, char **notify_address)
{
const char *query_result = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(notify_address != NULL);
*notify_address = NULL;
@@ -996,6 +1075,9 @@ int db_get_notify_address(u64_t user_idnr, char **notify_address)
int db_get_reply_body(u64_t user_idnr, char **reply_body)
{
const char *query_result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
*reply_body = NULL;
snprintf(query, DEF_QUERYSIZE,
@@ -1024,6 +1106,9 @@ int db_get_reply_body(u64_t user_idnr, char **reply_body)
u64_t db_get_mailbox_from_message(u64_t message_idnr)
{
u64_t mailbox_idnr;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT mailbox_idnr FROM %smessages "
@@ -1049,6 +1134,9 @@ u64_t db_get_useridnr(u64_t message_idnr)
{
const char *query_result;
u64_t user_idnr;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT %smailboxes.owner_idnr FROM %smailboxes, %smessages "
@@ -1076,28 +1164,35 @@ int db_insert_physmessage_with_internal_date(timestring_t internal_date,
u64_t * physmessage_id)
{
char *to_date_str = NULL;
-
+ char *id = NULL;
+ const char *sid = "physmessage_id";
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(physmessage_id != NULL);
- *physmessage_id = 0;
-
- if (internal_date != NULL) {
+ if ((*physmessage_id = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", *physmessage_id);
+ else
+ id = g_strdup(db_get_sql(SQL_SEQ_NEXTVAL));
+
+ if (internal_date == NULL)
+ to_date_str = g_strdup(db_get_sql(SQL_CURRENT_TIMESTAMP));
+ else
to_date_str = char2date_str(internal_date);
- snprintf(query, DEF_QUERYSIZE,
- "INSERT INTO %sphysmessage (messagesize, internal_date) "
- "VALUES (0, %s)", DBPFX,to_date_str);
- dm_free(to_date_str);
- } else {
- snprintf(query, DEF_QUERYSIZE,
- "INSERT INTO %sphysmessage (messagesize, internal_date) "
- "VALUES (0, %s)", DBPFX,db_get_sql(SQL_CURRENT_TIMESTAMP));
- }
-
+
+ snprintf(query, DEF_QUERYSIZE,
+ "INSERT INTO %sphysmessage (id, messagesize, internal_date) "
+ "VALUES (%s, 0, %s)", DBPFX, id, to_date_str);
+
+ dm_free(to_date_str);
+ g_free(id);
+
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "insertion of physmessage failed" );
return DM_EQUERY;
}
- *physmessage_id = db_insert_result("physmessage_id");
+ *physmessage_id = db_sequence_currval(sid);
return DM_EGENERAL;
}
@@ -1109,6 +1204,9 @@ int db_insert_physmessage(u64_t * physmessage_id)
int db_message_set_unique_id(u64_t message_idnr, const char *unique_id)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(unique_id);
snprintf(query, DEF_QUERYSIZE,
@@ -1126,6 +1224,9 @@ int db_message_set_unique_id(u64_t message_idnr, const char *unique_id)
int db_physmessage_set_sizes(u64_t physmessage_id, u64_t message_size,
u64_t rfc_size)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"UPDATE %sphysmessage SET "
"messagesize = %llu, rfcsize = %llu "
@@ -1176,6 +1277,8 @@ int db_insert_message_block_physmessage(const char *block,
unsigned maxesclen = (READ_BLOCK_SIZE + 1) * 5 + DEF_QUERYSIZE;
unsigned startlen = 0;
unsigned esclen = 0;
+ char *id = NULL;
+ const char *sid = "messageblk_idnr";
assert(messageblk_idnr != NULL);
*messageblk_idnr = 0;
@@ -1193,11 +1296,17 @@ int db_insert_message_block_physmessage(const char *block,
escaped_query = g_new0(char, maxesclen);
+ if ((*messageblk_idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", *messageblk_idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
startlen = snprintf(escaped_query, maxesclen,
"INSERT INTO %smessageblks "
- "(is_header, messageblk,blocksize, physmessage_id) "
- "VALUES (%u,'",DBPFX, is_header);
-
+ "(messageblk_idnr, is_header, messageblk,blocksize, physmessage_id) "
+ "VALUES (%s, %u,'",DBPFX, id, is_header);
+ g_free(id);
+
/* escape & add data */
esclen = db_escape_binary(&escaped_query[startlen], block, block_size);
snprintf(&escaped_query[esclen + startlen],
@@ -1212,7 +1321,10 @@ int db_insert_message_block_physmessage(const char *block,
/* all done, clean up & exit */
g_free(escaped_query);
- *messageblk_idnr = db_insert_result("messageblk_idnr");
+ /* only for sqlite and mysql: */
+ if (*messageblk_idnr == 0)
+ *messageblk_idnr = db_insert_result(sid);
+
return DM_SUCCESS;
}
@@ -1246,6 +1358,11 @@ int db_log_ip(const char *ip)
{
u64_t id = 0;
gchar *sip = dm_stresc(ip);
+ const char *sid = "pbsp_idnr";
+ char *s = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT idnr FROM %spbsp WHERE ipnumber = '%s'", DBPFX, ip);
g_free(sip);
@@ -1261,6 +1378,8 @@ int db_log_ip(const char *ip)
db_free_result();
+ memset(query,0,DEF_QUERYSIZE);
+
if (id) {
/* this IP is already in the table, update the 'since' field */
snprintf(query, DEF_QUERYSIZE, "UPDATE %spbsp "
@@ -1274,9 +1393,16 @@ int db_log_ip(const char *ip)
}
} else {
/* IP not in table, insert row */
+ if ((id = db_sequence_nextval(sid)))
+ s = g_strdup_printf("%llu", id);
+ else
+ s = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
snprintf(query, DEF_QUERYSIZE,
- "INSERT INTO %spbsp (since, ipnumber) "
- "VALUES (%s, '%s')", DBPFX, db_get_sql(SQL_CURRENT_TIMESTAMP), ip);
+ "INSERT INTO %spbsp (idnr, since, ipnumber) "
+ "VALUES (%s, %s, '%s')", DBPFX, s, db_get_sql(SQL_CURRENT_TIMESTAMP), ip);
+ g_free(s);
+
if (db_query(query) == DM_EQUERY) {
TRACE(TRACE_ERROR, "could not log IP number to database "
"(pop/imap-before-smtp)");
@@ -1292,6 +1418,9 @@ int db_log_ip(const char *ip)
int db_count_iplog(const char *lasttokeep, u64_t *affected_rows)
{
char *escaped_lasttokeep;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(affected_rows != NULL);
*affected_rows = 0;
@@ -1313,6 +1442,9 @@ int db_count_iplog(const char *lasttokeep, u64_t *affected_rows)
int db_cleanup_iplog(const char *lasttokeep, u64_t *affected_rows)
{
assert(affected_rows != NULL);
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
*affected_rows = 0;
snprintf(query, DEF_QUERYSIZE,
@@ -1337,6 +1469,9 @@ int db_empty_mailbox(u64_t user_idnr)
u64_t *mboxids = NULL;
unsigned n, i;
int result = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT mailbox_idnr FROM %smailboxes WHERE owner_idnr=%llu",
@@ -1377,6 +1512,9 @@ int db_icheck_messageblks(struct dm_list *lost_list)
{
u64_t messageblk_idnr;
int i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(lost_list);
/* get all lost message blocks. Instead of doing all kinds of
@@ -1425,6 +1563,9 @@ int db_icheck_messages(struct dm_list *lost_list)
{
u64_t message_idnr;
int i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(lost_list);
@@ -1466,6 +1607,9 @@ int db_icheck_mailboxes(struct dm_list *lost_list)
{
u64_t mailbox_idnr;
int i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(lost_list);
@@ -1508,6 +1652,9 @@ int db_icheck_null_physmessages(struct dm_list *lost_list)
{
u64_t physmessage_id;
unsigned i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(lost_list);
@@ -1550,6 +1697,9 @@ int db_icheck_null_messages(struct dm_list *lost_list)
{
u64_t message_idnr;
int i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(lost_list);
@@ -1589,6 +1739,9 @@ int db_icheck_null_messages(struct dm_list *lost_list)
int db_set_isheader(GList *lost)
{
GList *slices;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if (! lost)
return DM_SUCCESS;
@@ -1616,6 +1769,9 @@ int db_set_isheader(GList *lost)
int db_icheck_isheader(GList **lost)
{
unsigned i, n;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT MIN(messageblk_idnr),MAX(is_header) "
"FROM %smessageblks "
@@ -1641,6 +1797,9 @@ int db_icheck_rfcsize(GList **lost)
{
unsigned i, n;
u64_t *id;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT id FROM %sphysmessage WHERE rfcsize=0",
DBPFX);
@@ -1753,6 +1912,9 @@ int db_icheck_headercache(GList **lost)
{
unsigned i,n;
u64_t *id;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT p.id FROM %sphysmessage p "
"LEFT JOIN %sheadervalue h "
@@ -1814,6 +1976,9 @@ int db_icheck_envelope(GList **lost)
{
unsigned i;
u64_t *id;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT p.id FROM %sphysmessage p "
"LEFT JOIN %senvelope e "
@@ -1843,6 +2008,9 @@ int db_icheck_envelope(GList **lost)
int db_set_message_status(u64_t message_idnr, MessageStatus_t status)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE, "UPDATE %smessages SET status = %d WHERE message_idnr = %llu",
DBPFX, status, message_idnr);
return db_query(query);
@@ -1850,6 +2018,9 @@ int db_set_message_status(u64_t message_idnr, MessageStatus_t status)
int db_delete_messageblk(u64_t messageblk_idnr)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE, "DELETE FROM %smessageblks WHERE messageblk_idnr = %llu",
DBPFX, messageblk_idnr);
return db_query(query);
@@ -1857,24 +2028,13 @@ int db_delete_messageblk(u64_t messageblk_idnr)
int db_delete_physmessage(u64_t physmessage_id)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE, "DELETE FROM %sphysmessage WHERE id = %llu",
DBPFX, physmessage_id);
if (db_query(query) == -1)
return DM_EQUERY;
-
- /* if foreign keys do their work (not with MySQL ISAM tables :( )
- the next query would not be necessary */
- snprintf(query, DEF_QUERYSIZE, "DELETE FROM %smessageblks WHERE physmessage_id = %llu",
- DBPFX, physmessage_id);
- if (db_query(query) == -1) {
- TRACE(TRACE_ERROR, "could not execute query. There "
- "are now messageblocks in the database that have no "
- "physmessage attached to them. run dbmail-util "
- "to fix this.");
-
- return DM_EQUERY;
- }
-
return DM_EGENERAL;
}
@@ -1882,6 +2042,9 @@ int db_delete_message(u64_t message_idnr)
{
u64_t physmessage_id;
int rows;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if (db_get_physmessage_id(message_idnr, &physmessage_id) == DM_EQUERY)
return DM_EQUERY;
@@ -1921,6 +2084,9 @@ int db_delete_message(u64_t message_idnr)
static int mailbox_delete(u64_t mailbox_idnr)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"DELETE FROM %smailboxes WHERE mailbox_idnr = %llu",DBPFX,
mailbox_idnr);
@@ -1935,6 +2101,9 @@ static int mailbox_empty(u64_t mailbox_idnr)
{
unsigned i, n;
u64_t *message_idnrs;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
/* we want to delete all messages from the mailbox. So we
* need to find all messages in the box */
@@ -2066,7 +2235,8 @@ int db_send_message_lines(void *fstream, u64_t message_idnr, long lines, int no_
}
dm_free(raw);
- ci_write((FILE *)fstream, "%s", s->str);
+ if (pos > 0 || lines < 0)
+ ci_write((FILE *)fstream, "%s", s->str);
/* delimiter */
if (no_end_dot == 0)
@@ -2083,6 +2253,9 @@ int db_createsession(u64_t user_idnr, PopSession_t * session_ptr)
unsigned i;
const char *query_result;
u64_t mailbox_idnr;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
dm_list_init(&session_ptr->messagelst);
@@ -2175,6 +2348,9 @@ int db_update_pop(PopSession_t * session_ptr)
{
struct element *tmpelement;
u64_t user_idnr = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
/* get first element in list */
tmpelement = dm_list_getstart(&session_ptr->messagelst);
@@ -2221,6 +2397,9 @@ int db_update_pop(PopSession_t * session_ptr)
int db_count_deleted(u64_t * affected_rows)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(affected_rows != NULL);
*affected_rows = 0;
@@ -2241,6 +2420,9 @@ int db_count_deleted(u64_t * affected_rows)
int db_set_deleted(u64_t * affected_rows)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(affected_rows != NULL);
*affected_rows = 0;
@@ -2258,6 +2440,9 @@ int db_set_deleted(u64_t * affected_rows)
int db_deleted_purge(u64_t * affected_rows)
{
unsigned i;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
u64_t *message_idnrs;
assert(affected_rows != NULL);
@@ -2302,6 +2487,9 @@ int db_deleted_purge(u64_t * affected_rows)
int db_deleted_count(u64_t * affected_rows)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(affected_rows != NULL);
*affected_rows = 0;
@@ -2483,6 +2671,9 @@ static int db_findmailbox_owner(const char *name, u64_t owner_idnr,
u64_t * mailbox_idnr)
{
char *mailbox_like;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(mailbox_idnr != NULL);
*mailbox_idnr = 0;
@@ -2524,6 +2715,9 @@ static int mailboxes_by_regex(u64_t user_idnr, int only_subscribed, const char *
unsigned n_rows;
char *matchname;
char *spattern;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(mailboxes != NULL);
assert(nr_mailboxes != NULL);
@@ -2546,8 +2740,9 @@ static int mailboxes_by_regex(u64_t user_idnr, int only_subscribed, const char *
"LEFT JOIN %sacl acl ON mbx.mailbox_idnr = acl.mailbox_id "
"LEFT JOIN %susers usr ON acl.user_id = usr.user_idnr "
"LEFT JOIN %ssubscription sub ON sub.mailbox_id = mbx.mailbox_idnr "
- "WHERE %s (sub.user_id = %llu "
- "AND ((mbx.owner_idnr = %llu) "
+ "WHERE %s "
+ "(sub.user_id = %llu AND "
+ "((mbx.owner_idnr = %llu) "
"OR (acl.user_id = %llu AND acl.lookup_flag = 1) "
"OR (usr.userid = '%s' AND acl.lookup_flag = 1)))",
DBPFX, DBPFX, DBPFX, DBPFX, matchname,
@@ -2557,15 +2752,12 @@ static int mailboxes_by_regex(u64_t user_idnr, int only_subscribed, const char *
snprintf(query, DEF_QUERYSIZE,
"SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr "
"FROM %smailboxes mbx "
- "LEFT JOIN %sacl acl "
- "ON mbx.mailbox_idnr = acl.mailbox_id "
- "LEFT JOIN %susers usr "
- "ON acl.user_id = usr.user_idnr "
+ "LEFT JOIN %sacl acl ON mbx.mailbox_idnr = acl.mailbox_id "
+ "LEFT JOIN %susers usr ON acl.user_id = usr.user_idnr "
"WHERE %s "
- "((mbx.owner_idnr = %llu) OR "
- "(acl.user_id = %llu AND "
- " acl.lookup_flag = 1) OR "
- "(usr.userid = '%s' AND acl.lookup_flag = 1))",
+ "((mbx.owner_idnr = %llu) "
+ "OR (acl.user_id = %llu AND acl.lookup_flag = 1) "
+ "OR (usr.userid = '%s' AND acl.lookup_flag = 1))",
DBPFX, DBPFX, DBPFX, matchname,
user_idnr, user_idnr, DBMAIL_ACL_ANYONE_USER);
@@ -2653,6 +2845,9 @@ int db_findmailbox_by_regex(u64_t owner_idnr, const char *pattern,
int db_getmailbox_flags(mailbox_t *mb)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
g_return_val_if_fail(mb->uid,DM_EQUERY);
mb->flags = 0;
@@ -2701,6 +2896,9 @@ int db_getmailbox_flags(mailbox_t *mb)
int db_getmailbox_count(mailbox_t *mb)
{
unsigned i, exists = 0, seen = 0, recent = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
g_return_val_if_fail(mb->uid,DM_EQUERY);
@@ -2739,6 +2937,8 @@ int db_getmailbox_count(mailbox_t *mb)
db_free_result();
+ memset(query,0,DEF_QUERYSIZE);
+
if(mb->exists) {
/* get messages */
snprintf(query, DEF_QUERYSIZE, "SELECT message_idnr "
@@ -2770,6 +2970,7 @@ int db_getmailbox_count(mailbox_t *mb)
* NOTE expunged messages are selected as well in order to be
* able to restore them
*/
+ memset(query,0,DEF_QUERYSIZE);
snprintf(query, DEF_QUERYSIZE, "SELECT message_idnr+1 FROM %smessages "
"ORDER BY message_idnr DESC LIMIT 1",DBPFX);
if (db_query(query) == -1) {
@@ -3112,9 +3313,15 @@ int db_createmailbox(const char * name, u64_t owner_idnr, u64_t * mailbox_idnr)
{
const char *simple_name;
char *escaped_simple_name;
+ int result;
+ const char *sid = "mailbox_idnr";
+ char *id = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(mailbox_idnr != NULL);
*mailbox_idnr = 0;
- int result;
+
if (auth_requires_shadow_user()) {
TRACE(TRACE_DEBUG, "creating shadow user for [%llu]",
@@ -3134,12 +3341,19 @@ int db_createmailbox(const char * name, u64_t owner_idnr, u64_t * mailbox_idnr)
escaped_simple_name = dm_stresc(simple_name);
+ if ((*mailbox_idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", *mailbox_idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
snprintf(query, DEF_QUERYSIZE,
- "INSERT INTO %smailboxes (name, owner_idnr,"
+ "INSERT INTO %smailboxes (mailbox_idnr, name, owner_idnr,"
"seen_flag, answered_flag, deleted_flag, flagged_flag, "
"recent_flag, draft_flag, permission)"
- " VALUES ('%s', %llu, 1, 1, 1, 1, 1, 1, %d)",DBPFX,
- escaped_simple_name, owner_idnr, IMAPPERM_READWRITE);
+ " VALUES (%s, '%s', %llu, 1, 1, 1, 1, 1, 1, %d)",DBPFX,
+ id, escaped_simple_name, owner_idnr, IMAPPERM_READWRITE);
+
+ g_free(id);
dm_free(escaped_simple_name);
@@ -3148,7 +3362,9 @@ int db_createmailbox(const char * name, u64_t owner_idnr, u64_t * mailbox_idnr)
return DM_EQUERY;
}
- *mailbox_idnr = db_insert_result("mailbox_idnr");
+ /* for mysql and sqlite */
+ if (*mailbox_idnr == 0)
+ *mailbox_idnr = db_insert_result(sid);
TRACE(TRACE_DEBUG, "created mailbox with idnr [%llu] for user [%llu] result [%d]",
*mailbox_idnr, owner_idnr, result);
@@ -3160,6 +3376,9 @@ int db_createmailbox(const char * name, u64_t owner_idnr, u64_t * mailbox_idnr)
int db_mailbox_set_permission(u64_t mailbox_id, int permission)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(mailbox_id);
snprintf(query,DEF_QUERYSIZE,"UPDATE %smailboxes SET permission=%d WHERE mailbox_idnr=%llu",
@@ -3232,6 +3451,9 @@ int db_listmailboxchildren(u64_t mailbox_idnr, u64_t user_idnr,
int i;
char *mailbox_like = NULL;
const char *tmp;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
/* retrieve the name of this mailbox */
snprintf(query, DEF_QUERYSIZE,
@@ -3257,6 +3479,8 @@ int db_listmailboxchildren(u64_t mailbox_idnr, u64_t user_idnr,
}
db_free_result();
+ memset(query,0,DEF_QUERYSIZE);
+
if (mailbox_like) {
snprintf(query, DEF_QUERYSIZE,
"SELECT mailbox_idnr FROM %smailboxes WHERE %s"
@@ -3304,6 +3528,9 @@ int db_isselectable(u64_t mailbox_idnr)
{
const char *query_result;
long not_selectable;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT no_select FROM %smailboxes WHERE mailbox_idnr = %llu",DBPFX,
@@ -3338,6 +3565,9 @@ int db_noinferiors(u64_t mailbox_idnr)
{
const char *query_result;
long no_inferiors;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT no_inferiors FROM %smailboxes WHERE mailbox_idnr = %llu",DBPFX,
@@ -3367,6 +3597,9 @@ int db_noinferiors(u64_t mailbox_idnr)
int db_setselectable(u64_t mailbox_idnr, int select_value)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"UPDATE %smailboxes SET no_select = %d WHERE mailbox_idnr = %llu",DBPFX,
(!select_value), mailbox_idnr);
@@ -3383,6 +3616,9 @@ int db_setselectable(u64_t mailbox_idnr, int select_value)
int db_get_mailbox_size(u64_t mailbox_idnr, int only_deleted,
u64_t * mailbox_size)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(mailbox_size != NULL);
*mailbox_size = 0;
@@ -3421,6 +3657,9 @@ int db_get_mailbox_size(u64_t mailbox_idnr, int only_deleted,
int db_removemsg(u64_t user_idnr, u64_t mailbox_idnr)
{
u64_t mailbox_size;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if (mailbox_is_writable(mailbox_idnr))
return DM_EQUERY;
@@ -3454,6 +3693,9 @@ int db_removemsg(u64_t user_idnr, u64_t mailbox_idnr)
int db_movemsg(u64_t mailbox_to, u64_t mailbox_from)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"UPDATE %smessages SET mailbox_idnr=%llu WHERE"
" mailbox_idnr = %llu",DBPFX, mailbox_to, mailbox_from);
@@ -3468,6 +3710,9 @@ int db_movemsg(u64_t mailbox_to, u64_t mailbox_from)
static u64_t message_get_size(u64_t message_idnr)
{
u64_t size = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT pm.messagesize FROM %sphysmessage pm, %smessages msg "
@@ -3489,6 +3734,13 @@ int db_copymsg(u64_t msg_idnr, u64_t mailbox_to, u64_t user_idnr,
{
u64_t msgsize;
char unique_id[UID_SIZE];
+ const char *sid = "message_idnr";
+ char *id = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
+ assert(newmsg_idnr != NULL);
+ *newmsg_idnr = 0;
/* Get the size of the message to be copied. */
if (! (msgsize = message_get_size(msg_idnr))) {
@@ -3510,24 +3762,32 @@ int db_copymsg(u64_t msg_idnr, u64_t mailbox_to, u64_t user_idnr,
create_unique_id(unique_id, msg_idnr);
+ if ((*newmsg_idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", *newmsg_idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
/* Copy the message table entry of the message. */
snprintf(query, DEF_QUERYSIZE,
- "INSERT INTO %smessages (mailbox_idnr,"
+ "INSERT INTO %smessages (message_idnr, mailbox_idnr,"
"physmessage_id, seen_flag, answered_flag, deleted_flag, "
"flagged_flag, recent_flag, draft_flag, unique_id, status) "
- "SELECT %llu, "
+ "SELECT %s, %llu, "
"physmessage_id, seen_flag, answered_flag, deleted_flag, "
"flagged_flag, recent_flag, draft_flag, '%s', status "
"FROM %smessages WHERE message_idnr = %llu",DBPFX,
- mailbox_to, unique_id,DBPFX, msg_idnr);
+ id, mailbox_to, unique_id,DBPFX, msg_idnr);
+
+ g_free(id);
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "error copying message");
return DM_EQUERY;
}
- /* get the id of the inserted record */
- *newmsg_idnr = db_insert_result("message_idnr");
+ /* for mysql and sqlite */
+ if (*newmsg_idnr == 0)
+ *newmsg_idnr = db_insert_result(sid);
/* update quotum */
if (user_quotum_inc(user_idnr, msgsize) == -1) {
@@ -3547,6 +3807,9 @@ int db_getmailboxname(u64_t mailbox_idnr, u64_t user_idnr, char *name)
int result;
size_t tmp_fq_name_len;
u64_t owner_idnr;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
result = db_get_mailbox_owner(mailbox_idnr, &owner_idnr);
if (result <= 0) {
@@ -3597,6 +3860,9 @@ int db_getmailboxname(u64_t mailbox_idnr, u64_t user_idnr, char *name)
int db_setmailboxname(u64_t mailbox_idnr, const char *name)
{
char *escaped_name;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_name = dm_stresc(name);
@@ -3620,6 +3886,9 @@ int db_expunge(u64_t mailbox_idnr, u64_t user_idnr,
{
u64_t i;
u64_t mailbox_size;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if (db_get_mailbox_size(mailbox_idnr, 1, &mailbox_size) < 0) {
TRACE(TRACE_ERROR, "error getting mailbox size "
@@ -3662,6 +3931,8 @@ int db_expunge(u64_t mailbox_idnr, u64_t user_idnr,
/* update messages belonging to this mailbox:
* mark as expunged (status MESSAGE_STATUS_DELETE) */
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"UPDATE %smessages SET status=%d "
"WHERE mailbox_idnr = %llu "
@@ -3695,6 +3966,9 @@ int db_expunge(u64_t mailbox_idnr, u64_t user_idnr,
u64_t db_first_unseen(u64_t mailbox_idnr)
{
u64_t id = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT MIN(message_idnr) FROM %smessages "
@@ -3716,6 +3990,9 @@ u64_t db_first_unseen(u64_t mailbox_idnr)
int db_subscribe(u64_t mailbox_idnr, u64_t user_idnr)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT * FROM %ssubscription "
"WHERE mailbox_id = %llu "
@@ -3733,6 +4010,7 @@ int db_subscribe(u64_t mailbox_idnr, u64_t user_idnr)
}
db_free_result();
+ memset(query,0,DEF_QUERYSIZE);
snprintf(query, DEF_QUERYSIZE,
"INSERT INTO %ssubscription (user_id, mailbox_id) "
@@ -3748,6 +4026,9 @@ int db_subscribe(u64_t mailbox_idnr, u64_t user_idnr)
int db_unsubscribe(u64_t mailbox_idnr, u64_t user_idnr)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"DELETE FROM %ssubscription "
"WHERE user_id = %llu AND mailbox_id = %llu",DBPFX,
@@ -3765,6 +4046,9 @@ int db_get_msgflag(const char *flag_name, u64_t msg_idnr,
{
char the_flag_name[DEF_QUERYSIZE / 2]; /* should be sufficient ;) */
int val;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
/* determine flag */
if (strcasecmp(flag_name, "seen") == 0)
@@ -3804,6 +4088,9 @@ int db_get_msgflag(const char *flag_name, u64_t msg_idnr,
int db_get_msgflag_all(u64_t msg_idnr, u64_t mailbox_idnr, int *flags)
{
int i;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
memset(flags, 0, sizeof(int) * IMAP_NFLAGS);
@@ -3843,6 +4130,9 @@ int db_set_msgflag_range(u64_t msg_idnr_low, u64_t msg_idnr_high,
size_t i;
size_t placed = 0;
size_t left;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE, "UPDATE %smessages SET ",DBPFX);
@@ -3905,17 +4195,18 @@ int db_set_msgflag_recent(u64_t msg_idnr, u64_t mailbox_idnr)
int db_set_msgflag_recent_range(u64_t msg_idnr_lo, u64_t msg_idnr_hi, u64_t mailbox_idnr)
{
- GString *query = g_string_new("");
- g_string_printf(query, "UPDATE %smessages SET recent_flag=0 WHERE "
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
+ snprintf(query, DEF_QUERYSIZE, "UPDATE %smessages SET recent_flag=0 WHERE "
" WHERE message_idnr BETWEEN %llu AND %llu AND "
"status < %d AND mailbox_idnr = %llu",
DBPFX, msg_idnr_lo, msg_idnr_hi, MESSAGE_STATUS_DELETE, mailbox_idnr);
- if (db_query(query->str) == -1) {
+ if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "could not update recent_flag");
- g_string_free(query,1);
return DM_EQUERY;
}
- g_string_free(query,1);
+
return DM_SUCCESS;
}
@@ -3923,6 +4214,9 @@ int db_get_msgdate(u64_t mailbox_idnr, u64_t msg_idnr, char *date)
{
const char *query_result;
char *to_char_str;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
to_char_str = date2char_str("pm.internal_date");
snprintf(query, DEF_QUERYSIZE,
@@ -3956,6 +4250,9 @@ int db_get_msgdate(u64_t mailbox_idnr, u64_t msg_idnr, char *date)
int db_set_rfcsize(u64_t rfcsize, u64_t msg_idnr, u64_t mailbox_idnr)
{
u64_t physmessage_id = 0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT physmessage_id FROM %smessages "
@@ -3976,6 +4273,7 @@ int db_set_rfcsize(u64_t rfcsize, u64_t msg_idnr, u64_t mailbox_idnr)
physmessage_id = db_get_result_u64(0, 0);
db_free_result();
+ memset(query,0,DEF_QUERYSIZE);
snprintf(query, DEF_QUERYSIZE,
"UPDATE %sphysmessage SET rfcsize = %llu "
"WHERE id = %llu",DBPFX, rfcsize, physmessage_id);
@@ -3990,6 +4288,9 @@ int db_set_rfcsize(u64_t rfcsize, u64_t msg_idnr, u64_t mailbox_idnr)
int db_get_rfcsize(u64_t msg_idnr, u64_t mailbox_idnr, u64_t * rfc_size)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(rfc_size != NULL);
*rfc_size = 0;
@@ -4021,6 +4322,9 @@ int db_get_rfcsize(u64_t msg_idnr, u64_t mailbox_idnr, u64_t * rfc_size)
int db_mailbox_msg_match(u64_t mailbox_idnr, u64_t msg_idnr)
{
int val;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT message_idnr FROM %smessages "
@@ -4042,6 +4346,9 @@ int db_mailbox_msg_match(u64_t mailbox_idnr, u64_t msg_idnr)
int db_acl_has_right(mailbox_t *mailbox, u64_t userid, const char *right_flag)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
u64_t mboxid = mailbox->uid;
@@ -4086,6 +4393,9 @@ int db_acl_has_right(mailbox_t *mailbox, u64_t userid, const char *right_flag)
static int acl_query(u64_t mailbox_idnr, u64_t userid)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
TRACE(TRACE_DEBUG,"for mailbox [%llu] userid [%llu]",
mailbox_idnr, userid);
@@ -4149,6 +4459,9 @@ int db_acl_get_acl_map(mailbox_t *mailbox, u64_t userid, struct ACLMap *map)
static int db_acl_has_acl(u64_t userid, u64_t mboxid)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT user_id, mailbox_id FROM %sacl "
@@ -4171,6 +4484,9 @@ static int db_acl_has_acl(u64_t userid, u64_t mboxid)
static int db_acl_create_acl(u64_t userid, u64_t mboxid)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"INSERT INTO %sacl (user_id, mailbox_id) "
"VALUES (%llu, %llu)",DBPFX, userid, mboxid);
@@ -4191,6 +4507,9 @@ int db_acl_set_right(u64_t userid, u64_t mboxid, const char *right_flag,
{
int owner_result;
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(set == 0 || set == 1);
@@ -4241,6 +4560,9 @@ int db_acl_set_right(u64_t userid, u64_t mboxid, const char *right_flag,
int db_acl_delete_acl(u64_t userid, u64_t mboxid)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
TRACE(TRACE_DEBUG, "deleting ACL for user [%llu], "
"mailbox [%llu].", userid, mboxid);
@@ -4261,6 +4583,9 @@ int db_acl_get_identifier(u64_t mboxid, struct dm_list *identifier_list)
{
unsigned i, n;
const char *result_string;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(identifier_list != NULL);
@@ -4295,6 +4620,9 @@ int db_acl_get_identifier(u64_t mboxid, struct dm_list *identifier_list)
int db_get_mailbox_owner(u64_t mboxid, u64_t * owner_id)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(owner_id != NULL);
snprintf(query, DEF_QUERYSIZE,
@@ -4307,8 +4635,12 @@ int db_get_mailbox_owner(u64_t mboxid, u64_t * owner_id)
return DM_EQUERY;
}
- *owner_id = db_get_result_u64(0, 0);
+ *owner_id = 0;
+
+ if (db_num_rows()==1)
+ *owner_id = db_get_result_u64(0, 0);
db_free_result();
+
if (*owner_id == 0)
return DM_SUCCESS;
else
@@ -4318,6 +4650,9 @@ int db_get_mailbox_owner(u64_t mboxid, u64_t * owner_id)
int db_user_is_mailbox_owner(u64_t userid, u64_t mboxid)
{
int result;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT mailbox_idnr FROM %smailboxes "
@@ -4425,6 +4760,9 @@ int db_getmailbox_list_result(u64_t mailbox_idnr, u64_t user_idnr, mailbox_t * m
char *mailbox_like;
GString *fqname;
int i=0;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT owner_idnr, name, no_select, no_inferiors "
@@ -4461,6 +4799,8 @@ int db_getmailbox_list_result(u64_t mailbox_idnr, u64_t user_idnr, mailbox_t * m
/* no_children */
mailbox_like = db_imap_utf7_like("name", name, "/%");
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"SELECT COUNT(*) AS nr_children "
"FROM %smailboxes WHERE owner_idnr = %llu "
@@ -4490,6 +4830,9 @@ int db_usermap_resolve(clientinfo_t *ci, const char *username, char *real_userna
unsigned row, bestrow = 0;
int result;
int score, bestscore = -1;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
TRACE(TRACE_DEBUG,"checking userid [%s] in usermap", username);
@@ -4554,6 +4897,9 @@ int db_usermap_resolve(clientinfo_t *ci, const char *username, char *real_userna
}
TRACE(TRACE_DEBUG, "bestscore [%d]", bestscore);
+ if (bestscore == 0)
+ return DM_SUCCESS; // no match at all.
+
if (bestscore < 0)
return DM_EGENERAL;
@@ -4582,6 +4928,9 @@ int db_user_exists(const char *username, u64_t * user_idnr)
{
const char *query_result;
char *escaped_username;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(user_idnr != NULL);
*user_idnr = 0;
@@ -4626,6 +4975,10 @@ int db_user_create(const char *username, const char *password, const char *encty
{
char *escaped_password;
char *escaped_username;
+ const char *sid = "user_idnr";
+ char *id = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
assert(user_idnr != NULL);
@@ -4653,22 +5006,25 @@ int db_user_create(const char *username, const char *password, const char *encty
escaped_password = dm_stresc(password);
escaped_username = dm_stresc(username);
+ memset(query,0,DEF_QUERYSIZE);
if (*user_idnr==0) {
- snprintf(query, DEF_QUERYSIZE, "INSERT INTO %susers "
- "(userid,passwd,client_idnr,maxmail_size,"
- "encryption_type, last_login) VALUES "
- "('%s','%s',%llu,%llu,'%s', %s)",
- DBPFX, escaped_username, escaped_password, clientid,
- maxmail, enctype ? enctype : "", db_get_sql(SQL_CURRENT_TIMESTAMP));
+ if ((*user_idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", *user_idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
} else {
- snprintf(query, DEF_QUERYSIZE, "INSERT INTO %susers "
- "(userid,user_idnr,passwd,client_idnr,maxmail_size,"
- "encryption_type, last_login) VALUES "
- "('%s',%llu,'%s',%llu,%llu,'%s', %s)",
- DBPFX,escaped_username,*user_idnr, escaped_password,clientid,
- maxmail, enctype ? enctype : "", db_get_sql(SQL_CURRENT_TIMESTAMP));
+ id = g_strdup_printf("%llu", *user_idnr);
}
+
+ snprintf(query, DEF_QUERYSIZE, "INSERT INTO %susers "
+ "(user_idnr,userid,passwd,client_idnr,maxmail_size,"
+ "encryption_type, last_login) VALUES "
+ "(%s,'%s','%s',%llu,%llu,'%s', %s)",
+ DBPFX, id, escaped_username, escaped_password, clientid,
+ maxmail, enctype ? enctype : "", db_get_sql(SQL_CURRENT_TIMESTAMP));
+
+ g_free(id);
dm_free(escaped_username);
dm_free(escaped_password);
@@ -4678,12 +5034,15 @@ int db_user_create(const char *username, const char *password, const char *encty
}
if (*user_idnr == 0)
- *user_idnr = db_insert_result("user_idnr");
+ *user_idnr = db_insert_result(sid);
return DM_EGENERAL;
}
int db_change_mailboxsize(u64_t user_idnr, u64_t new_size)
{
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
snprintf(query, DEF_QUERYSIZE,
"UPDATE %susers SET maxmail_size = %llu "
"WHERE user_idnr = %llu",
@@ -4700,6 +5059,9 @@ int db_change_mailboxsize(u64_t user_idnr, u64_t new_size)
int db_user_delete(const char * username)
{
char *escaped_username;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_username = dm_stresc(username);
snprintf(query, DEF_QUERYSIZE, "DELETE FROM %susers WHERE userid = '%s'",
@@ -4718,6 +5080,9 @@ int db_user_delete(const char * username)
int db_user_rename(u64_t user_idnr, const char *new_name)
{
char *escaped_new_name;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_new_name = dm_stresc(new_name);
snprintf(query, DEF_QUERYSIZE, "UPDATE %susers SET userid = '%s' WHERE user_idnr=%llu",
@@ -4777,6 +5142,9 @@ int db_user_find_create(u64_t user_idnr)
int db_replycache_register(const char *to, const char *from, const char *handle)
{
char *escaped_to, *escaped_from, *escaped_handle;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_to = dm_stresc(to);
escaped_from = dm_stresc(from);
@@ -4813,6 +5181,7 @@ int db_replycache_register(const char *to, const char *from, const char *handle)
}
db_free_result();
+ memset(query,0,DEF_QUERYSIZE);
if (db_query(query)== -1) {
TRACE(TRACE_ERROR, "query failed");
@@ -4831,6 +5200,9 @@ int db_replycache_validate(const char *to, const char *from,
GString *tmp = g_string_new("");
g_string_printf(tmp, db_get_sql(SQL_REPLYCACHE_EXPIRE), days);
char *escaped_to, *escaped_from, *escaped_handle;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
escaped_to = dm_stresc(to);
escaped_from = dm_stresc(from);
@@ -4867,6 +5239,8 @@ int db_user_log_login(u64_t user_idnr)
/* log login in the dbase */
int result;
timestring_t timestring;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
create_current_timestring(&timestring);
snprintf(query, DEF_QUERYSIZE,
diff --git a/db.h b/db.h
index 6673c55c..93e35dbf 100644
--- a/db.h
+++ b/db.h
@@ -170,14 +170,30 @@ u64_t db_get_result_u64(unsigned row, unsigned field);
/**
* \brief return the ID generated for an AUTO_INCREMENT column
- * by the previous column.
- * \param sequence_identifier sequence identifier
+ * by the previous query. This entails getting a current value
+ * of a sequence for non-mysql databases.
+ * \param seq_id sequence identifier
* \return
* - 0 if no such id (if for instance no AUTO_INCREMENT
* value was generated).
* - the id otherwise
*/
-u64_t db_insert_result(const char *sequence_identifier);
+u64_t db_insert_result(const char *seq_id);
+
+u64_t db_sequence_currval(const char *seq_id);
+
+/**
+ * \brief return the ID to be generated for an AUTO_INCREMENT column
+ * by the current/next query. This entails popping a next value
+ * of a sequence for non-mysql databases.
+ * \param seq_id sequence identifier
+ * \return
+ * - 0 if no such id (if for instance no AUTO_INCREMENT
+ * value was generated).
+ * - the id otherwise
+ */
+
+u64_t db_sequence_nextval(const char *seq_id);
/**
* \brief escape a string for use in query
diff --git a/dbmail-imapsession.c b/dbmail-imapsession.c
index 6e5f252b..5285783f 100644
--- a/dbmail-imapsession.c
+++ b/dbmail-imapsession.c
@@ -27,10 +27,6 @@
#include "dbmail.h"
-#ifndef MAX_LINESIZE
-#define MAX_LINESIZE (10*1024)
-#endif
-
#define THIS_MODULE "imapsession"
#define BUFLEN 2048
#define SEND_BUF_SIZE 1024
@@ -39,10 +35,6 @@
extern db_param_t _db_params;
#define DBPFX _db_params.pfx
-/* for issuing queries to the backend */
-char query[DEF_QUERYSIZE];
-
-
/* cache */
extern cache_t cached_msg;
@@ -595,11 +587,15 @@ int dbmail_imap_session_fetch_get_unparsed(struct ImapSession *self)
GList *l;
u64_t *uid, *lo, *hi;
u64_t id;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
g_return_val_if_fail(self->fetch_ids,-1);
l = g_tree_keys(self->fetch_ids);
+ g_return_val_if_fail(l,-1);
+
l = g_list_first(l);
lo = (u64_t *)l->data;
@@ -1636,10 +1632,15 @@ int dbmail_imap_session_mailbox_close(struct ImapSession *self)
return 0;
}
-int dbmail_imap_session_mailbox_select_recent(struct ImapSession *self) {
+int dbmail_imap_session_mailbox_select_recent(struct ImapSession *self)
+{
unsigned i, j;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
imap_userdata_t *ud = (imap_userdata_t *) self->ci->userData;
+
self->recent = NULL;
snprintf(query, DEF_QUERYSIZE,
"SELECT message_idnr FROM %smessages WHERE recent_flag = 1 AND mailbox_idnr = %llu",
@@ -1659,8 +1660,12 @@ int dbmail_imap_session_mailbox_select_recent(struct ImapSession *self) {
return g_list_length(self->recent);
}
-int dbmail_imap_session_mailbox_update_recent(struct ImapSession *self) {
+int dbmail_imap_session_mailbox_update_recent(struct ImapSession *self)
+{
GList *slices = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
if (self->recent == NULL)
return 0;
diff --git a/dbmail-mailbox.c b/dbmail-mailbox.c
index 704351be..94d441fe 100644
--- a/dbmail-mailbox.c
+++ b/dbmail-mailbox.c
@@ -1433,6 +1433,10 @@ static gboolean _merge_search(GNode *node, GTree *found)
g_tree_merge(a->found,b->found,IST_SUBSEARCH_OR);
if (a->found && found)
g_tree_merge(found,a->found,IST_SUBSEARCH_AND);
+
+ a->merged = TRUE;
+ b->merged = TRUE;
+
break;
default:
diff --git a/dbmail-message.c b/dbmail-message.c
index 710ffacf..d23fcfe5 100644
--- a/dbmail-message.c
+++ b/dbmail-message.c
@@ -1,5 +1,9 @@
/*
+<<<<<<< master
$Id$
+=======
+ $Id$
+>>>>>>> dbmail_2_2
Copyright (c) 2004-2006 NFG Net Facilities Group BV support@nfg.nl
@@ -32,8 +36,6 @@ extern db_param_t _db_params;
#define DBPFX _db_params.pfx
#define MESSAGE_MAX_LINE_SIZE 1024
-/* for issuing queries to the backend */
-char query[DEF_QUERYSIZE];
static int dm_errno = 0;
@@ -61,33 +63,46 @@ static int _message_insert(struct DbmailMessage *self,
/* general mime utils (missing from gmime?) */
+static unsigned find_end_of_header(const char *h)
+{
+ gchar c, p1 = 0, p2 = 0;
+ unsigned i = 0;
+ size_t l = strlen(h);
+
+ while (h++) {
+ i++;
+ c = *h;
+ if (c == '\n' && ((p1 == '\n') || (p1 == '\r' && p2 == '\n'))) {
+ if (l > i)
+ i++;
+ break;
+ }
+ p2 = p1;
+ p1 = c;
+ }
+ return i;
+}
+
+
gchar * g_mime_object_get_body(const GMimeObject *object)
{
- gchar *s = NULL;
- size_t i;
- GString *t;
-
- s = g_mime_object_get_headers(GMIME_OBJECT(object));
- i = strlen(s);
- g_free(s);
+ gchar *s = NULL, *b = NULL;
+ unsigned i;
+ size_t l;
s = g_mime_object_to_string(GMIME_OBJECT(object));
- t = g_string_new(s);
+ i = find_end_of_header(s);
- if (t->len > i && s[i] == '\n')
- i++;
+ b = s+i;
+ l = strlen(b);
+ memmove(s,b,l);
+ s[l] = '\0';
+ s = g_realloc(s, l+1);
- g_free(s);
-
- t = g_string_erase(t,0,i);
-
- s=t->str;
- g_string_free(t,FALSE);
-
return s;
}
-gchar * get_crlf_encoded_opt(gchar *string, int dots)
+gchar * get_crlf_encoded_opt(const gchar *string, int dots)
{
GMimeStream *ostream, *fstream;
GMimeFilter *filter;
@@ -264,108 +279,6 @@ struct DbmailMessage * dbmail_message_init_with_string(struct DbmailMessage *sel
return self;
}
-
-//
-// construct a new message where only sender, recipient, subject and
-// a body are known. The body can be any kind of charset. Make sure
-// it's not pre-encoded (base64, quopri)
-//
-// TODO: support text/html
-
-struct DbmailMessage * dbmail_message_construct(struct DbmailMessage *self,
- const gchar *to, const gchar *from,
- const gchar *subject, const gchar *body)
-{
- GMimeMessage *message;
- GMimePart *mime_part;
- GMimeDataWrapper *content;
- GMimeStream *stream, *fstream;
- GMimeContentType *mime_type;
- GMimePartEncodingType encoding = GMIME_PART_ENCODING_DEFAULT;
- GMimeFilter *filter = NULL;
-
- // FIXME: this could easily be expanded to allow appending
- // a new sub-part to an existing mime-part. But for now let's
- // require self to be a pristine (empty) DbmailMessage.
- g_return_val_if_fail(self->content==NULL, self);
-
- message = g_mime_message_new(FALSE);
-
- // determine the optimal encoding type for the body: how would gmime
- // encode this string. This will return either base64 or quopri.
- if (g_mime_utils_text_is_8bit((unsigned char *)body, strlen(body)))
- encoding = g_mime_utils_best_encoding((unsigned char *)body, strlen(body));
-
- // set basic headers
- g_mime_message_set_sender(message, from);
- g_mime_message_set_subject(message, subject);
- g_mime_message_add_recipients_from_string(message, GMIME_RECIPIENT_TYPE_TO, to);
-
- // construct mime-part
- mime_part = g_mime_part_new();
-
- // setup a stream-filter
- stream = g_mime_stream_mem_new();
- fstream = g_mime_stream_filter_new_with_stream(stream);
-
- switch(encoding) {
- case GMIME_PART_ENCODING_BASE64:
- filter = g_mime_filter_basic_new_type(GMIME_FILTER_BASIC_BASE64_ENC);
- break;
- case GMIME_PART_ENCODING_QUOTEDPRINTABLE:
- filter = g_mime_filter_basic_new_type(GMIME_FILTER_BASIC_QP_ENC);
- break;
- default:
- break;
- }
-
- if (filter) {
- g_mime_stream_filter_add((GMimeStreamFilter *)fstream, filter);
- g_object_unref(filter);
- }
-
- // fill the stream and thus the mime-part
- g_mime_stream_write_string(fstream,body);
- content = g_mime_data_wrapper_new_with_stream(stream, encoding);
- g_mime_part_set_content_object(mime_part, content);
-
- // add the correct mime-headers
-
- // Content-Type
- mime_type = g_mime_content_type_new("text","plain");
- g_mime_object_set_content_type((GMimeObject *)mime_part, mime_type);
- // We originally tried to use g_mime_charset_best to pick a charset,
- // but it regularly failed to choose utf-8 when utf-8 data was given to it.
- g_mime_object_set_content_type_parameter((GMimeObject *)mime_part, "charset", "utf-8");
-
- // Content-Transfer-Encoding
- switch(encoding) {
- case GMIME_PART_ENCODING_BASE64:
- g_mime_part_set_content_header(mime_part,"Content-Transfer-Encoding", "base64");
- break;
- case GMIME_PART_ENCODING_QUOTEDPRINTABLE:
- g_mime_part_set_content_header(mime_part,"Content-Transfer-Encoding", "quoted-printable");
- break;
- default:
- g_mime_part_set_content_header(mime_part,"Content-Transfer-Encoding", "7bit");
- break;
- }
-
- // attach the mime-part to the mime-message
- g_mime_message_set_mime_part(message, (GMimeObject *)mime_part);
-
- // attach the message to the DbmailMessage struct
- self->content = (GMimeObject *)message;
-
- // cleanup
- g_object_unref(mime_part);
- g_object_unref(content);
- g_object_unref(stream);
- g_object_unref(fstream);
- return self;
-}
-
-
/* \brief initialize a previously created DbmailMessage using a GMimeStream
* \param empty DbmailMessage
* \param stream from which to read
@@ -409,6 +322,7 @@ static void _set_content_from_stream(struct DbmailMessage *self, GMimeStream *st
GMimeParser *parser;
gchar *buf, *from;
size_t t;
+ FILE *tmp;
gboolean firstline=TRUE;
/*
@@ -430,8 +344,12 @@ static void _set_content_from_stream(struct DbmailMessage *self, GMimeStream *st
buf = g_new0(char, MESSAGE_MAX_LINE_SIZE);
+ // stream -> bstream (buffer) -> fstream (filter) -> mstream (in-memory copy)
bstream = g_mime_stream_buffer_new(stream,GMIME_STREAM_BUFFER_BLOCK_READ);
- mstream = g_mime_stream_mem_new();
+// mstream = g_mime_stream_mem_new();
+ tmp = tmpfile();
+ mstream = g_mime_stream_file_new(tmp);
+ assert(mstream);
fstream = g_mime_stream_filter_new_with_stream(mstream);
filter = g_mime_filter_crlf_new(GMIME_FILTER_CRLF_DECODE,GMIME_FILTER_CRLF_MODE_CRLF_DOTS);
g_mime_stream_filter_add((GMimeStreamFilter *) fstream, filter);
@@ -628,24 +546,16 @@ gchar * dbmail_message_body_to_string(const struct DbmailMessage *self)
{
return g_mime_object_get_body(GMIME_OBJECT(self->content));
}
+
gchar * dbmail_message_hdrs_to_string(const struct DbmailMessage *self)
{
- gchar *h,*s;
- GString *m, *b;
-
- s = dbmail_message_to_string(self);
- m = g_string_new(s);
- g_free(s);
-
- s = dbmail_message_body_to_string(self);
- b = g_string_new(s);
- g_free(s);
-
- m = g_string_truncate(m,(m->len - b->len));
- h = m->str;
+ gchar *h;
+ unsigned i = 0;
- g_string_free(b,TRUE);
- g_string_free(m,FALSE);
+ h = dbmail_message_to_string(self);
+ i = find_end_of_header(h);
+ h[i] = '\0';
+ h = g_realloc(h, strlen(h)+1);
return h;
}
@@ -711,6 +621,9 @@ static struct DbmailMessage * _retrieve(struct DbmailMessage *self, char *query_
int row = 0, rows = 0;
GString *m;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
+
assert(dbmail_message_get_physid(self));
@@ -849,21 +762,23 @@ int dbmail_message_store(struct DbmailMessage *self)
}
hdrs = dbmail_message_hdrs_to_string(self);
- body = dbmail_message_body_to_string(self);
-
hdrs_size = (u64_t)dbmail_message_get_hdrs_size(self, FALSE);
- body_size = (u64_t)dbmail_message_get_body_size(self, FALSE);
- rfcsize = (u64_t)dbmail_message_get_rfcsize(self);
-
- if(db_insert_message_block(hdrs, hdrs_size, self->id, &messageblk_idnr,1) < 0)
+ if(db_insert_message_block(hdrs, hdrs_size, self->id, &messageblk_idnr,1) < 0) {
+ g_free(hdrs);
return -1;
-
- TRACE(TRACE_DEBUG, "allocating [%ld] bytes of memory for readblock", READ_BLOCK_SIZE);
-
+ }
+ g_free(hdrs);
+
/* store body in several blocks (if needed */
- if (store_message_in_blocks(body, body_size, self->id) < 0)
+ body = dbmail_message_body_to_string(self);
+ body_size = (u64_t)dbmail_message_get_body_size(self, FALSE);
+ if (store_message_in_blocks(body, body_size, self->id) < 0) {
+ g_free(body);
return -1;
+ }
+ g_free(body);
+ rfcsize = (u64_t)dbmail_message_get_rfcsize(self);
if (db_update_message(self->id, unique_id, (hdrs_size + body_size), rfcsize) < 0)
return -1;
@@ -871,9 +786,6 @@ int dbmail_message_store(struct DbmailMessage *self)
if (dbmail_message_cache_headers(self) < 0)
return -1;
- g_free(hdrs);
- g_free(body);
-
return 1;
}
@@ -882,10 +794,13 @@ int _message_insert(struct DbmailMessage *self,
const char *mailbox,
const char *unique_id)
{
- u64_t mailboxid;
- u64_t physmessage_id;
+ u64_t mailboxid, physmessage_id;
char *internal_date = NULL;
char *physid = NULL;
+ const char *sid = "message_idnr";
+ char *id = NULL;
+ char query[DEF_QUERYSIZE];
+ memset(query,0,DEF_QUERYSIZE);
assert(unique_id);
assert(mailbox);
@@ -912,20 +827,32 @@ int _message_insert(struct DbmailMessage *self,
dbmail_message_set_header(self, "X-DBMail-PhysMessage-ID", physid);
g_free(physid);
+ self->id = 0;
+
+ if ((self->id = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", self->id);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
/* now insert an entry into the messages table */
snprintf(query, DEF_QUERYSIZE, "INSERT INTO "
- "%smessages(mailbox_idnr, physmessage_id, unique_id,"
+ "%smessages(message_idnr, mailbox_idnr, physmessage_id, unique_id,"
"recent_flag, status) "
- "VALUES (%llu, %llu, '%s', 1, %d)",
- DBPFX, mailboxid, physmessage_id, unique_id,
+ "VALUES (%s, %llu, %llu, '%s', 1, %d)",
+ DBPFX, id, mailboxid, physmessage_id, unique_id,
MESSAGE_STATUS_INSERT);
+ g_free(id);
+
if (db_query(query) == -1) {
TRACE(TRACE_ERROR, "query failed");
return -1;
}
- self->id = db_insert_result("message_idnr");
+ /* for mysql and sqlite */
+ if (self->id == 0)
+ self->id = db_insert_result(sid);
+
return 1;
}
@@ -979,14 +906,29 @@ static int _header_get_id(const struct DbmailMessage *self, const char *header,
return -1;
}
if (db_num_rows() < 1) {
+ const char *sid = "headername_idnr";
+ char *id = NULL;
+
db_free_result();
- g_string_printf(q, "INSERT INTO %sheadername (headername) VALUES ('%s')", DBPFX, safe_header);
+ tmp = 0;
+
+ if ((tmp = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", tmp);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+
+ g_string_printf(q, "INSERT INTO %sheadername (id, headername) "
+ "VALUES (%s, '%s')", DBPFX, id, safe_header);
+ g_free(id);
+
if (db_query(q->str) == -1) {
g_string_free(q,TRUE);
g_free(safe_header);
return -1;
}
- tmp = db_insert_result("headername_idnr");
+ if (tmp == 0)
+ tmp = db_insert_result(sid);
+
} else {
tmp = db_get_result_u64(0,0);
db_free_result();
@@ -1000,7 +942,7 @@ static int _header_get_id(const struct DbmailMessage *self, const char *header,
static gboolean _header_cache(const char UNUSED *key, const char *header, gpointer user_data)
{
- u64_t id;
+ u64_t id, headervalue_id;
struct DbmailMessage *self = (struct DbmailMessage *)user_data;
gchar *safe_value;
GString *q;
@@ -1009,6 +951,8 @@ static gboolean _header_cache(const char UNUSED *key, const char *header, gpoint
gchar *value = NULL;
unsigned i;
gboolean isaddr = 0;
+ const char *sid = "headervalue_idnr";
+ char *s = NULL;
dm_errno = 0;
@@ -1050,10 +994,19 @@ static gboolean _header_cache(const char UNUSED *key, const char *header, gpoint
safe_value = dm_stresc((const char *)raw);
}
+ if ((headervalue_id = db_sequence_nextval(sid)))
+ s = g_strdup_printf("%llu", headervalue_id);
+ else
+ s = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
- g_string_printf(q,"INSERT INTO %sheadervalue (headername_id, physmessage_id, headervalue) "
- "VALUES (%llu,%llu,'%s')", DBPFX, id, self->physid, safe_value);
+ g_string_printf(q,"INSERT INTO %sheadervalue (id, headername_id, physmessage_id, headervalue) "
+ "VALUES (%s, %llu,%llu,'%s')", DBPFX, s, id, self->physid, safe_value);
g_free(safe_value);
+<<<<<<< master
+ g_free(s);
+=======
+ safe_value = NULL;
+>>>>>>> dbmail_2_2
if (db_query(q->str)) {
TRACE(TRACE_ERROR,"insert headervalue failed");
@@ -1070,7 +1023,9 @@ static gboolean _header_cache(const char UNUSED *key, const char *header, gpoint
static void insert_address_cache(u64_t physid, const char *field, InternetAddressList *ialist)
{
InternetAddress *ia;
-
+ char *id = NULL, *sid = NULL;
+ u64_t idnr;
+
g_return_if_fail(ialist != NULL);
GString *q = g_string_new("");
@@ -1087,10 +1042,18 @@ static void insert_address_cache(u64_t physid, const char *field, InternetAddres
name = dm_strnesc(rname, CACHE_WIDTH_ADDR);
addr = dm_strnesc(ia->value.addr ? ia->value.addr : "", CACHE_WIDTH_ADDR);
- g_string_printf(q, "INSERT INTO %s%sfield (physmessage_id, %sname, %saddr) "
- "VALUES (%llu,'%s','%s')", DBPFX, field, field, field,
- physid, name, addr);
-
+ sid = g_strdup_printf("%sfield_idnr", field);
+ if ((idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+ g_free(sid);
+
+ g_string_printf(q, "INSERT INTO %s%sfield (id, physmessage_id, %sname, %saddr) "
+ "VALUES (%s, %llu,'%s','%s')", DBPFX, field, field, field,
+ id, physid, name, addr);
+
+ g_free(id);
g_free(name);
g_free(addr);
@@ -1107,6 +1070,8 @@ static void insert_field_cache(u64_t physid, const char *field, const char *valu
{
GString *q;
gchar *clean_value;
+ char *id = NULL, *sid = NULL;
+ u64_t idnr;
g_return_if_fail(value != NULL);
@@ -1115,9 +1080,15 @@ static void insert_field_cache(u64_t physid, const char *field, const char *valu
q = g_string_new("");
- g_string_printf(q, "INSERT INTO %s%sfield (physmessage_id, %sfield) "
- "VALUES (%llu,'%s')", DBPFX, field, field, physid, clean_value);
+ sid = g_strdup_printf("%sfield_idnr", field);
+ if ((idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+ g_string_printf(q, "INSERT INTO %s%sfield (id, physmessage_id, %sfield) "
+ "VALUES (%s, %llu,'%s')", DBPFX, field, field, id, physid, clean_value);
+ g_free(id);
g_free(clean_value);
if (db_query(q->str)) {
@@ -1256,14 +1227,22 @@ void dbmail_message_cache_referencesfield(const struct DbmailMessage *self)
void dbmail_message_cache_envelope(const struct DbmailMessage *self)
{
- char *q, *envelope, *clean;
+ char *q, *envelope, *clean, *id = NULL;
+ const char *sid = "envelope_idnr";
+ u64_t idnr;
+
envelope = imap_get_envelope(GMIME_MESSAGE(self->content));
clean = dm_stresc(envelope);
- q = g_strdup_printf("INSERT INTO %senvelope (physmessage_id, envelope) "
- "VALUES (%llu,'%s')", DBPFX, self->physid, clean);
+ if ((idnr = db_sequence_nextval(sid)))
+ id = g_strdup_printf("%llu", idnr);
+ else
+ id = g_strdup_printf("%s", db_get_sql(SQL_SEQ_NEXTVAL));
+ q = g_strdup_printf("INSERT INTO %senvelope (id, physmessage_id, envelope) "
+ "VALUES (%s, %llu,'%s')", DBPFX, id, self->physid, clean);
+ g_free(id);
g_free(clean);
g_free(envelope);
@@ -1274,6 +1253,107 @@ void dbmail_message_cache_envelope(const struct DbmailMessage *self)
}
+//
+// construct a new message where only sender, recipient, subject and
+// a body are known. The body can be any kind of charset. Make sure
+// it's not pre-encoded (base64, quopri)
+//
+// TODO: support text/html
+
+struct DbmailMessage * dbmail_message_construct(struct DbmailMessage *self,
+ const gchar *to, const gchar *from,
+ const gchar *subject, const gchar *body)
+{
+ GMimeMessage *message;
+ GMimePart *mime_part;
+ GMimeDataWrapper *content;
+ GMimeStream *stream, *fstream;
+ GMimeContentType *mime_type;
+ GMimePartEncodingType encoding = GMIME_PART_ENCODING_DEFAULT;
+ GMimeFilter *filter = NULL;
+
+ // FIXME: this could easily be expanded to allow appending
+ // a new sub-part to an existing mime-part. But for now let's
+ // require self to be a pristine (empty) DbmailMessage.
+ g_return_val_if_fail(self->content==NULL, self);
+
+ message = g_mime_message_new(FALSE);
+
+ // determine the optimal encoding type for the body: how would gmime
+ // encode this string. This will return either base64 or quopri.
+ if (g_mime_utils_text_is_8bit((unsigned char *)body, strlen(body)))
+ encoding = g_mime_utils_best_encoding((unsigned char *)body, strlen(body));
+
+ // set basic headers
+ g_mime_message_set_sender(message, from);
+ g_mime_message_set_subject(message, subject);
+ g_mime_message_add_recipients_from_string(message, GMIME_RECIPIENT_TYPE_TO, to);
+
+ // construct mime-part
+ mime_part = g_mime_part_new();
+
+ // setup a stream-filter
+ stream = g_mime_stream_mem_new();
+ fstream = g_mime_stream_filter_new_with_stream(stream);
+
+ switch(encoding) {
+ case GMIME_PART_ENCODING_BASE64:
+ filter = g_mime_filter_basic_new_type(GMIME_FILTER_BASIC_BASE64_ENC);
+ break;
+ case GMIME_PART_ENCODING_QUOTEDPRINTABLE:
+ filter = g_mime_filter_basic_new_type(GMIME_FILTER_BASIC_QP_ENC);
+ break;
+ default:
+ break;
+ }
+
+ if (filter) {
+ g_mime_stream_filter_add((GMimeStreamFilter *)fstream, filter);
+ g_object_unref(filter);
+ }
+
+ // fill the stream and thus the mime-part
+ g_mime_stream_write_string(fstream,body);
+ content = g_mime_data_wrapper_new_with_stream(stream, encoding);
+ g_mime_part_set_content_object(mime_part, content);
+
+ // add the correct mime-headers
+
+ // Content-Type
+ mime_type = g_mime_content_type_new("text","plain");
+ g_mime_object_set_content_type((GMimeObject *)mime_part, mime_type);
+ // We originally tried to use g_mime_charset_best to pick a charset,
+ // but it regularly failed to choose utf-8 when utf-8 data was given to it.
+ g_mime_object_set_content_type_parameter((GMimeObject *)mime_part, "charset", "utf-8");
+
+ // Content-Transfer-Encoding
+ switch(encoding) {
+ case GMIME_PART_ENCODING_BASE64:
+ g_mime_part_set_content_header(mime_part,"Content-Transfer-Encoding", "base64");
+ break;
+ case GMIME_PART_ENCODING_QUOTEDPRINTABLE:
+ g_mime_part_set_content_header(mime_part,"Content-Transfer-Encoding", "quoted-printable");
+ break;
+ default:
+ g_mime_part_set_content_header(mime_part,"Content-Transfer-Encoding", "7bit");
+ break;
+ }
+
+ // attach the mime-part to the mime-message
+ g_mime_message_set_mime_part(message, (GMimeObject *)mime_part);
+
+ // attach the message to the DbmailMessage struct
+ self->content = (GMimeObject *)message;
+
+ // cleanup
+ g_object_unref(mime_part);
+ g_object_unref(content);
+ g_object_unref(stream);
+ g_object_unref(fstream);
+ return self;
+}
+
+
/* old stuff moved here from dbmsgbuf.c */
struct DbmailMessage * db_init_fetch(u64_t msg_idnr, int filter)
diff --git a/dbmail-message.h b/dbmail-message.h
index 9d19b857..14e8095d 100644
--- a/dbmail-message.h
+++ b/dbmail-message.h
@@ -126,7 +126,7 @@ GList * dbmail_message_get_header_addresses(struct DbmailMessage *message, const
#define get_crlf_encoded(string) get_crlf_encoded_opt(string, 0)
#define get_crlf_encoded_dots(string) get_crlf_encoded_opt(string, 1)
-gchar * get_crlf_encoded_opt(gchar *string, int dots);
+gchar * get_crlf_encoded_opt(const gchar *string, int dots);
/*
* manipulate the actual message content
diff --git a/dbmail.h.in b/dbmail.h.in
index 310a0317..389032e0 100644
--- a/dbmail.h.in
+++ b/dbmail.h.in
@@ -185,8 +185,8 @@
#define AUTO_NOTIFY_SENDER "autonotify@dbmail"
#define AUTO_NOTIFY_SUBJECT "NEW MAIL NOTIFICATION"
-/* Must be at least 998 or 1000 by RFC's */
-#define MAX_LINE_SIZE 1024
+/* input reading linelimit */
+#define MAX_LINESIZE (65*1024)
/** default table prefix */
#define DEFAULT_DBPFX "dbmail_"
diff --git a/dbmail.schema b/dbmail.schema
index 28d1c94e..58ce578c 100644
--- a/dbmail.schema
+++ b/dbmail.schema
@@ -16,52 +16,69 @@
# Attribute Type Definitions
attributetype ( 1.3.6.1.4.1.12340.6.2.1.1 NAME 'mailQuota'
- DESC 'The amount of space the user can use until all further messages get bounced.'
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.44
- SINGLE-VALUE )
+ DESC 'The amount of space the user can use until all further messages get bounced.'
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.44
+ SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.12340.6.2.1.2 NAME 'mailForwardingAddress'
- DESC 'Address(es) to forward all incoming messages to.'
- EQUALITY caseIgnoreIA5Match
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+ DESC 'Address(es) to forward all incoming messages to.'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
attributetype ( 1.3.6.1.4.1.12340.6.2.1.3 NAME 'mailHost'
- DESC 'Name or address of the MTA host to use for recipient'
- EQUALITY caseIgnoreIA5Match
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
-
-attributetype ( 1.3.6.1.4.1.12340.6.2.1.4 NAME 'dbmailUID'
- DESC 'UID of the user on the mailsystem'
- EQUALITY caseIgnoreMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
-
-attributetype ( 1.3.6.1.4.1.12340.6.2.1.5 NAME 'dbmailGID'
- DESC 'GID of the user on the mailsystem'
- EQUALITY caseIgnoreMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
-
-attributetype ( 1.3.6.1.4.1.12340.6.2.1.6 NAME 'mailAlternateAddress'
- DESC 'Secondary (alias) mailaddresses for the same user'
- EQUALITY caseIgnoreIA5Match
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
-
-attributetype ( 1.3.6.1.4.1.12340.6.2.1.7 NAME 'deliveryMode'
- DESC 'multi field entries of: normal, forwardonly'
- EQUALITY caseIgnoreMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
-
-attributetype ( 1.3.6.1.4.1.12340.6.2.1.8 NAME 'accountStatus'
- DESC 'The status of a user account: active, disabled'
- EQUALITY caseIgnoreMatch
- SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
+ DESC 'Name or address of the MTA host to use for recipient'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.4 name 'mailDomain'
+ desc 'name of a email domain'
+ equality caseignoreia5match
+ syntax 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.5 name 'mailCluster'
+ desc 'name of address of the Dbmail cluster'
+ equality caseignoreia5match
+ syntax 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.6 NAME 'dbmailUID'
+ DESC 'UID of the user on the mailsystem'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.7 NAME 'dbmailGID'
+ DESC 'GID of the user on the mailsystem'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.8 NAME 'mailAlternateAddress'
+ DESC 'Secondary (alias) mailaddresses for the same user'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.9 NAME 'deliveryMode'
+ DESC 'multi field entries of: normal, forwardonly'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
+
+attributetype ( 1.3.6.1.4.1.12340.6.2.1.10 NAME 'accountStatus'
+ DESC 'The status of a user account: active, disabled'
+ EQUALITY caseIgnoreMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
# Object Class Definitions
objectclass ( 1.3.6.1.4.1.12340.6.2.2.1 NAME 'dbmailUser'
- DESC 'DBMail-LDAP User' SUP top AUXILIARY
- MUST ( uid $ mail )
- MAY ( userPassword $ uidNumber $ gidNumber $ mailQuota $ mailForwardingAddress $ mailHost $ mailAlternateAddress $ dbmailUID $ dbmailGID $ deliveryMode $ accountStatus ) )
+ DESC 'DBMail-LDAP User' SUP top AUXILIARY
+ MUST ( uid $ mail )
+ MAY ( userPassword $ uidNumber $ gidNumber $ mailQuota $ mailForwardingAddress $ mailHost $
+ mailAlternateAddress $ dbmailUID $ dbmailGID $ deliveryMode $ accountStatus ) )
objectclass ( 1.3.6.1.4.1.12340.6.2.2.2 NAME 'dbmailForwardingAddress'
- DESC 'DBMail-LDAP Forwarding Address' SUP top AUXILIARY
- MUST ( mail $ mailForwardingAddress ) )
+ DESC 'DBMail-LDAP Forwarding Address' SUP top AUXILIARY
+ MUST ( mail $ mailForwardingAddress ) )
+
+objectclass ( 1.3.6.1.4.1.12340.6.2.2.3 NAME 'dbmailDomain'
+ DESC 'DBMail-LDAP Virtual Domain' SUP top STRUCTURAL
+ MUST ( mailDomain )
+ MAY ( userPassword $ mailQuota $ mailForwardingAddress $ mailHost $ mailCluster ) )
+
diff --git a/dbmailtypes.h b/dbmailtypes.h
index 66ae0d98..c0f1c5d9 100644
--- a/dbmailtypes.h
+++ b/dbmailtypes.h
@@ -460,11 +460,11 @@ typedef enum {
SQL_CURRENT_TIMESTAMP,
SQL_REPLYCACHE_EXPIRE,
SQL_BINARY,
- SQL_REGEXP,
SQL_SENSITIVE_LIKE,
SQL_INSENSITIVE_LIKE,
- SQL_ENCODE_ESCAPE
-
+ SQL_ENCODE_ESCAPE,
+ SQL_SEQ_CURRVAL,
+ SQL_SEQ_NEXTVAL
} sql_fragment_t;
typedef enum {
diff --git a/dbmodule.c b/dbmodule.c
index 78a3a99c..64d8e7a1 100644
--- a/dbmodule.c
+++ b/dbmodule.c
@@ -48,8 +48,11 @@ int db_load_driver(void)
driver = "mysql";
else if (strcasecmp(_db_params.driver, "SQLITE") == 0)
driver = "sqlite";
+ else if (strcasecmp(_db_params.driver, "INGRES") == 0)
+ driver = "mod_ingres";
+
else
- TRACE(TRACE_FATAL, "unsupported driver: %s, please choose from MySQL, PGSQL, SQLite",
+ TRACE(TRACE_FATAL, "unsupported driver: %s, please choose from MySQL, PGSQL, SQLite, Ingres",
_db_params.driver);
/* Try local build area, then dbmail lib paths, then system lib path. */
@@ -83,7 +86,9 @@ int db_load_driver(void)
|| !g_module_symbol(module, "db_disconnect", (gpointer)&db->disconnect )
|| !g_module_symbol(module, "db_check_connection", (gpointer)&db->check_connection )
|| !g_module_symbol(module, "db_query", (gpointer)&db->query )
- || !g_module_symbol(module, "db_insert_result", (gpointer)&db->insert_result )
+ || !g_module_symbol(module, "db_insert_result", (gpointer)&db->insert_result ) // deprecated: mysql-only
+ || !g_module_symbol(module, "db_sequence_nextval", (gpointer)&db->sequence_nextval )
+ || !g_module_symbol(module, "db_sequence_currval", (gpointer)&db->sequence_currval )
|| !g_module_symbol(module, "db_num_rows", (gpointer)&db->num_rows )
|| !g_module_symbol(module, "db_num_fields", (gpointer)&db->num_fields )
|| !g_module_symbol(module, "db_get_result", (gpointer)&db->get_result )
@@ -125,6 +130,10 @@ int db_query(const char *the_query)
{ return db->query(the_query); }
u64_t db_insert_result(const char *sequence_identifier)
{ return db->insert_result(sequence_identifier); }
+u64_t db_sequence_nextval(const char *sequence_identifier)
+ { return db->sequence_nextval(sequence_identifier); }
+u64_t db_sequence_currval(const char *sequence_identifier)
+ { return db->sequence_currval(sequence_identifier); }
unsigned db_num_rows(void)
{ return db->num_rows(); }
unsigned db_num_fields(void)
diff --git a/dbmodule.h b/dbmodule.h
index e3f8aa12..d37375b9 100644
--- a/dbmodule.h
+++ b/dbmodule.h
@@ -17,6 +17,8 @@ typedef struct {
int (* check_connection)(void);
int (* query)(const char *the_query);
u64_t (* insert_result)(const char *sequence_identifier);
+ u64_t (* sequence_nextval)(const char *sequence_identifier);
+ u64_t (* sequence_currval)(const char *sequence_identifier);
unsigned (* num_rows)(void);
unsigned (* num_fields)(void);
const char * (* get_result)(unsigned row, unsigned field);
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 00000000..7ed6ff82
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
index 905e5e4f..2d705642 100644
--- a/debian/control
+++ b/debian/control
@@ -2,12 +2,12 @@ Source: dbmail
Section: mail
Priority: optional
Maintainer: Paul J Stevens <paul@nfg.nl>
-Build-Depends: automake1.9, debhelper (>= 5.0.7), dpatch, libsieve2-dev (>= 2.1.12), libglib2.0-dev, libgmime-2.0-2-dev | libgmime2.1-dev, libldap2-dev, libsqlite3-dev, postgresql-dev, libmysqlclient15-dev | libmysqlclient14-dev, pkg-config, libtool, asciidoc, xmlto, chrpath
+Build-Depends: automake1.9, debhelper (>= 5.0.7), dpatch, libsieve2-dev (>= 2.1.12), libglib2.0-dev, libgmime-2.0-2-dev | libgmime2.1-dev, libldap2-dev, libsqlite3-dev, libpq-dev, libmysqlclient15-dev | libmysqlclient14-dev, pkg-config, libtool, asciidoc, xmlto, chrpath
Standards-Version: 3.7.2
Package: dbmail
Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, libglib2.0-0, libgmime-2.0-2 | libgmime2.1 (>= 2.1.19), debconf (>=1.4.70) | debconf-2.0, ucf (>= 0.30), adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}, libglib2.0-0, libgmime-2.0-2 | libgmime2.1 (>= 2.1.19), ucf (>= 0.30), adduser
Provides: imap-server, pop3-server
Suggests: dbmail-sqlite | dbmail-pgsql | dbmail-mysql, dbmail-ldap, dbmail-sieve
Description: base package for the dbmail email solution
@@ -23,7 +23,7 @@ Description: base package for the dbmail email solution
Package: dbmail-pgsql
Architecture: any
-Depends: dbmail (= ${Source-Version}), debconf (>=1.4.70) | debconf-2.0, libpq4
+Depends: ${misc:Depends}, ${shlibs:Depends}, dbmail (= ${Source-Version})
Description: Postgresql module for Dbmail
This package provides a module for adding Postgresql database
support to DBMAIL.
@@ -33,7 +33,7 @@ Description: Postgresql module for Dbmail
Package: dbmail-mysql
Architecture: any
-Depends: dbmail (= ${Source-Version}), debconf (>=1.4.70) | debconf-2.0, libmysqlclient15off
+Depends: ${misc:Depends}, ${shlibs:Depends}, dbmail (= ${Source-Version})
Description: MySQL module for Dbmail
This package provides a module for adding MySQL database
support to DBMAIL.
@@ -43,7 +43,7 @@ Description: MySQL module for Dbmail
Package: dbmail-sqlite
Architecture: any
-Depends: dbmail (= ${Source-Version}), debconf (>=1.4.70) | debconf-2.0, libsqlite3-0
+Depends: ${misc:Depends}, ${shlibs:Depends}, dbmail (= ${Source-Version})
Suggests: sqlite3
Description: Sqlite module for Dbmail
This package provides a module for adding Sqlite database
@@ -54,7 +54,7 @@ Description: Sqlite module for Dbmail
Package: dbmail-ldap
Architecture: any
-Depends: dbmail (= ${Source-Version}), debconf (>=1.4.70) | debconf-2.0, libldap2 (>= 2.1.17-1)
+Depends: ${misc:Depends}, ${shlibs:Depends}, dbmail (= ${Source-Version})
Description: LDAP module for Dbmail
This package provides a module for adding LDAP support to
DBMAIL.
@@ -64,7 +64,7 @@ Description: LDAP module for Dbmail
Package: dbmail-sieve
Architecture: any
-Depends: dbmail (= ${Source-Version}), debconf (>=1.4.70) | debconf-2.0, libsieve2-1 (>= 2.1.12)
+Depends: ${misc:Depends}, ${shlibs:Depends}, dbmail (= ${Source-Version})
Description: Sieve module for Dbmail
This package provides a module for adding Sieve support to
DBMAIL. It contains both the sieve sort driver as well as a
diff --git a/debian/dbmail-ldap.postinst b/debian/dbmail-ldap.postinst
index 936d2ebb..58c9303f 100755
--- a/debian/dbmail-ldap.postinst
+++ b/debian/dbmail-ldap.postinst
@@ -4,7 +4,7 @@ CONFIG=/etc/dbmail/dbmail.conf
CONFIG_EX=/usr/share/doc/dbmail/examples/dbmail.conf
DEBIAN_CONFIG=/etc/default/dbmail
-DEBIAN_CONFIG_EX=/usr/share/doc/dbmail/examples/default.dbmail
+DEBIAN_CONFIG_EX=/usr/share/dbmail/default.dbmail
test $DEBIAN_SCRIPT_DEBUG && set -v -x
diff --git a/debian/dbmail-mysql.postinst b/debian/dbmail-mysql.postinst
index 9207cc97..f5dcbea6 100755
--- a/debian/dbmail-mysql.postinst
+++ b/debian/dbmail-mysql.postinst
@@ -4,7 +4,7 @@ CONFIG=/etc/dbmail/dbmail.conf
CONFIG_EX=/usr/share/doc/dbmail/examples/dbmail.conf
DEBIAN_CONFIG=/etc/default/dbmail
-DEBIAN_CONFIG_EX=/usr/share/doc/dbmail/examples/default.dbmail
+DEBIAN_CONFIG_EX=/usr/share/dbmail/default.dbmail
test $DEBIAN_SCRIPT_DEBUG && set -v -x
@@ -36,15 +36,20 @@ case "$1" in
. /usr/share/debconf/confmodule
db_get dbmail/do_debconf || true; DO_DEBCONF=$RET
- # protect the config-file
- oldmask=`umask`
- umask 026
+ if [ "$DO_DEBCONF" = "true" ]; then
+ db_get dbmail/mysql_installed || true; MYSQL_INSTALLED=$RET
+ if [ -e $CONFIG -a "$MYSQL_INSTALLED" = "true" ]; then
+
+ oldmask=`umask`
+ umask 026
+
+ sed -i -re "s/^driver\W*=.*\$/driver = mysql/i" $CONFIG
+
+ umask $oldmask
+ fi
+
+ fi
- # edit the configs
- # if driver is empty set it to mysql
- [ -e $CONFIG ] && sed -i -re "s/^driver\W*=\W*\$/driver = mysql/i" $CONFIG
- umask $oldmask
-
db_stop
;;
diff --git a/debian/dbmail-pgsql.postinst b/debian/dbmail-pgsql.postinst
index f12196ca..c34f6813 100644
--- a/debian/dbmail-pgsql.postinst
+++ b/debian/dbmail-pgsql.postinst
@@ -4,7 +4,7 @@ CONFIG=/etc/dbmail/dbmail.conf
CONFIG_EX=/usr/share/doc/dbmail/examples/dbmail.conf
DEBIAN_CONFIG=/etc/default/dbmail
-DEBIAN_CONFIG_EX=/usr/share/doc/dbmail/examples/default.dbmail
+DEBIAN_CONFIG_EX=/usr/share/dbmail/default.dbmail
test $DEBIAN_SCRIPT_DEBUG && set -v -x
@@ -36,16 +36,19 @@ case "$1" in
. /usr/share/debconf/confmodule
db_get dbmail/do_debconf || true; DO_DEBCONF=$RET
- # protect the config-file
- oldmask=`umask`
- umask 026
+ if [ "$DO_DEBCONF" = "true" ]; then
+ db_get dbmail/pgsql_installed || true; PGSQL_INSTALLED=$RET
+ if [ -e $CONFIG -a "$PGSQL_INSTALLED" = "true" ]; then
- # edit the configs
- # if driver is empty set it to pgsql
- [ -e $CONFIG ] && sed -i -re "s/^driver\W*=\W*\$/driver = pgsql/i" $CONFIG
-
- umask $oldmask
-
+ oldmask=`umask`
+ umask 026
+
+ sed -i -re "s/^driver\W*=.*\$/driver = pgsql/i" $CONFIG
+
+ umask $oldmask
+ fi
+
+ fi
db_stop
;;
diff --git a/debian/dbmail-sieve.config b/debian/dbmail-sieve.config
deleted file mode 100755
index 3008c60e..00000000
--- a/debian/dbmail-sieve.config
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh -e
-
-export DEBCONF_DEBUG=developer
-CONFIGFILE=/etc/dbmail/dbmail.conf
-DEBIANCONF=/etc/default/dbmail
-MAILNAMEFILE=/etc/mailname
-
-. /usr/share/debconf/confmodule
-
-read_config() {
- for line in `grep -E '^[^# $]' $CONFIGFILE|sed 's/[\t ]//g'|awk -F'#' '{print $1}'`; do
- NEWSECTION=`echo $line|grep '^\['|sed 's/\(\[\)\(.*\)\(\]\)/\2/'`
- if [ -n "$NEWSECTION" ]; then
- SECTION=`echo $NEWSECTION|tr '[A-Z]' '[a-z]'`
- else
- key=`echo $line|cut -f1 -d'='|tr '[A-Z]' '[a-z]'`
- val=`echo $line|cut -f2- -d'='`
- if [ -n "$val" ]; then
- eval "db_set dbmail/$SECTION/$key \"$val\"" || true
- fi
- fi
- done
-}
-
-init_config() {
- if [ -e $CONFIGFILE ]; then
- read_config
- fi
- if [ -e $DEBIANCONF ]; then
- . $DEBIANCONF
- # setup some defaults
- db_set dbmail/sieve/start_timsieved "false"
- # overwrite them with the values in the config file
- [ -n "$START_SIEVE" ] && db_set dbmail/sieve/start_timsieved "$START_SIEVE" || true
- fi
-}
-
-db_capb backup
-
-STATE=1
-LASTSTATE=3
-while [ 1 ]; do
-
- [ "$STATE" = "0" ] && break
- [ "$STATE" = "$LASTSTATE" ] && break
-
- case "$STATE" in
- 1)
- db_get dbmail/do_debconf
- if [ "$RET" = "false" ]; then
- break
- fi
- init_config
-
- db_input medium dbmail/delivery/sieve || true
- ;;
-
- 2)
- db_get dbmail/delivery/sieve
- if [ "$RET" = "false" ]; then
- break
- fi
- db_input medium dbmail/sieve/start_timsieved || true
- db_input medium dbmail/delivery/subaddress || true
- db_input medium dbmail/delivery/sieve_vacation || true
- db_input medium dbmail/delivery/sieve_notify || true
- ;;
- esac
- if db_go; then
- STATE=$(($STATE+1))
- else
- STATE=$(($STATE-1))
- fi
-done
-
-exit 0
-
diff --git a/debian/dbmail-sieve.postinst b/debian/dbmail-sieve.postinst
index b6755b3d..0162d6ec 100644
--- a/debian/dbmail-sieve.postinst
+++ b/debian/dbmail-sieve.postinst
@@ -4,7 +4,7 @@ CONFIG=/etc/dbmail/dbmail.conf
CONFIG_EX=/usr/share/doc/dbmail/examples/dbmail.conf
DEBIAN_CONFIG=/etc/default/dbmail
-DEBIAN_CONFIG_EX=/usr/share/doc/dbmail/examples/default.dbmail
+DEBIAN_CONFIG_EX=/usr/share/dbmail/default.dbmail
test $DEBIAN_SCRIPT_DEBUG && set -v -x
diff --git a/debian/dbmail-sieve.templates b/debian/dbmail-sieve.templates
deleted file mode 100644
index d35654e3..00000000
--- a/debian/dbmail-sieve.templates
+++ /dev/null
@@ -1,23 +0,0 @@
-Template: dbmail/delivery/sieve
-Type: boolean
-_Description: Run sieve scripts during message delivery?
-
-Template: dbmail/sieve/start_timsieved
-Type: boolean
-_Description: start the timesieved after reboot?
- Dbmail supports management of Sieve scripts through the timsieve protocol.
- You can run dbmail-timsieved which allows management of the sieve scripts from
- within clients that support this protocol such as kmail, squirrelmail, and others
-
-Template: dbmail/delivery/subaddress
-Type: boolean
-_Description: Do you wish to activate the sieve subaddress extension?
-
-Template: dbmail/delivery/sieve_vacation
-Type: boolean
-_Description: Do you wish to activate the sieve vacation extension?
-
-Template: dbmail/delivery/sieve_notify
-Type: boolean
-_Description: Do you wish to activate the sieve notify extension?
-
diff --git a/debian/dbmail-sqlite.postinst b/debian/dbmail-sqlite.postinst
index 44eeb497..c6494af4 100644
--- a/debian/dbmail-sqlite.postinst
+++ b/debian/dbmail-sqlite.postinst
@@ -4,7 +4,7 @@ CONFIG=/etc/dbmail/dbmail.conf
CONFIG_EX=/usr/share/doc/dbmail/examples/dbmail.conf
DEBIAN_CONFIG=/etc/default/dbmail
-DEBIAN_CONFIG_EX=/usr/share/doc/dbmail/examples/default.dbmail
+DEBIAN_CONFIG_EX=/usr/share/dbmail/default.dbmail
test $DEBIAN_SCRIPT_DEBUG && set -v -x
@@ -36,16 +36,21 @@ case "$1" in
. /usr/share/debconf/confmodule
db_get dbmail/do_debconf || true; DO_DEBCONF=$RET
- # protect the config-file
- oldmask=`umask`
- umask 026
+ if [ "$DO_DEBCONF" = "true" ]; then
+ db_get dbmail/sqlite_installed || true; SQLITE_INSTALLED=$RET
+ if [ -e $CONFIG -a "$SQLITE_INSTALLED" = "true" ]; then
+
+ oldmask=`umask`
+ umask 026
+
+ sed -i -re "s/^driver\W*=.*\$/driver = sqlite/i" $CONFIG
+
+ umask $oldmask
+ fi
+
+ fi
+
- # edit the configs
- # if driver is empty set it to sqlite
- [ -e $CONFIG ] && sed -i -re "s/^driver\W*=\W*\$/driver = sqlite/i" $CONFIG
-
- umask $oldmask
-
db_stop
;;
diff --git a/debian/dbmail.dirs b/debian/dbmail.dirs
index 68457717..125f6ce1 100644
--- a/debian/dbmail.dirs
+++ b/debian/dbmail.dirs
@@ -1 +1,2 @@
usr/lib
+usr/share/dbmail
diff --git a/debian/dbmail.examples b/debian/dbmail.examples
index 919c1ab1..37fade3b 100644
--- a/debian/dbmail.examples
+++ b/debian/dbmail.examples
@@ -1,2 +1 @@
dbmail.conf
-debian/default.dbmail
diff --git a/debian/dbmail.init b/debian/dbmail.init
index ee5ff474..770d9cde 100644
--- a/debian/dbmail.init
+++ b/debian/dbmail.init
@@ -7,10 +7,8 @@
#
### BEGIN INIT INFO
# Provides: dbmail
-# Required-Start: $syslog $network
-# Required-Stop: $syslog $network
-# Should-Start: $local_fs $remote_fs
-# Should-Stop: $local_fs $remote_fs
+# Required-Start: $local_fs $remote_fs $syslog $network
+# Required-Stop: $local_fs $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start dbmail services
@@ -19,7 +17,7 @@
### END INIT INFO
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
IMAPD=/usr/sbin/dbmail-imapd
POP3D=/usr/sbin/dbmail-pop3d
@@ -29,7 +27,7 @@ SIEVE=/usr/sbin/dbmail-timsieved
IMAPD_NAME=dbmail-imapd
POP3D_NAME=dbmail-pop3d
LMTPD_NAME=dbmail-lmtpd
-SIEVE_NAME=dbmail-timsieve
+SIEVE_NAME=dbmail-timsieved
NAME="dbmail"
@@ -47,51 +45,13 @@ set -e
[ -e /etc/default/dbmail ] && . /etc/default/dbmail
-ssl_wrapper() {
- # this needs more work. Use stunnel at your own risk,
- # or wait for native support for ssl in dbmail-2 :-(
- # note: stunnel4 in inetd mode will scale better.
- cd /etc/ssl/certs || return 0
- [ -e "$PEMFILE" ] || return 0
- [ -x /usr/sbin/stunnel ] || return 0
- # assuming stunnel runs on the same host as dbmail, even though
- # it aint necessarily so.
- STUNNLOPT="-D 7 -p $PEMFILE -S 0 -a /etc/ssl/certs -t 300 -s dbmail -g dbmail -P $PID_DIR"
- log_progress_msg "SSL wrapper"
-
- case "$1" in
- start)
- [ "$START_IMAPD" ] && \
- /usr/sbin/stunnel $STUNNLOPT -r localhost:imap -d imaps
- [ "$START_POP3D" ] && \
- /usr/sbin/stunnel $STUNNLOPT -r localhost:pop3 -d pop3s
- ;;
-
- stop)
- if [ "$START_IMAPD" ]; then
- pidfile="$PID_DIR/stunnel.localhost.imap.pid"
- if [ -f "$pidfile" ]; then
- kill `cat $pidfile` >/dev/null 2>&1 || true
- fi
- fi
- if [ "$START_POP3D" ]; then
- pidfile="$PID_DIR/stunnel.localhost.pop3.pid"
- if [ -f "$pidfile" ]; then
- kill `cat $pidfile` >/dev/null 2>&1 || true
- fi
- fi
- ;;
- esac
- return 0
-}
-
service_start() {
eval '_daemon=$'$1
eval '_name=$'$1'_NAME'
[ -e $_daemon ] || return 0
log_progress_msg "$_name"
- start-stop-daemon --start --exec $_daemon
+ start-stop-daemon --start --startas $_daemon
r=$?
if [ $r -gt 0 ]; then
@@ -128,8 +88,7 @@ service_reload() {
eval '_name=$'$1'_NAME'
log_progress_msg "$_name"
- start-stop-daemon --stop --signal HUP --quiet \
- --pidfile ${PID_DIR}/${_name}.pid --name ${_name}
+ start-stop-daemon --stop --signal HUP --quiet --pidfile ${PID_DIR}/${_name}.pid
r=$?
if [ $r -gt 0 ]; then
@@ -144,38 +103,41 @@ service_reload() {
case "$1" in
start)
log_daemon_msg "Starting $DESC"
- gr=0
+ gr=0;r=0
if [ "$START_IMAPD" ]; then service_start "IMAPD" || let gr=$gr+$?; fi
if [ "$START_POP3D" ]; then service_start "POP3D" || let gr=$gr+$?; fi
if [ "$START_LMTPD" ]; then service_start "LMTPD" || let gr=$gr+$?; fi
if [ "$START_SIEVE" ]; then service_start "SIEVE" || let gr=$gr+$?; fi
if [ "$START_SSL" ]; then ssl_wrapper start || let gr=$gr+$?; fi
- log_end_msg $gr
+ [ $gr -gt 0 ] && r=1
+ log_end_msg $r
;;
stop)
log_daemon_msg "Stopping $DESC"
- gr=0
+ gr=0;r=0
if [ "$START_SSL" ]; then ssl_wrapper stop || let gr=$gr+$?; fi
if [ "$START_IMAPD" ]; then service_stop "IMAPD" || let gr=$gr+$?; fi
if [ "$START_POP3D" ]; then service_stop "POP3D" || let gr=$gr+$?; fi
if [ "$START_LMTPD" ]; then service_stop "LMTPD" || let gr=$gr+$?; fi
if [ "$START_SIEVE" ]; then service_stop "SIEVE" || let gr=$gr+$?; fi
- log_end_msg $gr
+ [ $gr -gt 0 ] && r=1
+ log_end_msg $r
;;
reload)
log_daemon_msg "Reloading $DESC"
- gr=0
+ gr=0;r=0
if [ "$START_IMAPD" ]; then service_reload "IMAPD" || let gr=$gr+$?; fi
if [ "$START_POP3D" ]; then service_reload "POP3D" || let gr=$gr+$?; fi
if [ "$START_LMTPD" ]; then service_reload "LMTPD" || let gr=$gr+$?; fi
if [ "$START_SIEVE" ]; then service_reload "SIEVE" || let gr=$gr+$?; fi
- log_end_msg $gr
+ [ $gr -gt 0 ] && r=1
+ log_end_msg $r
;;
restart|force-reload)
- $0 stop || true
+ $0 stop
$0 start
;;
*)
diff --git a/debian/dbmail.postinst b/debian/dbmail.postinst
index de6cbd26..99468a71 100644
--- a/debian/dbmail.postinst
+++ b/debian/dbmail.postinst
@@ -4,7 +4,7 @@ CONFIG=/etc/dbmail/dbmail.conf
CONFIG_EX=/usr/share/doc/dbmail/examples/dbmail.conf
DEBIAN_CONFIG=/etc/default/dbmail
-DEBIAN_CONFIG_EX=/usr/share/doc/dbmail/examples/default.dbmail
+DEBIAN_CONFIG_EX=/usr/share/dbmail/default.dbmail
test $DEBIAN_SCRIPT_DEBUG && set -v -x
@@ -24,31 +24,39 @@ test $DEBIAN_SCRIPT_DEBUG && set -v -x
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
+create_user() {
+ # creating dbmail group if he isn't already there
+ getent group dbmail >/dev/null 2>&1 || \
+ addgroup --system dbmail >/dev/null 2>&1 || true
+
+ # creating dbmail user if he isn't already there
+ getent passwd dbmail >/dev/null 2>&1 || \
+ adduser \
+ --system \
+ --ingroup dbmail \
+ --home /dev/null \
+ --gecos "Dbmail SQL mailserver" \
+ --shell /bin/false \
+ dbmail >/dev/null 2>&1 || true
+}
+
case "$1" in
- install)
- ;;
- upgrade)
+ install|upgrade)
+ create_user
;;
configure)
. /usr/share/debconf/confmodule
db_get dbmail/do_debconf || true; DO_DEBCONF=$RET
- MYSQL_INSTALLED="false"
- PGSQL_INSTALLED="false"
- SQLITE_INSTALLED="false"
-
if [ "$DO_DEBCONF" = "true" ]; then
# fetch debconf values
db_get dbmail/dbmail/host || true; DB_HOST=$RET
db_get dbmail/dbmail/db || true; DB_DATABASE=$RET
db_get dbmail/dbmail/user || true; DB_USER=$RET
db_get dbmail/dbmail/pass || true; DB_PASS=$RET
- db_get dbmail/pgsql_installed || true; PGSQL_INSTALLED=$RET
- db_get dbmail/mysql_installed || true; MYSQL_INSTALLED=$RET
- db_get dbmail/sqlite_installed || true; SQLITE_INSTALLED=$RET
db_get dbmail/dbmail/postmaster || true; POSTMASTER=$RET
@@ -89,15 +97,6 @@ case "$1" in
-e "s/^EFFECTIVE_GROUP\W*=.*\$/EFFECTIVE_GROUP=dbmail/gi" \
$CONFIG
- # overwrite driver only if not empty
- if [ "$MYSQL_INSTALLED" = "true" ]; then
- sed -i -re "s/^driver\W*=\W*\$/driver=mysql/i" $CONFIG
- elif [ "$SQLITE_INSTALLED" = "true" ]; then
- sed -i -re "s/^driver\W*=\W*\$/driver=sqlite/i" $CONFIG
- else
- sed -i -re "s/^driver\W*=\W*\$/driver=pgsql/i" $CONFIG
- fi
-
umask $oldmask
if [ "$START_IMAPD" = "true" ]; then
diff --git a/debian/dbmail.preinst b/debian/dbmail.preinst
deleted file mode 100644
index 5a4114ba..00000000
--- a/debian/dbmail.preinst
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-set -e
-
-# summary of how this script can be called:
-# * <new-preinst> install'
-# * <new-preinst> install' <old-version>
-# * <new-preinst> upgrade' <old-version>
-# * <old-preinst> abort-upgrade' <new-version>
-
-create_user() {
- # creating dbmail group if he isn't already there
- getent group dbmail >/dev/null 2>&1 || \
- addgroup --system dbmail >/dev/null 2>&1 || true
-
- # creating dbmail user if he isn't already there
- getent passwd dbmail >/dev/null 2>&1 || \
- adduser \
- --system \
- --ingroup dbmail \
- --home /dev/null \
- --gecos "Dbmail SQL mailserver" \
- --shell /bin/false \
- dbmail >/dev/null 2>&1 || true
-}
-
-case "$1" in
- install|upgrade)
- create_user
- ;;
- configure)
- ;;
- abort-upgrade)
- ;;
- *)
- echo "preinst called with unknown argument \$1'" >&2
- exit 0
- ;;
-esac
-
-#DEBHELPER#
diff --git a/debian/dbmail.prerm b/debian/dbmail.prerm
index 4b194153..f83c95e1 100644
--- a/debian/dbmail.prerm
+++ b/debian/dbmail.prerm
@@ -1,14 +1,6 @@
#!/bin/sh
set -e
-if [ -x "/etc/init.d/dbmail" ]; then
- if [ -x /usr/sbin/invoke-rc.d ] ; then
- invoke-rc.d dbmail stop
- else
- /etc/init.d/dbmail stop
- fi
-fi
-
#
#DEBHELPER#
diff --git a/debian/dbmail.templates b/debian/dbmail.templates
index 2ae78f18..857bb95f 100644
--- a/debian/dbmail.templates
+++ b/debian/dbmail.templates
@@ -70,21 +70,3 @@ Type: boolean
_Description: start the pop3 server after reboot?
Dbmail support both imap and pop3 services. You can choose to run either
one or both services.
-
-Template: dbmail/start_ssl
-Type: boolean
-_Description: Run the stunnel SSL wrapper from the init script?
- The stunnel SSL wrapper allows you to provide secure imap and pop services
- even though dbmail supports neither imaps nor pop3s (yet).
- .
- Make sure you have installed stunnel which is provided by a separate
- package if you want to use this feature.
-
-Template: dbmail/pem_file
-Type: string
-_Description: The filename for the SSL pem file:
- To be able to run the stunnel SSL wrapper you need to generate a pem file
- that should reside in /etc/ssl/certs/. Specify the filename here without
- the directory name.
- .
- Read /usr/share/doc/stunnel/README.Debian on how to generate such a file.
diff --git a/debian/po/cs.po b/debian/po/cs.po
index ec8cede9..afae3a51 100644
--- a/debian/po/cs.po
+++ b/debian/po/cs.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail 1.2.11-1\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2005-05-08 17:38+0200\n"
"Last-Translator: Martin Sin <martin.sin@seznam.cz>\n"
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
@@ -14,14 +14,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "Použít debconf pro konfiguraci dbmailu?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -35,14 +35,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "Emailová adresa odkud přícházejí zpět nedoručitelné zprávy."
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -52,20 +52,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Například: MAILER-DAEMON@vaše_doména.cz"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Emailová adresa postmastera."
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -75,20 +79,22 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Například: postmaster@vaše_doména.cz"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr "Zadejte prosím jméno počítače databázového serveru (my/pg)sql."
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -98,59 +104,59 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Zadejte prosím jméno databáze, která se má použít."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr "Zadejte jméno databáze, která uchovává tabulky dbmailu."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Toto uživatelské jméno použije dbmail pro připojení k databázovému serveru."
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "Zadejte prosím heslo pro připojení do databáze."
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr "Toto heslo použije dbmail pro připojení k databázovému serveru."
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "Spustit po restartu server POP3?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -161,27 +167,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "Spustit po restartu server POP3?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "Spustit po restartu server POP3?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -192,81 +198,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "Přejete si spustit stunnel SSL wrapper z init skriptu?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"Stunnel SSL wrapper poskytuje bezpečné připojení služeb IMAP a POP, neboť "
-"dbmail nepodporuje ani IMAPS, ani POP3S (zatím)."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"Pokud chcete používat tuto možnost, ujistěte se, že máte nainstalován "
-"stunnel, který je poskytován samostatným balíčkem."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "Vložte prosím název souboru pro soubor SSL pem."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"Abyste mohli používat SSL wrapper stunnel, musíte vytvořit pem soubor, který "
-"bude ležet v /etc/ssl/certs/. Zadejte pouze název souboru (bez názvu "
-"adresáře)."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"Jak vytvořit tento soubor se dočtete v /usr/share/doc/stunnel/README.Debian."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -274,26 +225,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -301,13 +252,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -315,40 +266,40 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr "Zadejte prosím jméno počítače databázového serveru (my/pg)sql."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr "Zadejte prosím jméno uživatele databáze, který se má použít."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -356,13 +307,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -370,13 +321,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -384,14 +335,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr "Zadejte prosím jméno počítače databázového serveru (my/pg)sql."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -399,14 +350,14 @@ msgstr "Toto heslo použije dbmail pro připojení k databázovému serveru."
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr "Zadejte prosím jméno počítače databázového serveru (my/pg)sql."
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -414,6 +365,44 @@ msgid ""
msgstr "Toto heslo použije dbmail pro připojení k databázovému serveru."
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr "Přejete si spustit stunnel SSL wrapper z init skriptu?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "Stunnel SSL wrapper poskytuje bezpečné připojení služeb IMAP a POP, neboť "
+#~ "dbmail nepodporuje ani IMAPS, ani POP3S (zatím)."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "Pokud chcete používat tuto možnost, ujistěte se, že máte nainstalován "
+#~ "stunnel, který je poskytován samostatným balíčkem."
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "Vložte prosím název souboru pro soubor SSL pem."
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "Abyste mohli používat SSL wrapper stunnel, musíte vytvořit pem soubor, "
+#~ "který bude ležet v /etc/ssl/certs/. Zadejte pouze název souboru (bez "
+#~ "názvu adresáře)."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "Jak vytvořit tento soubor se dočtete v /usr/share/doc/stunnel/README."
+#~ "Debian."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "Spustit po restartu server POP3?"
diff --git a/debian/po/de.po b/debian/po/de.po
index 7bd97e19..1e3a94c5 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail_1.2.5-1_templates\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2004-06-01 21:49+0200\n"
"Last-Translator: Erik Schanze <mail@erikschanze.de>\n"
"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
@@ -26,14 +26,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "Soll debconf die Einstellungen für dbmail verwalten?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -47,14 +47,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "Von welcher Emailadresse sollen Bounce-Mails kommen?"
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -64,20 +64,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Beispiel: MAILER-DAEMON@yourdomain.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Postmasters Emailadresse."
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -87,20 +91,22 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Beispiel: postmaster@yourdomain.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr "Bitte Rechnernamen des (My/Postgre)-SQL-Datenbank-Servers eingeben."
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -111,32 +117,32 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Bitte Namen der Datenbank eingeben."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr "Dies ist der Name der Datenbank, die dbmails Tabellen aufnimmt."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Dies der Benutzername, den dbmail nutzen wird, um sich mit dem Datenbank-"
@@ -144,14 +150,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "Bitte Passwort für die Datenbankverbindung eingeben."
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
"Dies ist das Passwort, das dbmail nutzen wird, um sich mit dem Datenbank-"
@@ -159,14 +165,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "POP3-Server nach dem Neustart starten?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -177,27 +183,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "POP3-Server nach dem Neustart starten?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "POP3-Server nach dem Neustart starten?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -208,82 +214,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "Wollen Sie den SSL-Wrapper stunnel durch ein init-Skript starten?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"Mit dem SSL-Wrapper stunnel können Sie sichere IMAP- und POP3-Dienste "
-"anbieten, trotzdem dbmail (bis jetzt) weder IMAPS noch POP3S unterstützt."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"Stellen Sie sicher, dass stunnel installiert ist, wenn Sie diese Funktion "
-"nutzen möchten. Es wird durch ein anderes Paket bereitgestellt. "
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "Bitte den Namen der SSL-PEM-Datei eingeben."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"Um den SSL-Wrapper stunnel betreiben zu können, müssen Sie eine PEM-Datei "
-"erstellen, die im Verzeichnis /etc/ssl/certs/ liegen sollte. Geben Sie hier "
-"den Dateinamen ohne das Verzeichnis an."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"In der Datei /usr/share/doc/stunnel/README.Debian ist erklärt, wie eine "
-"solche PEM-Datei erstellt wird."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -291,26 +241,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -318,13 +268,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -332,40 +282,40 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr "Bitte Rechnernamen des (My/Postgre)-SQL-Datenbank-Servers eingeben."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr "Bitte den Namen des Datenbank-Benutzers eingeben."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -373,13 +323,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -387,13 +337,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -401,14 +351,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr "Bitte Rechnernamen des (My/Postgre)-SQL-Datenbank-Servers eingeben."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -418,14 +368,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr "Bitte Rechnernamen des (My/Postgre)-SQL-Datenbank-Servers eingeben."
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -435,6 +385,44 @@ msgstr ""
"Server zu verbinden."
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr "Wollen Sie den SSL-Wrapper stunnel durch ein init-Skript starten?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "Mit dem SSL-Wrapper stunnel können Sie sichere IMAP- und POP3-Dienste "
+#~ "anbieten, trotzdem dbmail (bis jetzt) weder IMAPS noch POP3S unterstützt."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "Stellen Sie sicher, dass stunnel installiert ist, wenn Sie diese Funktion "
+#~ "nutzen möchten. Es wird durch ein anderes Paket bereitgestellt. "
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "Bitte den Namen der SSL-PEM-Datei eingeben."
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "Um den SSL-Wrapper stunnel betreiben zu können, müssen Sie eine PEM-Datei "
+#~ "erstellen, die im Verzeichnis /etc/ssl/certs/ liegen sollte. Geben Sie "
+#~ "hier den Dateinamen ohne das Verzeichnis an."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "In der Datei /usr/share/doc/stunnel/README.Debian ist erklärt, wie eine "
+#~ "solche PEM-Datei erstellt wird."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "POP3-Server nach dem Neustart starten?"
diff --git a/debian/po/es.po b/debian/po/es.po
index 19effffb..36835735 100644
--- a/debian/po/es.po
+++ b/debian/po/es.po
@@ -27,7 +27,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2005-09-23 16:27+0100\n"
"Last-Translator: César Gómez Martín <cesar.gomez@gmail.com>\n"
"Language-Team: Debian l10n spanish <debian-l10n-spanish@lists.debian.org>\n"
@@ -40,14 +40,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "¿Desea utilizar debconf para gestionar la configuración de dbmail?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -61,7 +61,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr ""
@@ -69,7 +69,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -79,20 +79,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Ejemplo: DEMONIO-DE-CORREO@sudominio.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Dirección de correo electrónico del gestor de correos."
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -102,13 +106,15 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Ejemplo: postmaster@sudominio.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr ""
@@ -117,7 +123,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -128,33 +134,33 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Por favor, introduzca el nombre de la base de datos a usar."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr ""
"Este es el nombre de la base de datos que contiene las tablas de dbmail."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Este es el nombre de usuario que dbmail usará para conectarse con el "
@@ -162,7 +168,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr ""
@@ -170,7 +176,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
"Este es la contraseña que dbmail usará para conectarse con el servidor de "
@@ -178,14 +184,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "¿Desea arrancar el servidor POP3 después de reiniciar?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -196,27 +202,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "¿Desea arrancar el servidor POP3 después de reiniciar?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "¿Desea arrancar el servidor POP3 después de reiniciar?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -227,84 +233,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "¿Desea ejecutar el envoltorio stunnel SSL desde el guión de inicio?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"El envoltorio stunnel SSL le permite proporcionar servicios IMAP y POP "
-"seguros aunque dbmail no soporte ni IMAPS ni POP3S (aun)."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"Si quiere esta característica, asegúrese de que tiene instalado stunnel, que "
-"se proporciona en un paquete separado."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr ""
-"Por favor, introduzca el nombre del fichero pem (correo privado mejorado) de "
-"SSL."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"Necesita generar un fichero pem en el directorio /etc/ssl/certs para poder "
-"ejecutar el envoltorio stunnel SSL. Indique aquí el nombre del fichero sin "
-"el nombre del directorio."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"Si desea más información acerca de como generar ese fichero consulte /usr/"
-"share/doc/stunnel/README.Debian."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -312,26 +260,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -339,13 +287,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -353,7 +301,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr ""
@@ -362,7 +310,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr ""
@@ -371,26 +319,26 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -398,13 +346,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -412,13 +360,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -426,7 +374,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr ""
@@ -435,7 +383,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -445,7 +393,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr ""
@@ -454,7 +402,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -464,6 +412,46 @@ msgstr ""
"base de datos."
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr "¿Desea ejecutar el envoltorio stunnel SSL desde el guión de inicio?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "El envoltorio stunnel SSL le permite proporcionar servicios IMAP y POP "
+#~ "seguros aunque dbmail no soporte ni IMAPS ni POP3S (aun)."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "Si quiere esta característica, asegúrese de que tiene instalado stunnel, "
+#~ "que se proporciona en un paquete separado."
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr ""
+#~ "Por favor, introduzca el nombre del fichero pem (correo privado mejorado) "
+#~ "de SSL."
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "Necesita generar un fichero pem en el directorio /etc/ssl/certs para "
+#~ "poder ejecutar el envoltorio stunnel SSL. Indique aquí el nombre del "
+#~ "fichero sin el nombre del directorio."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "Si desea más información acerca de como generar ese fichero consulte /usr/"
+#~ "share/doc/stunnel/README.Debian."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "¿Desea arrancar el servidor POP3 después de reiniciar?"
diff --git a/debian/po/fr.po b/debian/po/fr.po
index 6a9fa3e4..2cbb6755 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail 1.1-1\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2003-10-02 16:44+0100\n"
"Last-Translator: Christian Perrier <bubulle@debian.org>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@@ -25,14 +25,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "Faut-il utiliser debconf pour g�rer la configuration de dbmail�?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -45,14 +45,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "Adresse �lectronique d'origine pour les rejets"
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -62,20 +62,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Exemple�: MAILER-DAEMON@votredomaine.eu"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Adresse �lectronique de l'administrateur du courrier (��postmaster��)"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -85,20 +89,22 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Exemple�: postmaster@votredomaine.eu"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr "Nom d'h�te du serveur de bases de donn�es"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -109,33 +115,33 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Nom de la base de donn�es"
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr ""
"Il s'agit du nom de la base de donn�es qui contiendra les tables de dbmail."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Il s'agit de l'identifiant qui sera utilis� lors des connexions au serveur "
@@ -143,14 +149,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "Mot de passe du propri�taire de la base de donn�es"
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
"Il s'agit du mot de passe qui sera utilis� lors des connexions au serveur de "
@@ -158,14 +164,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "Faut-il lancer le serveur POP3 au d�marrage�?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -176,27 +182,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "Faut-il lancer le serveur POP3 au d�marrage�?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "Faut-il lancer le serveur POP3 au d�marrage�?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -207,83 +213,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "Faut-il lancer l'enveloppe stunnel SSL depuis le script de d�marrage�?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"L'enveloppe stunnel SSL (��stunnel SSL wrapper��) permet la mise en place de "
-"services IMAP et POP3 s�curis�s bien que dbmail ne g�re pas (encore) les "
-"protocoles IMAPS et POP3S."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"Veuillez v�rifier que vous avez install� stunnel, fourni par un paquet "
-"s�par�, si vous souhaitez utiliser cette fonctionnalit�."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "Nom du fichier PEM pour SSL"
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"Afin de pouvoir utiliser l'enveloppe stunnel SSL, vous devez g�n�rer un "
-"fichier PEM qui doit se trouver dans /etc/ssl/certs. Veuillez indiquer ici "
-"le nom du fichier en omettant le nom du r�pertoire."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"Veuillez consulter le fichier /usr/share/doc/stunnel/README.Debian pour des "
-"d�tails sur la g�n�ration de ce fichier."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -291,26 +240,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -318,13 +267,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -332,40 +281,40 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr "Nom d'h�te du serveur de bases de donn�es"
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr "Propri�taire de la base de donn�es"
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -373,13 +322,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -387,13 +336,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -401,14 +350,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr "Nom d'h�te du serveur de bases de donn�es"
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -418,14 +367,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr "Nom d'h�te du serveur de bases de donn�es"
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -435,6 +384,46 @@ msgstr ""
"bases de donn�es."
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr ""
+#~ "Faut-il lancer l'enveloppe stunnel SSL depuis le script de d�marrage�?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "L'enveloppe stunnel SSL (��stunnel SSL wrapper��) permet la mise en place "
+#~ "de services IMAP et POP3 s�curis�s bien que dbmail ne g�re pas (encore) "
+#~ "les protocoles IMAPS et POP3S."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "Veuillez v�rifier que vous avez install� stunnel, fourni par un paquet "
+#~ "s�par�, si vous souhaitez utiliser cette fonctionnalit�."
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "Nom du fichier PEM pour SSL"
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "Afin de pouvoir utiliser l'enveloppe stunnel SSL, vous devez g�n�rer un "
+#~ "fichier PEM qui doit se trouver dans /etc/ssl/certs. Veuillez indiquer "
+#~ "ici le nom du fichier en omettant le nom du r�pertoire."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "Veuillez consulter le fichier /usr/share/doc/stunnel/README.Debian pour "
+#~ "des d�tails sur la g�n�ration de ce fichier."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "Faut-il lancer le serveur POP3 au d�marrage�?"
diff --git a/debian/po/it.po b/debian/po/it.po
index 476d5307..1cd832b2 100644
--- a/debian/po/it.po
+++ b/debian/po/it.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail 1.1-1\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2003-09-13 09:50+0200\n"
"Last-Translator: Francesco Paolo Lovergine <frankie@debian.org>\n"
"Language-Team: Italian Localization <debian-l10n-italian@lists.debian.org>\n"
@@ -25,14 +25,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "Usare debconf per gestire la configurazione di dbmail?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
@@ -47,14 +47,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "L'indirizzo email da cui provengono i reinvii."
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
@@ -66,20 +66,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Esempio: MAILER-DAEMON@yourdomain.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Indirizzo email del Postmaster."
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid ""
"This should be a valid email address read by the person responsible for this "
@@ -90,20 +94,22 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Esempio: postmaster@yourdomain.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr "Inserisci l'hostname del server (my/pg)sql da usare."
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -114,47 +120,47 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Inserisci il nome del database da usare."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "This is the name of the database that holds the dbmail tables."
msgstr "Questo � il nme del database che contiene le tabelle dbmail."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Questo � lo username che dbmail user� per connettersi al server di database."
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "Inserisci la password per la connessione al database"
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
@@ -162,14 +168,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "faccio partire il server imap al boot?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -180,27 +186,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "faccio partire il server imap al boot?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "faccio partire il server imap al boot?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
"or both services."
@@ -210,85 +216,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "Vuoi lanciare il wrapper SSL stunnel dallo script di init?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"Il wrapper SSL stunnel consente di fornire servizi imap e pop sicuri anche "
-"se dbmail non supporta imap o pop3 su ssl. Assicurati di avere installato "
-"stunnel, che � fornito da un pacchetto separato."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"Assicurati di aver installato stunnel che � fornito in un package separato "
-"se vuoi usare questa funzionalit�."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "Inserisci il nome del file pem per SSL."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"er lanciare i wrapper SSL stunnel devi generare un file pem che dovrebbe "
-"risiedere in /etc/ssl/certs. Specifica il nome del file qui, senza il nome "
-"della directory. Leggi /usr/share/doc/stunnel/README.Debian per sapere come "
-"generare tale file."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"Leggi /usr/share/doc/stunnel/README.Debian per sapere come generare tale "
-"file."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -296,26 +243,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -323,13 +270,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -337,40 +284,40 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr "Inserisci l'hostname del server (my/pg)sql da usare."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr "Inserisci il nome dell'utente del database che vuoi usare."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -378,13 +325,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -392,13 +339,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -406,14 +353,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr "Inserisci l'hostname del server (my/pg)sql da usare."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -422,14 +369,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr "Inserisci l'hostname del server (my/pg)sql da usare."
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -438,6 +385,47 @@ msgstr ""
"Questa � la password che dbmail user� per connettersi al server di database."
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr "Vuoi lanciare il wrapper SSL stunnel dallo script di init?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "Il wrapper SSL stunnel consente di fornire servizi imap e pop sicuri "
+#~ "anche se dbmail non supporta imap o pop3 su ssl. Assicurati di avere "
+#~ "installato stunnel, che � fornito da un pacchetto separato."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "Assicurati di aver installato stunnel che � fornito in un package "
+#~ "separato se vuoi usare questa funzionalit�."
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "Inserisci il nome del file pem per SSL."
+
+#, fuzzy
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "er lanciare i wrapper SSL stunnel devi generare un file pem che dovrebbe "
+#~ "risiedere in /etc/ssl/certs. Specifica il nome del file qui, senza il "
+#~ "nome della directory. Leggi /usr/share/doc/stunnel/README.Debian per "
+#~ "sapere come generare tale file."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "Leggi /usr/share/doc/stunnel/README.Debian per sapere come generare tale "
+#~ "file."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "faccio partire il server imap al boot?"
diff --git a/debian/po/ja.po b/debian/po/ja.po
index 814de2dc..bdcbbcde 100644
--- a/debian/po/ja.po
+++ b/debian/po/ja.po
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail 1.2.9-1\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2004-11-03 01:43+0900\n"
"Last-Translator: Hideki Yamane <henrich@samba.gr.jp>\n"
"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
@@ -26,14 +26,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "dbmail ������� debconf �����Ѥ��ޤ���?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -47,14 +47,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "�Х��������κݤΥ᡼�륢�ɥ쥹"
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -64,20 +64,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "��: MAILER-DAEMON@yourdomain.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "postmaster �Υ᡼�륢�ɥ쥹"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -87,20 +91,22 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "��: postmaster@yourdomain.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr "(my/pg)sql �ǡ����١��������ФΥۥ���̾�����Ϥ��Ƥ���������"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -111,58 +117,58 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "���Ѥ���ǡ����١���̾�����Ϥ��Ƥ���������"
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr "����� dbmail �Υơ��֥���ݻ�����ǡ����١���̾�Ǥ���"
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr "����� dbmail ���ǡ����١��������Ф���³����Τ˻Ȥ��桼��̾�Ǥ���"
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "�ǡ����١�����³�����Ѥ���ѥ���ɤ����Ϥ��Ƥ���������"
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr "����ϡ�dbmail ���ǡ����١��������Ф���³����Τ˻Ȥ��ѥ���ɤǤ���"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "�Ƶ�ư��� POP3 �����Ф�ư���ޤ���?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -173,27 +179,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "�Ƶ�ư��� POP3 �����Ф�ư���ޤ���?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "�Ƶ�ư��� POP3 �����Ф�ư���ޤ���?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -204,82 +210,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "��ư������ץȤ� stunnel SSL ��åѡ���ƤӽФ��ޤ���?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"stunnel SSL ��åѡ��ϡ�dbmail �� IMAPS �ޤ��� POP3S �� (�ޤ�) �󶡤��Ƥ��ʤ�"
-"�Ƥ⡢�����奢�� IMAP��POP �����ӥ����󶡲�ǽ�ˤ��Ƥ���ޤ���"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"���ε�ǽ��Ȥ��������ϡ��̤Υѥå������˴ޤޤ�Ƥ��� stunnel �򤹤Ǥ˥���"
-"�ȡ��뤷�Ƥ���Τ��ǧ���Ƥ���������"
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "SSL pem �ե�����̾�����Ϥ��Ƥ���������"
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"stunnel SSL ��åѡ���ư����ˤϡ�/etc/ssl/certs/ �����֤��� pem �ե������"
-"��������ɬ�פ�����ޤ��������ǡ��ǥ��쥯�ȥ�̵̾���Υե�����̾����ꤷ�Ƥ���"
-"������"
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"���Υե�����κ�����ˤĤ��Ƥ� /usr/share/doc/stunnel/README.Debian �򻲾Ȥ�"
-"�Ƥ���������"
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -287,26 +237,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -314,13 +264,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -328,40 +278,40 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr "(my/pg)sql �ǡ����١��������ФΥۥ���̾�����Ϥ��Ƥ���������"
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr "���Ѥ������ǡ����١����桼��̾�����Ϥ��Ƥ���������"
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -369,13 +319,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -383,13 +333,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -397,14 +347,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr "(my/pg)sql �ǡ����١��������ФΥۥ���̾�����Ϥ��Ƥ���������"
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -412,14 +362,14 @@ msgstr "����ϡ�dbmail ���ǡ����١��������Ф���³����Τ˻Ȥ��ѥ���ɤǤ���"
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr "(my/pg)sql �ǡ����١��������ФΥۥ���̾�����Ϥ��Ƥ���������"
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -427,6 +377,44 @@ msgid ""
msgstr "����ϡ�dbmail ���ǡ����١��������Ф���³����Τ˻Ȥ��ѥ���ɤǤ���"
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr "��ư������ץȤ� stunnel SSL ��åѡ���ƤӽФ��ޤ���?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "stunnel SSL ��åѡ��ϡ�dbmail �� IMAPS �ޤ��� POP3S �� (�ޤ�) �󶡤��Ƥ�"
+#~ "�ʤ��Ƥ⡢�����奢�� IMAP��POP �����ӥ����󶡲�ǽ�ˤ��Ƥ���ޤ���"
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "���ε�ǽ��Ȥ��������ϡ��̤Υѥå������˴ޤޤ�Ƥ��� stunnel �򤹤Ǥ˥�"
+#~ "�󥹥ȡ��뤷�Ƥ���Τ��ǧ���Ƥ���������"
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "SSL pem �ե�����̾�����Ϥ��Ƥ���������"
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "stunnel SSL ��åѡ���ư����ˤϡ�/etc/ssl/certs/ �����֤��� pem �ե���"
+#~ "�����������ɬ�פ�����ޤ��������ǡ��ǥ��쥯�ȥ�̵̾���Υե�����̾����ꤷ"
+#~ "�Ƥ���������"
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "���Υե�����κ�����ˤĤ��Ƥ� /usr/share/doc/stunnel/README.Debian �򻲾�"
+#~ "���Ƥ���������"
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "�Ƶ�ư��� POP3 �����Ф�ư���ޤ���?"
diff --git a/debian/po/nl.po b/debian/po/nl.po
index 9332c92d..e7f0bf37 100644
--- a/debian/po/nl.po
+++ b/debian/po/nl.po
@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail 1.2.5-1\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2004-06-09 16:58+0100\n"
"Last-Translator: Luk Claes <luk.claes@ugent.be>\n"
"Language-Team: Debian l10n Dutch <debian-l10n-dutch@lists.debian.org>\n"
@@ -25,14 +25,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "Wilt u debconf gebruiken om dbmail te configureren?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -45,14 +45,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "Het e-mailadres van waar bounces afkomstig zijn."
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -62,20 +62,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Voorbeeld: MAILER-DAEMON@uwdomein.be"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Het e-mailadres van de postbeheerder."
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -85,20 +89,22 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Voorbeeld: postmaster@uwdomein.be"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr "Geef de computernaam van de (my/pg)sql-databankserver."
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -109,32 +115,32 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Wat is de naam van de databank?"
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr "Dit is de naam van de databank welke de dbmail-tabellen bevat."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Dit is de gebruikersnaam die dbmail zal gebruiken om met de databankserver "
@@ -142,14 +148,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "Geef het wachtwoord voor de databank."
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
"Dit is het wachtwoord dat dbmail zal gebruiken om met de databankserver te "
@@ -157,14 +163,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "De POP3-server starten na het heropstarten van de computer?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -175,27 +181,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "De POP3-server starten na het heropstarten van de computer?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "De POP3-server starten na het heropstarten van de computer?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -206,82 +212,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr "Wilt u de stunnel-SSL-wrapper uitvoeren vanuit het init-script?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"De stunnel-SSL-wrapper laat u toe beveiligde IMAP- en POP-diensten aan te "
-"bieden, ookal ondersteunt dbmail (nog) geen IMAPS of POP3S."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"U dient er zelf voor te zorgen dat stunnel, uit een apart pakket, is "
-"ge�nstalleerd, indien u hiervan gebruik wilt maken."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "De bestandsnaam van het SSL-pem-bestand."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"Om de stunnel-SSL-wrapper te kunnen gebruiken moet er een z.g. pem-bestand "
-"worden gegenereerd. Dit bestand moet vervolgens worden ge�nstalleerd in /etc/"
-"ssl/certs/. Geef hier de bestandsnaam op zonder de mapnaam."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"Lees /usr/share/doc/stunnel/README.Debian voor meer informatie over het "
-"genereren van zo'n bestand."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -289,26 +239,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -316,13 +266,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -330,40 +280,40 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr "Geef de computernaam van de (my/pg)sql-databankserver."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr "Geef de naam van de databankgebruiker die u wilt gebruiken."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -371,13 +321,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -385,13 +335,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -399,14 +349,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr "Geef de computernaam van de (my/pg)sql-databankserver."
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -416,14 +366,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr "Geef de computernaam van de (my/pg)sql-databankserver."
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -433,6 +383,45 @@ msgstr ""
"verbinden"
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr "Wilt u de stunnel-SSL-wrapper uitvoeren vanuit het init-script?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "De stunnel-SSL-wrapper laat u toe beveiligde IMAP- en POP-diensten aan te "
+#~ "bieden, ookal ondersteunt dbmail (nog) geen IMAPS of POP3S."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "U dient er zelf voor te zorgen dat stunnel, uit een apart pakket, is "
+#~ "ge�nstalleerd, indien u hiervan gebruik wilt maken."
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "De bestandsnaam van het SSL-pem-bestand."
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "Om de stunnel-SSL-wrapper te kunnen gebruiken moet er een z.g. pem-"
+#~ "bestand worden gegenereerd. Dit bestand moet vervolgens worden "
+#~ "ge�nstalleerd in /etc/ssl/certs/. Geef hier de bestandsnaam op zonder de "
+#~ "mapnaam."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "Lees /usr/share/doc/stunnel/README.Debian voor meer informatie over het "
+#~ "genereren van zo'n bestand."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "De POP3-server starten na het heropstarten van de computer?"
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
index 7c40a90b..1d8628d8 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: dbmail_1.2.1-1\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: 2003-11-02 16:42-0300\n"
"Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
"Language-Team: Debian-BR Project <debian-110n-portuguese@lists.debian.org>\n"
@@ -26,14 +26,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
#, fuzzy
msgid "Use debconf to manage dbmail configuration?"
msgstr "Utilizar o debconf para gerenciar sua configuração do dbmail ?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -47,14 +47,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
#, fuzzy
msgid "The email address where bounces come from:"
msgstr "Endereço de e-mail de onde os bounces parecerão ter originado."
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -64,20 +64,24 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr "Exemplo: MAILER-DAEMON@seudominio.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
#, fuzzy
msgid "Postmaster's email address:"
msgstr "Endereço de e-mail do postmaster."
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -87,13 +91,15 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr "Exemplo: postmaster@seudominio.tld"
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
#, fuzzy
msgid "The hostname of the sql database server:"
msgstr ""
@@ -102,7 +108,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -113,14 +119,14 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
#, fuzzy
msgid "The name of the database:"
msgstr "Por favor informe o nome da base de dados a ser usada."
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr ""
"Este deverá ser o nome da base de dados que armazenará as tabelas do "
@@ -128,19 +134,19 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
"Este deverá ser o nome do usuário que o dbmail irá usar para se conectar "
@@ -148,14 +154,14 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
#, fuzzy
msgid "The password for the database connection:"
msgstr "Por favor informe a senha para a conexão com a base de daodos"
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
"Esta deverá ser a senha que o dbmail irá usar para a conexão com o "
@@ -163,14 +169,14 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid "start the imap server after reboot?"
msgstr "Iniciar o servidor POP3 após reinicializações ?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
#, fuzzy
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
@@ -181,27 +187,27 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
#, fuzzy
msgid "start the lmtp server after reboot?"
msgstr "Iniciar o servidor POP3 após reinicializações ?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid "start the pop3 server after reboot?"
msgstr "Iniciar o servidor POP3 após reinicializações ?"
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
#, fuzzy
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
@@ -212,84 +218,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr ""
-"Você deseja executar o wrapper SSL stunnel a partir do script de "
-"inicialização ?"
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-#, fuzzy
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-"O wrapper SSL stunnel permite que você forneça serviços IMAP e POP "
-"seguros mesmo o dbmail não suportando IMAPS nem POP3S (ainda)."
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-"Certifique-se de que você tenha instalado o stunnel, o qual é fornecido "
-"por um pacote separado, caso você deseje usar este recurso."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-#, fuzzy
-msgid "The filename for the SSL pem file:"
-msgstr "Por favor informe o nome do arquivo pem SSL."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-"Para que você seja capaz de executar o wrapper SSL stunnel é necessário "
-"que você gere um arquivo pem que esteja localizado em /etc/ssl/certs. "
-"Especifique o nome desse arquivo aqui, sem informar o nome dos diretórios."
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-"Leia o arquivo /usr/share/doc/stunnel/README.Debian para saber como gerar um "
-"arquivo desse tipo."
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -297,26 +245,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -324,13 +272,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -338,7 +286,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "The hostname of the ldap server:"
msgstr ""
@@ -347,7 +295,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
#, fuzzy
msgid "Please enter the hostname your ldap server is running at."
msgstr ""
@@ -355,26 +303,26 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -382,13 +330,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -396,13 +344,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -410,7 +358,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid "The DN to bind to the ldap server:"
msgstr ""
@@ -419,7 +367,7 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
#, fuzzy
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
@@ -429,7 +377,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid "The password to bind to the ldap server:"
msgstr ""
@@ -438,7 +386,7 @@ msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
#, fuzzy
msgid ""
"Please enter the password, which should be used to connect to the ldap "
@@ -448,6 +396,47 @@ msgstr ""
"servidor de bases de dados."
#, fuzzy
+#~ msgid "Run the stunnel SSL wrapper from the init script?"
+#~ msgstr ""
+#~ "Você deseja executar o wrapper SSL stunnel a partir do script de "
+#~ "inicialização ?"
+
+#, fuzzy
+#~ msgid ""
+#~ "The stunnel SSL wrapper allows you to provide secure imap and pop "
+#~ "services even though dbmail supports neither imaps nor pop3s (yet)."
+#~ msgstr ""
+#~ "O wrapper SSL stunnel permite que você forneça serviços IMAP e POP "
+#~ "seguros mesmo o dbmail não suportando IMAPS nem POP3S (ainda)."
+
+#~ msgid ""
+#~ "Make sure you have installed stunnel which is provided by a separate "
+#~ "package if you want to use this feature."
+#~ msgstr ""
+#~ "Certifique-se de que você tenha instalado o stunnel, o qual é fornecido "
+#~ "por um pacote separado, caso você deseje usar este recurso."
+
+#, fuzzy
+#~ msgid "The filename for the SSL pem file:"
+#~ msgstr "Por favor informe o nome do arquivo pem SSL."
+
+#~ msgid ""
+#~ "To be able to run the stunnel SSL wrapper you need to generate a pem file "
+#~ "that should reside in /etc/ssl/certs/. Specify the filename here without "
+#~ "the directory name."
+#~ msgstr ""
+#~ "Para que você seja capaz de executar o wrapper SSL stunnel é "
+#~ "necessário que você gere um arquivo pem que esteja localizado em /etc/"
+#~ "ssl/certs. Especifique o nome desse arquivo aqui, sem informar o nome dos "
+#~ "diretórios."
+
+#~ msgid ""
+#~ "Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
+#~ msgstr ""
+#~ "Leia o arquivo /usr/share/doc/stunnel/README.Debian para saber como gerar "
+#~ "um arquivo desse tipo."
+
+#, fuzzy
#~ msgid "start the timesieved after reboot?"
#~ msgstr "Iniciar o servidor POP3 após reinicializações ?"
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index eb253dac..8839de05 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: paul@nfg.nl\n"
-"POT-Creation-Date: 2006-10-31 15:48+0100\n"
+"POT-Creation-Date: 2006-11-26 17:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,13 +18,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid "Use debconf to manage dbmail configuration?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:3
+#: ../dbmail.templates:1001
msgid ""
"Please confirm if you want to allow debconf to manage some parts of your "
"dbmail configuration. Notice that changes you make to dbmail.conf by hand "
@@ -34,13 +34,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "The email address where bounces come from:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid ""
"Here you must specify the address dbmail will use when sending bounce "
"messages."
@@ -48,19 +48,23 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:11
+#: ../dbmail.templates:2001
msgid "Example: MAILER-DAEMON@yourdomain.tld"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Postmaster's email address:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid ""
"This should be a valid email address read by the person responsible for this "
"email server."
@@ -68,19 +72,21 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:27
+#. Type: string
+#. Description
+#: ../dbmail.templates:3001 ../dbmail.templates:4001
msgid "Example: postmaster@yourdomain.tld"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid "The hostname of the sql database server:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:35
+#: ../dbmail.templates:5001
msgid ""
"On this server you must create a database to hold dbmail's tables. You "
"should grant full read/write permissions on this database to the dbmail user."
@@ -88,55 +94,55 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "The name of the database:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "This is the name of the database that holds the dbmail tables."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:42
+#: ../dbmail.templates:6001
msgid "If you're using sqlite, this should be the path to the database file."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "The database user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail.templates:49
+#: ../dbmail.templates:7001
msgid "This is the username dbmail will use to connect to the database server."
msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "The password for the database connection:"
msgstr ""
#. Type: password
#. Description
-#: ../dbmail.templates:54
+#: ../dbmail.templates:8001
msgid "This is the password dbmail will use to connect to the database server."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
msgid "start the imap server after reboot?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:59
+#: ../dbmail.templates:9001
msgid ""
"Dbmail supports both imap and pop3 services. You can choose to run either "
"one or both services."
@@ -144,25 +150,25 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "start the lmtp server after reboot?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:65
+#: ../dbmail.templates:10001
msgid "This is only needed when you like to feed the email to Dbmail by LMTP."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
msgid "start the pop3 server after reboot?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:70
+#: ../dbmail.templates:11001
msgid ""
"Dbmail support both imap and pop3 services. You can choose to run either one "
"or both services."
@@ -170,70 +176,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail.templates:76
-msgid "Run the stunnel SSL wrapper from the init script?"
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"The stunnel SSL wrapper allows you to provide secure imap and pop services "
-"even though dbmail supports neither imaps nor pop3s (yet)."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../dbmail.templates:76
-msgid ""
-"Make sure you have installed stunnel which is provided by a separate package "
-"if you want to use this feature."
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid "The filename for the SSL pem file:"
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"To be able to run the stunnel SSL wrapper you need to generate a pem file "
-"that should reside in /etc/ssl/certs/. Specify the filename here without "
-"the directory name."
-msgstr ""
-
-#. Type: string
-#. Description
-#: ../dbmail.templates:85
-msgid ""
-"Read /usr/share/doc/stunnel/README.Debian on how to generate such a file."
-msgstr ""
-
-#. Type: boolean
-#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid "activate mysql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-mysql.templates:3
+#: ../dbmail-mysql.templates:1001
msgid ""
"Select this option if you want to use mysql as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid "activate postgresql support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-pgsql.templates:3
+#: ../dbmail-pgsql.templates:1001
msgid ""
"Select this option if you want to use postgresql as storage driver for "
"dbmail."
@@ -241,26 +203,26 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid "activate sqlite support for dbmail?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-sqlite.templates:3
+#: ../dbmail-sqlite.templates:1001
msgid ""
"Select this option if you want to use sqlite as storage driver for dbmail."
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid "Do you wish to activate the ldap auth driver?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:3
+#: ../dbmail-ldap.templates:1001
msgid ""
"Please select this option if you want to use the LDAP authentication driver "
"for dbmail."
@@ -268,13 +230,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid "The port is your ldap server running at:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:9
+#: ../dbmail-ldap.templates:2001
msgid ""
"Please enter the port on which your ldap server is running at. The default "
"port is 389."
@@ -282,38 +244,38 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
msgid "The hostname of the ldap server:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:15
+#: ../dbmail-ldap.templates:3001
msgid "Please enter the hostname your ldap server is running at."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid "The ldap base DN:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:20
+#: ../dbmail-ldap.templates:4001
msgid ""
"Please enter the DN where Dbmail should start searching for user accounts."
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid "The field which contains the user login name of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:26
+#: ../dbmail-ldap.templates:5001
msgid ""
"Please enter the ldap attribute that will contain the username The standard "
"account uses uid"
@@ -321,13 +283,13 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid "The field which contains the group id number of the user:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:32
+#: ../dbmail-ldap.templates:6001
msgid ""
"Please enter the ldap attribute that will contain the group id number The "
"standard account uses gidNumber"
@@ -335,13 +297,13 @@ msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid "Bind anonymous to the ldap server?"
msgstr ""
#. Type: boolean
#. Description
-#: ../dbmail-ldap.templates:38
+#: ../dbmail-ldap.templates:7001
msgid ""
"Use this if your ldap does not require authentication to search the ldap "
"tree."
@@ -349,26 +311,26 @@ msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
msgid "The DN to bind to the ldap server:"
msgstr ""
#. Type: string
#. Description
-#: ../dbmail-ldap.templates:44
+#: ../dbmail-ldap.templates:8001
msgid ""
"Please enter the DN, which should be used to connect to the ldap server."
msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
msgid "The password to bind to the ldap server:"
msgstr ""
#. Type: password
#. Description
-#: ../dbmail-ldap.templates:50
+#: ../dbmail-ldap.templates:9001
msgid ""
"Please enter the password, which should be used to connect to the ldap "
"server."
diff --git a/debian/rules b/debian/rules
index f293be83..29b00b7d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,11 +3,7 @@
# -*- sh -*-
# Uncomment this to turn on verbose mode.
-export DH_VERBOSE=1
-
-# This is the debhelper compatibility version to use.
-export DH_COMPAT=5
-export DEBUILD_DPKG_BUILDPACKAGE_OPTS="-i"
+#export DH_VERBOSE=1
#export WITH_GC="--with-gc"
export WITH_SIEVE=--with-sieve
@@ -33,11 +29,11 @@ ifneq (,$(findstring devel,$(DEB_BUILD_OPTIONS)))
export WITH_SQLITE=
export WITH_LDAP=
export WITH_SIEVE=
+ export WITH_INGRES=
export SHARED=--enable-shared=no
export STATIC=--enable-static=yes
CFLAGS += -g
endif
-
ifneq (,$(findstring mysql,$(DEB_BUILD_OPTIONS)))
export WITH_MYSQL=--with-mysql
endif
@@ -47,17 +43,25 @@ endif
ifneq (,$(findstring sqlite,$(DEB_BUILD_OPTIONS)))
export WITH_SQLITE=--with-sqlite
endif
+ifneq (,$(findstring ingres,$(DEB_BUILD_OPTIONS)))
+ export WITH_INGRES=--with-ingres=/opt/Ingres/IngresII
+endif
ifneq (,$(findstring ldap,$(DEB_BUILD_OPTIONS)))
export WITH_LDAP=--with-auth-ldap
endif
ifneq (,$(findstring sieve,$(DEB_BUILD_OPTIONS)))
export WITH_SIEVE=--with-sieve
endif
+ifneq (,$(findstring static,$(DEB_BUILD_OPTIONS)))
+ export SHARED=--enable-shared=no
+ export STATIC=--enable-static=yes
+endif
+ifneq (,$(findstring shared,$(DEB_BUILD_OPTIONS)))
+ export SHARED=--enable-shared=yes
+ export STATIC=--enable-static=no
+endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
- INSTALL_PROGRAM += -s
-endif
# dpatch
export PACKAGE=dbmail
@@ -65,14 +69,14 @@ export PACKAGES=dbmail
include /usr/share/dpatch/dpatch.make
-CONFFLAGS=--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
- --prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc/dbmail \
+CONFFLAGS=--prefix=/usr --mandir=\$${prefix}/share/man --sysconfdir=/etc/dbmail \
--localstatedir=/var/run/dbmail --with-logdir=/var/log/dbmail --infodir=\$${prefix}/share/info \
--libdir=/usr/lib/dbmail \
- $(WITH_GC) $(WITH_CHECK) $(SHARED) $(STATIC) $(WITH_SIEVE) $(WITH_LDAP) $(WITH_MYSQL) $(WITH_PGSQL) $(WITH_SQLITE)
+ $(WITH_GC) $(WITH_CHECK) $(SHARED) $(STATIC) $(WITH_SIEVE) $(WITH_LDAP) \
+ $(WITH_MYSQL) $(WITH_PGSQL) $(WITH_SQLITE) $(WITH_INGRES)
build: stamps/build
-stamps/build: stamps patch configure $(PACKAGES)
+stamps/build: stamps patch $(PACKAGES)
touch $@
stamps:
@@ -85,9 +89,7 @@ stamps/configure:
dbmail: stamps/dbmail
stamps/dbmail:
- $(MAKE) clean || true
- env CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" PATH="$(PATH):/usr/lib/postgresql/bin/" \
- ./configure $(CONFFLAGS)
+ env CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFFLAGS)
$(MAKE)
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
touch $@
@@ -97,7 +99,13 @@ clean1:
# run clean
dh_testroot
dh_testdir
- rm -rf stamps
+ -$(MAKE) distclean
+ dh_clean
+ rm -rf stamps autom4te.cache || true
+
+# maintainer target
+mrproper:
+ -$(MAKE) distclean
rm -f `find . -name ".#*"`
rm -f `find . -name "*.la"`
rm -f `find . -name "*.lo"`
@@ -105,20 +113,14 @@ clean1:
rm -f `find . -name "*.pyc"`
rm -f `find man -name "*.xml"`
rm -f `find man -name "*.[1-8]"`
+ rm -rf buildtools
# Add here commands to clean up after the build process.
- -$(MAKE) clean
- rm -rf debian/dbmail; \
for file in config.in aclocal.m4 acconfig.h configure `find . -name Makefile.in`; do \
rm -rf $$file || true; \
done
- rm -rf autom4te.cache
for file in Makefile config.h config.status libtool stamp-h .deps .libs; do \
rm -rf `find . -name $$file`; \
done
- rm -f stamp-h* config.log aclocal.m4 configure dbmail.h
- rm -rf buildtools || true
- dh_clean
-
# Build architecture-dependent files here.
binary-common: build
@@ -146,7 +148,6 @@ binary-common: build
dh_installdebconf -a
dh_installman -a
dh_installdocs -a
- dh_installdocs -A debian/README.Debian debian/TODO
dh_installchangelogs -a
## update examples
(cd $(CURDIR) && find sql/mysql/ -type f && cat debian/dbmail-mysql.examples) | \
@@ -157,7 +158,8 @@ binary-common: build
sort|uniq>stamps/tmpfile && cat stamps/tmpfile > $(CURDIR)/debian/dbmail-pgsql.examples
rm -f stamps/tmpfile
dh_installexamples -a
- dh_installdirs -A etc/dbmail var/run/dbmail var/log/dbmail
+ dh_installdirs -A etc/dbmail var/run/dbmail var/log/dbmail usr/share/dbmail
+ install -m 644 $(CURDIR)/debian/default.dbmail $(CURDIR)/debian/dbmail/usr/share/dbmail/default.dbmail
dh_strip -a
dh_link -a
dh_compress -a
@@ -178,5 +180,5 @@ binary-%: build install
binary: binary-indep binary-arch
-.PHONY: build clean clean1 patch binary binary-common binary-indep binary-arch unpatch configure install
+.PHONY: build clean clean1 mrproper patch binary binary-common binary-indep binary-arch unpatch configure install
diff --git a/dm_imaputil.c b/dm_imaputil.c
index f20e9348..962c6fc9 100644
--- a/dm_imaputil.c
+++ b/dm_imaputil.c
@@ -30,9 +30,6 @@
#define THIS_MODULE "imap"
-#ifndef MAX_LINESIZE
-#define MAX_LINESIZE (10*1024)
-#endif
#define BUFLEN 2048
#define SEND_BUF_SIZE 1024
@@ -64,27 +61,6 @@ size_t stridx(const char *s, char ch)
return i;
}
-
-/*
- * checkchars()
- *
- * performs a check to see if the read data is valid
- * returns 0 if invalid, 1 otherwise
- */
-int checkchars(const char *s)
-{
- int i;
-
- for (i = 0; s[i]; i++) {
- if (!strchr(AcceptedChars, s[i])) {
- /* wrong char found */
- return 0;
- }
- }
- return 1;
-}
-
-
/*
* checktag()
*
diff --git a/dm_imaputil.h b/dm_imaputil.h
index c71b064f..81788899 100644
--- a/dm_imaputil.h
+++ b/dm_imaputil.h
@@ -35,7 +35,6 @@ int next_fetch_item(char **args, int idx, fetch_items_t * fi);
int is_textplain(struct dm_list *hdr);
size_t stridx(const char *s, char ch);
-int checkchars(const char *s);
int checktag(const char *s);
int binary_search(const u64_t * array, unsigned arraysize, u64_t key, unsigned int *key_idx);
void send_data(FILE * to, MEM * from, int cnt);
diff --git a/export.c b/export.c
index 4d030968..e1227cfa 100644
--- a/export.c
+++ b/export.c
@@ -248,7 +248,7 @@ int main(int argc, char *argv[])
mailbox = g_new0(char, IMAP_MAX_MAILBOX_NAMELEN);
db_findmailbox_by_regex(useridnr, "*", &children, &nchildren, 0);
- qerrorf("Exporing [%u] mailboxes for [%s]\n", nchildren, user);
+ qerrorf("Exporting [%u] mailboxes for [%s]\n", nchildren, user);
for (i=0; i< nchildren; i++) {
mailbox_idnr = children[i];
db_getmailboxname(children[i], useridnr, mailbox);
@@ -263,7 +263,10 @@ int main(int argc, char *argv[])
int serr = errno;
qerrorf("%s\n", strerror(serr));
goto freeall;
+ } else if (!outfile) {
+ outfile = ".";
}
+
dumpfile = g_strdup_printf("%s/%s", user, mailbox);
qerrorf(" export mailbox /%s/%s -> %s/%s\n", user, mailbox, outfile, dumpfile);
if (mailbox_dump(mailbox_idnr, dumpfile)) {
diff --git a/imap4.c b/imap4.c
index 81fc5c88..3e76f3f7 100644
--- a/imap4.c
+++ b/imap4.c
@@ -18,7 +18,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+<<<<<<< master
/* $Id$
+=======
+/* $Id$
+>>>>>>> dbmail_2_2
* imap4.c
*
* implements an IMAP 4 rev 1 server.
@@ -26,7 +30,6 @@
#include "dbmail.h"
-#define MAX_LINESIZE (10*1024)
#define COMMAND_SHOW_LEVEL TRACE_INFO
#define THIS_MODULE "imap"
@@ -182,12 +185,6 @@ int IMAPClientHandler(clientinfo_t * ci)
return 1;
}
- if (!checkchars(line)) {
- dbmail_imap_session_printf(session, "* BYE Input contains invalid characters\r\n");
- dbmail_imap_session_delete(session);
- return 1;
- }
-
/* strip eol chars */
cpy = &line[strlen(line)];
cpy--;
diff --git a/imapcommands.c b/imapcommands.c
index 6c3a3950..c646de9b 100644
--- a/imapcommands.c
+++ b/imapcommands.c
@@ -18,7 +18,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+<<<<<<< master
/* $Id$
+=======
+/* $Id$
+>>>>>>> dbmail_2_2
*
* imapcommands.c
*
@@ -32,9 +36,6 @@
#define _GNU_SOURCE
#endif
-#ifndef MAX_LINESIZE
-#define MAX_LINESIZE 1024
-#endif
#ifndef MAX_RETRIES
#define MAX_RETRIES 12
@@ -695,7 +696,7 @@ int _ic_list(struct ImapSession *self)
}
/* check the reference name, should contain only accepted mailboxname chars */
- for (i = 0, slen = strlen(self->args[0]); self->args[0][i]; i++) {
+ for (i = 0, slen = strlen(AcceptedMailboxnameChars); self->args[0][i]; i++) {
if (stridx(AcceptedMailboxnameChars, self->args[0][i]) == slen) {
/* wrong char found */
dbmail_imap_session_printf(self,
@@ -1143,23 +1144,16 @@ int _ic_check(struct ImapSession *self)
int _ic_close(struct ImapSession *self)
{
imap_userdata_t *ud = (imap_userdata_t *) self->ci->userData;
- int result;
+ gboolean result;
if (!check_state_and_args(self, "CLOSE", 0, 0, IMAPCS_SELECTED))
return 1; /* error, return */
/* check if the user has to right to expunge all messages from the
mailbox. */
- result = acl_has_right(&ud->mailbox, ud->userid, ACL_RIGHT_DELETE);
- if (result < 0) {
- dbmail_imap_session_printf(self, "* BYE Internal database error\r\n");
- return -1;
- }
- /* only perform the expunge if the user has the right to do it */
- if (result == 1)
- if (ud->mailbox.permission == IMAPPERM_READWRITE)
- db_expunge(ud->mailbox.uid, ud->userid, NULL,
- NULL);
+
+ if ((result = acl_has_right(&ud->mailbox, ud->userid, ACL_RIGHT_DELETE)))
+ db_expunge(ud->mailbox.uid, ud->userid, NULL, NULL);
/* ok, update state (always go to IMAPCS_AUTHENTICATED) */
@@ -1202,7 +1196,7 @@ int _ic_expunge(struct ImapSession *self)
if (!check_state_and_args(self, "EXPUNGE", 0, 0, IMAPCS_SELECTED))
return 1; /* error, return */
-
+
if (ud->mailbox.permission != IMAPPERM_READWRITE) {
dbmail_imap_session_printf(self,
"%s NO you do not have write permission on this folder\r\n",
diff --git a/list.c b/list.c
index 89739f15..dd8eba3b 100644
--- a/list.c
+++ b/list.c
@@ -163,7 +163,7 @@ GList *g_list_slices(GList *list, unsigned limit)
g_string_append_printf(slice,",%s", (gchar *)list->data);
}
new = g_list_append_printf(new, "%s", slice->str);
- g_string_free(slice,FALSE);
+ g_string_free(slice,TRUE);
if (! g_list_next(list))
break;
list = g_list_next(list);
@@ -190,7 +190,7 @@ GList *g_list_slices_u64(GList *list, unsigned limit)
g_string_append_printf(slice,",%llu", *(u64_t *)list->data);
}
new = g_list_append_printf(new, "%s", slice->str);
- g_string_free(slice,FALSE);
+ g_string_free(slice,TRUE);
if (! g_list_next(list))
break;
list = g_list_next(list);
diff --git a/misc.c b/misc.c
index 984b72c6..9f4ea56c 100644
--- a/misc.c
+++ b/misc.c
@@ -30,7 +30,7 @@
const char AcceptedMailboxnameChars[] =
"abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "0123456789-=/ _.&,+@()[]'";
+ "0123456789-=/ _.&,+@()[]'#";
/**
* abbreviated names of the months
@@ -2112,8 +2112,14 @@ char * imap_cleanup_address(const char *a)
char prev,next=0;
unsigned incode=0, inquote=0;
size_t i, l;
- GString *s = g_string_new("");
+ GString *s;
+
+ if (!a)
+ return g_strdup("");
+ if (!a[0])
+ return g_strdup("");
+ s = g_string_new("");
t = g_strdup(a);
inptr = t;
inptr = g_strstrip(inptr);
@@ -2130,8 +2136,7 @@ char * imap_cleanup_address(const char *a)
}
l = strlen(inptr);
-
- for (i=0; i<l-1; i++) {
+ for (i = 0; i < l - 1; i++) {
next=inptr[i+1];
diff --git a/modules/Makefile.am b/modules/Makefile.am
index fdc82655..2dac87ee 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -17,7 +17,11 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
INCLUDES = -I$(top_srcdir)
-AM_CFLAGS = @MYSQLINC@ @PGSQLINC@ @SQLITEINC@ @LDAPINC@ @SIEVEINC@ -fomit-frame-pointer
+<<<<<<< master
+AM_CFLAGS = @MYSQLINC@ @PGSQLINC@ @SQLITEINC@ @INGRESINC@ @LDAPINC@ @SIEVEINC@ -fomit-frame-pointer
+=======
+AM_CFLAGS = @MYSQLINC@ @PGSQLINC@ @SQLITEINC@ @LDAPINC@ @SIEVEINC@
+>>>>>>> dbmail_2_2
@@ -34,6 +38,7 @@ pkglibdir = $(libdir)
pkglib_LTLIBRARIES = libmysql.la \
libpgsql.la \
libsqlite.la \
+ libmod_ingres.la \
libsort_sieve.la \
libauth_sql.la \
libauth_ldap.la
@@ -56,13 +61,17 @@ libsqlite_la_SOURCES = dbsqlite.c
libsqlite_la_LIBADD = @SQLITELIB@
endif
+if INGRES
+libmod_ingres_la_SOURCES = dbingres.c
+libmod_ingres_la_LIBADD = @INGRESLIB@
+endif
+
# This one is always built.
libsort_null_la_SOURCES = sortnull.c
-libsort_null_la_LIBADD = @SORTLIB@
if SIEVE
libsort_sieve_la_SOURCES = sortsieve.c
-libsort_sieve_la_LIBADD = @SORTLIB@
+libsort_sieve_la_LIBADD = @SIEVELIB@
endif
# This one is always built.
diff --git a/modules/dbingres.c b/modules/dbingres.c
new file mode 100644
index 00000000..9912833c
--- /dev/null
+++ b/modules/dbingres.c
@@ -0,0 +1,605 @@
+/*
+ Copyright (C) 2006 DBMail.EU support@dbmail.eu
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/**
+ * dbingres.c
+ * Ingres2006 driver file
+ * Handles connection and queries to Ingres backend
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "db.h"
+#include "iiapi.h" /* Ingres header */
+#include "dbmail.h"
+#include "dbmailtypes.h"
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+
+#define THIS_MODULE "sql"
+
+const char * db_get_sql(sql_fragment_t frag)
+{
+ switch(frag) {
+ case SQL_TO_CHAR: //FIXME??
+ return "%s";
+ break;
+ case SQL_TO_DATE:
+ return "DATE('%s')";
+ break;
+ case SQL_CURRENT_TIMESTAMP:
+ return "DATE('NOW')";
+ break;
+ case SQL_REPLYCACHE_EXPIRE:
+ return "DATE('NOW') - '%d DAY'";
+ break;
+ case SQL_BINARY:
+ return "";
+ break;
+ case SQL_SENSITIVE_LIKE:
+ return "LIKE";
+ break;
+ case SQL_INSENSITIVE_LIKE: //FIXME
+ return "LIKE";
+ break;
+ case SQL_ENCODE_ESCAPE: //FIXME?
+ return "'%s'";
+ break;
+ default:
+ return "";
+ break;
+
+ }
+ return NULL;
+}
+
+static II_PTR conn = (II_PTR)NULL;
+static II_PTR envhandle = (II_PTR)NULL;
+static II_PTR res = (II_PTR)NULL; // statement (result) handler
+static II_PTR trn = (II_PTR)NULL; // transaction handler
+static IIAPI_GETCOLPARM cparm;
+static gboolean _in_transaction = FALSE;
+
+db_param_t _db_params;
+
+static IIAPI_STATUS _db_wait(IIAPI_GENPARM *gp){
+ IIAPI_WAITPARM wt;
+
+ for( wt.wt_timeout = -1 ; ! gp->gp_completed ; )
+ IIapi_wait(&wt);
+ return gp->gp_status;
+}
+
+
+static IIAPI_GETDESCRPARM get_getDescriptor(void)
+{
+ IIAPI_GETDESCRPARM gd;
+ IIAPI_STATUS status;
+
+ g_return_val_if_fail(res != NULL, gd);
+
+ gd.gd_genParm.gp_callback = NULL;
+ gd.gd_genParm.gp_closure = NULL;
+ gd.gd_stmtHandle = res;
+ gd.gd_descriptorCount = 0;
+ gd.gd_descriptor = NULL;
+
+ IIapi_getDescriptor( &gd );
+
+ status = _db_wait (&gd.gd_genParm);
+ if (status >= IIAPI_ST_ERROR)
+ TRACE(TRACE_ERROR, "failed");
+
+ return gd;
+}
+
+static void get_all_results(void)
+{
+ unsigned col, row;
+ unsigned rowsleft = 0;
+ unsigned r,c;
+ IIAPI_GETDESCRPARM dp;
+ IIAPI_DATAVALUE *DataBuffer;
+ IIAPI_STATUS status;
+
+ if (cparm.gc_columnData != NULL)
+ return;
+
+ dp = get_getDescriptor();
+ col = db_num_fields();
+ row = db_num_rows();
+
+ if (row < 1 || col < 1)
+ return;
+
+ DataBuffer = g_new0(IIAPI_DATAVALUE, (row * col)+1);
+
+ cparm.gc_genParm.gp_callback = NULL;
+ cparm.gc_genParm.gp_closure = NULL;
+ cparm.gc_moreSegments = 0;
+ cparm.gc_columnData = DataBuffer;
+ cparm.gc_stmtHandle = res;
+ cparm.gc_columnCount = col;
+ cparm.gc_rowCount = 1;
+
+ for (r=0; r<row; r++) {
+ for (c=0; c<col; c++) {
+ cparm.gc_columnData[(r*col)+c].dv_value = g_new0(char,dp.gd_descriptor[c].ds_length);
+ }
+ }
+
+ cparm.gc_columnData[row*col].dv_value = NULL;
+
+ rowsleft = row;
+ do {
+ // FIXME: we can do better here if there's no
+ // IIAPI_LBYTE_TYPE or IIAPI_LVCH_TYPE being
+ // returned
+ //
+ //cparm.gc_rowCount = rowsleft;
+
+ IIapi_getColumns( &cparm );
+
+ status = _db_wait(&cparm.gc_genParm);
+ if (status < IIAPI_ST_ERROR)
+ rowsleft = row - cparm.gc_rowsReturned;
+ else {
+ TRACE(TRACE_ERROR, "failed");
+ break;
+ }
+
+ } while (cparm.gc_moreSegments || rowsleft > 0);
+
+
+}
+
+
+static void db_init(II_PTR *envhandle)
+{
+ IIAPI_INITPARM initparm;
+
+ if (*envhandle)
+ return;
+
+ initparm.in_version = IIAPI_VERSION_2;
+ initparm.in_timeout = -1;
+ IIapi_initialize(&initparm);
+ *envhandle = initparm.in_envHandle;
+ return;
+}
+
+static void db_term(II_PTR *envhandle)
+{
+
+ IIAPI_RELENVPARM relenvparm;
+ IIAPI_TERMPARM termparm;
+
+ relenvparm.re_envHandle = *envhandle;
+ IIapi_releaseEnv( &relenvparm );
+ IIapi_terminate( &termparm );
+
+ *envhandle = NULL;
+}
+
+static void _db_autocommit(void)
+{
+ IIAPI_AUTOPARM ac;
+ IIAPI_STATUS status;
+ gboolean ac_state = FALSE;
+
+ if (trn)
+ ac_state = TRUE;
+
+
+ ac.ac_genParm.gp_callback = NULL;
+ ac.ac_genParm.gp_closure = NULL;
+ ac.ac_connHandle = conn;
+ ac.ac_tranHandle = trn;
+
+ IIapi_autocommit( &ac );
+
+ status = _db_wait(&ac.ac_genParm);
+ if (status < IIAPI_ST_ERROR) {
+ TRACE(TRACE_DEBUG,"%s", ac_state ? "disabled" : "enabled");
+ if (ac_state)
+ trn = NULL;
+ else
+ trn = ac.ac_tranHandle;
+ } else {
+ TRACE(TRACE_ERROR,"toggle failed");
+ }
+ return;
+}
+
+int db_connect(void)
+{
+ gchar *target;
+ IIAPI_CONNPARM co;
+ IIAPI_STATUS status;
+
+ target = g_strdup_printf("%s::%s", _db_params.host, _db_params.db);
+
+ db_init(&envhandle);
+
+ co.co_genParm.gp_callback = NULL;
+ co.co_genParm.gp_closure = NULL;
+ co.co_target = target;
+ co.co_connHandle = conn;
+ co.co_tranHandle = NULL;
+ co.co_username = _db_params.user;
+ co.co_password = _db_params.pass;
+ co.co_timeout = -1;
+
+ IIapi_connect ( &co );
+
+ status = _db_wait(&co.co_genParm);
+ if (status < IIAPI_ST_ERROR) {
+ conn = co.co_connHandle;
+ _db_autocommit();
+ } else {
+ TRACE(TRACE_ERROR, "failed");
+ db_disconnect();
+ return -1;
+ }
+
+ return 0;
+}
+
+int db_check_connection() {
+ if (!conn)
+ return db_connect();
+
+ // TODO
+
+ return 0;
+}
+
+int db_disconnect()
+{
+ IIAPI_DISCONNPARM dc;
+ IIAPI_STATUS status;
+ int result = 0;
+
+ if (res)
+ db_free_result();
+
+ dc.dc_genParm.gp_callback = NULL;
+ dc.dc_genParm.gp_closure = NULL;
+ dc.dc_connHandle = conn;
+
+ IIapi_disconnect ( &dc );
+
+ status = _db_wait(&dc.dc_genParm);
+
+ if (status >= IIAPI_ST_ERROR) {
+ TRACE(TRACE_ERROR, "failed");
+ result = -1;
+ }
+
+ db_term(&envhandle);
+ return result;
+}
+
+static int _db_commit(II_PTR tran)
+{
+ IIAPI_COMMITPARM cm;
+ IIAPI_CLOSEPARM cl;
+ IIAPI_STATUS status;
+ int result = 0;
+
+ if (! tran)
+ return -1;
+
+ TRACE(TRACE_DEBUG, "commit transaction");
+
+ cm.cm_genParm.gp_callback = NULL;
+ cm.cm_genParm.gp_closure = NULL;
+ cm.cm_tranHandle = tran;
+
+ IIapi_commit ( &cm );
+
+ status = _db_wait(&cm.cm_genParm);
+
+ if (status >= IIAPI_ST_ERROR) {
+ TRACE(TRACE_ERROR, "commit failed");
+ result = -1;
+ }
+
+ cl.cl_genParm.gp_callback = NULL;
+ cl.cl_genParm.gp_closure = NULL;
+ cl.cl_stmtHandle = tran;
+
+ IIapi_close( &cl );
+
+ status = _db_wait(&cl.cl_genParm);
+ if (status >= IIAPI_ST_ERROR) {
+ TRACE(TRACE_ERROR, "close failed");
+ result = -1;
+ }
+
+ return result;
+}
+
+int db_query(const char *q)
+{
+ IIAPI_QUERYPARM qp;
+ IIAPI_STATUS status;
+ int result = 0;
+
+ db_free_result();
+
+ g_return_val_if_fail(q != NULL,DM_EQUERY);
+
+ if (db_check_connection())
+ return DM_EQUERY;
+
+ TRACE(TRACE_DEBUG, "[%s]", q);
+
+ if (strncasecmp("BEGIN",q,5)==0) {
+ _in_transaction = 1;
+ _db_autocommit(); // turn off autocommit;
+ return 0;
+ }
+ if (strncasecmp("COMMIT",q,6)==0) {
+ _db_commit(trn);
+ _in_transaction = 0;
+ _db_autocommit(); // turn on autocommit;
+ trn = NULL;
+ return 0;
+ }
+
+ qp.qy_genParm.gp_callback = NULL;
+ qp.qy_genParm.gp_closure = NULL;
+ qp.qy_connHandle = conn;
+ qp.qy_queryType = IIAPI_QT_QUERY;
+ qp.qy_queryText = (char *)q;
+ qp.qy_parameters = FALSE;
+ qp.qy_tranHandle = trn;
+ qp.qy_stmtHandle = NULL;
+
+ IIapi_query ( &qp );
+
+ status = _db_wait(&qp.qy_genParm);
+
+ if (status >= IIAPI_ST_ERROR) {
+ TRACE(TRACE_ERROR, "failed");
+ result = -1;
+ }
+
+ res = qp.qy_stmtHandle;
+
+ if (_in_transaction) {
+ trn = res;
+ } else {
+ _db_commit(trn);
+ trn = NULL;
+ }
+
+ return result;
+}
+
+
+unsigned db_num_rows()
+{
+ IIAPI_GETQINFOPARM gq;
+ IIAPI_STATUS status;
+
+ if (!res)
+ return 0;
+
+ gq.gq_genParm.gp_callback = NULL;
+ gq.gq_genParm.gp_closure = NULL;
+ gq.gq_stmtHandle = res;
+ gq.gq_mask = IIAPI_GQ_ROW_COUNT;
+
+ IIapi_getQueryInfo ( &gq );
+
+ status = _db_wait (&gq.gq_genParm);
+ if (status >= IIAPI_ST_ERROR) {
+ TRACE(TRACE_ERROR, "failed");
+ return 0;
+ }
+
+ return (unsigned)gq.gq_rowCount;
+}
+
+unsigned db_num_fields()
+{
+ IIAPI_GETDESCRPARM gd;
+
+ if (!res)
+ return 0;
+
+ gd = get_getDescriptor();
+
+ return (unsigned)gd.gd_descriptorCount;
+}
+
+void db_free_result()
+{
+ II_LONG f = 0;
+ IIAPI_CLOSEPARM cl;
+ IIAPI_STATUS status;
+
+ if (! res)
+ return;
+
+ cl.cl_genParm.gp_callback = NULL;
+ cl.cl_genParm.gp_closure = NULL;
+ cl.cl_stmtHandle = res;
+
+ IIapi_close( &cl );
+
+ status = _db_wait(&cl.cl_genParm);
+ if (status >= IIAPI_ST_ERROR)
+ TRACE(TRACE_ERROR, "close failed");
+
+ res = NULL;
+ if (cparm.gc_columnData == NULL)
+ return;
+
+ while (cparm.gc_columnData[f].dv_value)
+ g_free(cparm.gc_columnData[f++].dv_value);
+
+ g_free(cparm.gc_columnData);
+ cparm.gc_columnData = NULL;
+
+ return;
+}
+const char *db_get_result(unsigned row, unsigned field)
+{
+ unsigned rows, fields;
+
+ if (!res) {
+ TRACE(TRACE_WARNING, "result set is NULL");
+ return NULL;
+ }
+
+ rows = db_num_rows();
+ fields = db_num_fields();
+
+ if ((row > rows) || (field > fields)) {
+ TRACE(TRACE_WARNING, "row = %u or field = %u out of range", row, field);
+ return NULL;
+ }
+
+ get_all_results();
+
+ return cparm.gc_columnData[row*fields+field].dv_value;
+
+}
+
+u64_t db_insert_result(const char *seq_id)
+{
+ return db_sequence_currval(seq_id);
+}
+
+u64_t db_sequence_currval(const char *seq_id)
+{
+ char query[DEF_QUERYSIZE];
+ u64_t seq;
+
+ snprintf(query, DEF_QUERYSIZE, "SELECT %s%s_seq.currval",_db_params.pfx, seq_id);
+
+ db_query(query);
+ if (db_num_rows() == 0) {
+ db_free_result();
+ return 0;
+ }
+ seq = strtoull(db_get_result(0, 0), NULL, 10);
+ db_free_result();
+
+ TRACE(TRACE_DEBUG, "return-value: %llu", seq);
+
+ return seq;
+}
+
+u64_t db_sequence_nextval(const char *seq_id)
+{
+ char query[DEF_QUERYSIZE];
+ u64_t seq;
+
+ snprintf(query, DEF_QUERYSIZE, "SELECT %s%s_seq.nextval",_db_params.pfx, seq_id);
+
+ db_query(query);
+ if (db_num_rows() == 0) {
+ db_free_result();
+ return 0;
+ }
+ seq = strtoull(db_get_result(0, 0), NULL, 10);
+ db_free_result();
+
+ TRACE(TRACE_DEBUG, "return-value: %llu", seq);
+
+ return seq;
+}
+
+unsigned long db_escape_string(char *to, const char *from, unsigned long length)
+{
+ unsigned long did = 0;
+ while (*from && did < length) {
+ if (*from == '\'')
+ *to++ = *from;
+ *to++ = *from++;
+ did++;
+ }
+ *to++ = '\0';
+ return did;
+}
+
+unsigned long db_escape_binary(char *to,
+ const char *from, unsigned long length)
+{
+ static char *hex = "0123456789ABCDEF";
+ const char *q;
+ *to++ = 'X';
+ *to++ = '\'';
+ for(q = from; length--;){
+ *to++ = hex[(*q) >> 4];
+ *to++ = hex[(*q) & 0xf];
+ ++q;
+ }
+ *to++ = '\'';
+ *to = '\0';
+ return length*2+4;
+}
+
+int db_do_cleanup(const char UNUSED **tables, int UNUSED num_tables)
+{
+ int result = 0;
+ // FIXME: does ingres need this?
+ return result;
+}
+
+u64_t db_get_length(unsigned UNUSED row, unsigned field)
+{
+ IIAPI_GETDESCRPARM dp;
+
+ if (!res) {
+ TRACE(TRACE_WARNING, "result set is NULL");
+ return 0;
+ }
+
+ if ((row >= db_num_rows()) || (field >= db_num_fields())) {
+ TRACE(TRACE_ERROR, "row = %u or field = %u out of range", row, field);
+ return 0;
+ }
+
+ dp = get_getDescriptor();
+ return (u64_t)dp.gd_descriptor[field].ds_length;
+}
+
+u64_t db_get_affected_rows()
+{
+ return db_num_rows();
+}
+
+void *db_get_result_set()
+{
+ return (void *) res;
+}
+
+void db_set_result_set(void *the_result_set)
+{
+ res = (II_PTR)the_result_set;
+}
diff --git a/modules/dbmysql.c b/modules/dbmysql.c
index bc980ab1..e1ff3c1b 100644
--- a/modules/dbmysql.c
+++ b/modules/dbmysql.c
@@ -50,9 +50,6 @@ const char * db_get_sql(sql_fragment_t frag)
case SQL_BINARY:
return "BINARY";
break;
- case SQL_REGEXP:
- return "REGEXP";
- break;
case SQL_SENSITIVE_LIKE:
return "LIKE BINARY";
break;
@@ -62,6 +59,9 @@ const char * db_get_sql(sql_fragment_t frag)
case SQL_ENCODE_ESCAPE:
return "%s";
break;
+ case SQL_SEQ_NEXTVAL:
+ return "NULL";
+ break;
}
return NULL;
}
@@ -266,9 +266,17 @@ int db_check_connection()
u64_t db_insert_result(const char *sequence_identifier UNUSED)
{
- u64_t insert_result;
- insert_result = mysql_insert_id(&conn);
- return insert_result;
+ return (u64_t)mysql_insert_id(&conn);
+}
+
+u64_t db_sequence_currval(const char *sequence_identifier UNUSED)
+{
+ return (u64_t)mysql_insert_id(&conn);
+}
+
+u64_t db_sequence_nextval(const char *sequence_identifier UNUSED)
+{
+ return 0; // make this trigger the use of NULL in the ensuing INSERT
}
int db_query(const char *q)
diff --git a/modules/dbpgsql.c b/modules/dbpgsql.c
index 699daf53..c1d90424 100644
--- a/modules/dbpgsql.c
+++ b/modules/dbpgsql.c
@@ -57,9 +57,6 @@ const char * db_get_sql(sql_fragment_t frag)
case SQL_BINARY:
return "";
break;
- case SQL_REGEXP:
- return "~";
- break;
case SQL_SENSITIVE_LIKE:
return "LIKE";
break;
@@ -69,6 +66,10 @@ const char * db_get_sql(sql_fragment_t frag)
case SQL_ENCODE_ESCAPE:
return "ENCODE(%s::bytea,'escape')";
break;
+ case SQL_SEQ_NEXTVAL:
+ default:
+ return "";
+ break;
}
return NULL;
}
@@ -247,11 +248,15 @@ const char *db_get_result(unsigned row, unsigned field)
u64_t db_insert_result(const char *sequence_identifier)
{
+ return db_sequence_currval(sequence_identifier);
+}
+
+u64_t db_sequence_currval(const char *sequence_identifier)
+{
char query[DEF_QUERYSIZE];
- u64_t insert_result;
+ memset(query,0,DEF_QUERYSIZE);
+ u64_t seq;
- /* postgres uses the currval call on a sequence to determine
- * the result value of an insert query */
snprintf(query, DEF_QUERYSIZE,
"SELECT currval('%s%s_seq')",_db_params.pfx, sequence_identifier);
@@ -260,11 +265,30 @@ u64_t db_insert_result(const char *sequence_identifier)
db_free_result();
return 0;
}
- insert_result = strtoull(db_get_result(0, 0), NULL, 10);
+ seq = strtoull(db_get_result(0, 0), NULL, 10);
+ db_free_result();
+ return seq;
+}
+
+u64_t db_sequence_nextval(const char *sequence_identifier UNUSED)
+{
+ char query[DEF_QUERYSIZE];
+ u64_t seq;
+
+ snprintf(query, DEF_QUERYSIZE,
+ "SELECT nextval('%s%s_seq')",_db_params.pfx, sequence_identifier);
+
+ db_query(query);
+ if (db_num_rows() == 0) {
+ db_free_result();
+ return 0;
+ }
+ seq = strtoull(db_get_result(0, 0), NULL, 10);
db_free_result();
- return insert_result;
+ return seq;
}
+
int db_query(const char *q)
{
int PQresultStatusVar;
diff --git a/modules/dbsqlite.c b/modules/dbsqlite.c
index 65cbfdd1..808b826f 100644
--- a/modules/dbsqlite.c
+++ b/modules/dbsqlite.c
@@ -56,11 +56,6 @@ const char * db_get_sql(sql_fragment_t frag)
case SQL_BINARY:
return "";
break;
- case SQL_REGEXP:
- TRACE(TRACE_ERROR, "We deliberately don't support REGEXP operations.");
- sqlite3_close(conn);
- exit(255);
- break;
/* some explaining:
*
* sqlite3 has a limited number of A x B operators: LIKE, GLOB, REGEXP.
@@ -75,6 +70,10 @@ const char * db_get_sql(sql_fragment_t frag)
case SQL_INSENSITIVE_LIKE:
return "LIKE";
break;
+ case SQL_SEQ_NEXTVAL:
+ default:
+ return "NULL";
+ break;
}
return NULL;
}
@@ -303,6 +302,16 @@ u64_t db_insert_result(const char *sequence_identifier UNUSED)
return (u64_t)sqlite3_last_insert_rowid(conn);
}
+u64_t db_sequence_currval(const char *sequence_identifier)
+{
+ return db_insert_result(sequence_identifier);
+}
+
+u64_t db_sequence_nextval(const char *sequence_identifier UNUSED)
+{
+ return 0; // make this trigger the use of NULL in the ensuing INSERT
+}
+
int db_query(const char *the_query)
{
char *errmsg;
diff --git a/pipe.c b/pipe.c
index f7e08793..081ce711 100644
--- a/pipe.c
+++ b/pipe.c
@@ -53,8 +53,13 @@ static int parse_and_escape(const char *in, char **out)
TRACE(TRACE_DEBUG, "parsing address [%s]", in);
ialist = internet_address_parse_string(in);
- ia = ialist->address;
- if (ia->type != INTERNET_ADDRESS_NAME) {
+ if (!ialist) {
+ TRACE(TRACE_MESSAGE, "unable to parse email address [%s]", in);
+ return -1;
+ }
+
+ ia = ialist->address;
+ if (!ia || ia->type != INTERNET_ADDRESS_NAME) {
TRACE(TRACE_MESSAGE, "unable to parse email address [%s]", in);
internet_address_list_destroy(ialist);
return -1;
@@ -116,8 +121,15 @@ static int send_mail(struct DbmailMessage *message,
}
if (!sendmail_external) {
- parse_and_escape(to, &escaped_to);
- parse_and_escape(from, &escaped_from);
+ if (parse_and_escape(to, &escaped_to) < 0) {
+ TRACE(TRACE_MESSAGE, "could not prepare 'to' address.");
+ return 1;
+ }
+ if (parse_and_escape(from, &escaped_from) < 0) {
+ dm_free(escaped_to);
+ TRACE(TRACE_MESSAGE, "could not prepare 'from' address.");
+ return 1;
+ }
sendmail_command = g_strconcat(sendmail, " -f ", escaped_from, " ", escaped_to, NULL);
dm_free(escaped_to);
dm_free(escaped_from);
diff --git a/serverparent.c b/serverparent.c
index 975bdeca..bc2b28e4 100644
--- a/serverparent.c
+++ b/serverparent.c
@@ -154,10 +154,11 @@ int serverparent_mainloop(serverConfig_t *config, const char *service, const cha
config->stateFile = config_get_statefile(config, servicename);
statefile_create(config->stateFile);
- /* Reread the config file. */
+ /* This is the actual main loop. */
while (!mainStop && server_run(config)) {
- DoConfig(config, service);
- }
+ /* Reread the config file and restart the services,
+ * e.g. on SIGHUP or other graceful restart condition. */
+ DoConfig(config, service); }
TRACE(TRACE_INFO, "leaving main loop");
return 0;
diff --git a/sql/mysql/create_tables.mysql b/sql/mysql/create_tables.mysql
index 2616f7c6..b2ad7284 100644
--- a/sql/mysql/create_tables.mysql
+++ b/sql/mysql/create_tables.mysql
@@ -236,6 +236,7 @@ CREATE TABLE dbmail_headervalue (
UNIQUE (physmessage_id, id),
UNIQUE (physmessage_id, headername_id, headervalue(255)),
INDEX (headername_id),
+ INDEX (physmessage_id),
FOREIGN KEY (headername_id)
REFERENCES dbmail_headername(id) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (physmessage_id)
diff --git a/sql/mysql/migrate_from_2.0_to_2.2.mysql b/sql/mysql/migrate_from_2.0_to_2.2.mysql
index 86a92b7a..05957caf 100644
--- a/sql/mysql/migrate_from_2.0_to_2.2.mysql
+++ b/sql/mysql/migrate_from_2.0_to_2.2.mysql
@@ -49,6 +49,7 @@ CREATE TABLE dbmail_headervalue (
UNIQUE (physmessage_id, id),
UNIQUE (physmessage_id, headername_id, headervalue(255)),
INDEX (headername_id),
+ INDEX (physmessage_id),
FOREIGN KEY (headername_id)
REFERENCES dbmail_headername(id) ON UPDATE CASCADE ON DELETE CASCADE,
FOREIGN KEY (physmessage_id)
diff --git a/sql/postgresql/create_tables.pgsql b/sql/postgresql/create_tables.pgsql
index 130c6e81..d6c42be0 100644
--- a/sql/postgresql/create_tables.pgsql
+++ b/sql/postgresql/create_tables.pgsql
@@ -195,8 +195,7 @@ CREATE TABLE dbmail_headername (
headername VARCHAR(100) NOT NULL DEFAULT '',
PRIMARY KEY (id)
);
-CREATE UNIQUE INDEX dbmail_headername_1 on dbmail_headername(headername);
-
+CREATE UNIQUE INDEX dbmail_headername_1 on dbmail_headername(lower(headername));
CREATE SEQUENCE dbmail_headervalue_idnr_seq;
CREATE TABLE dbmail_headervalue (
@@ -211,6 +210,7 @@ CREATE TABLE dbmail_headervalue (
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX dbmail_headervalue_1 ON dbmail_headervalue(physmessage_id, id);
+CREATE INDEX dbmail_headervalue_2 ON dbmail_headervalue(physmessage_id);
CREATE SEQUENCE dbmail_subjectfield_idnr_seq;
diff --git a/sql/postgresql/migrate_from_2.0_to_2.2.pgsql b/sql/postgresql/migrate_from_2.0_to_2.2.pgsql
index eb29564d..45288cd5 100644
--- a/sql/postgresql/migrate_from_2.0_to_2.2.pgsql
+++ b/sql/postgresql/migrate_from_2.0_to_2.2.pgsql
@@ -40,7 +40,7 @@ CREATE TABLE dbmail_headername (
headername VARCHAR(100) NOT NULL DEFAULT '',
PRIMARY KEY (id)
);
-CREATE UNIQUE INDEX dbmail_headername_1 on dbmail_headername(headername);
+CREATE UNIQUE INDEX dbmail_headername_1 on dbmail_headername(lower(headername));
CREATE SEQUENCE dbmail_headervalue_idnr_seq;
@@ -56,6 +56,7 @@ CREATE TABLE dbmail_headervalue (
PRIMARY KEY (id)
);
CREATE UNIQUE INDEX dbmail_headervalue_1 ON dbmail_headervalue(physmessage_id, id);
+CREATE INDEX dbmail_headervalue_2 ON dbmail_headervalue(physmessage_id);
-- provide separate storage of commonly used headers
diff --git a/sql/sqlite/create_tables.sqlite b/sql/sqlite/create_tables.sqlite
index 29f38c51..f0bac40c 100644
--- a/sql/sqlite/create_tables.sqlite
+++ b/sql/sqlite/create_tables.sqlite
@@ -467,6 +467,7 @@ CREATE TABLE dbmail_headervalue (
CREATE UNIQUE INDEX dbmail_headervalue_1 on dbmail_headervalue (physmessage_id, id);
CREATE UNIQUE INDEX dbmail_headervalue_2 on dbmail_headervalue (physmessage_id, headername_id, headervalue);
CREATE INDEX dbmail_headervalue_3 on dbmail_headervalue(headername_id);
+CREATE INDEX dbmail_headervalue_4 on dbmail_headervalue(physmessage_id);
-- FOREIGN KEY (headername_id)
-- REFERENCES dbmail_headername(id) ON UPDATE CASCADE ON DELETE CASCADE,
diff --git a/test-scripts/testfetch.txt b/test-scripts/testfetch.txt
index cf50ec20..a7c37f5a 100644
--- a/test-scripts/testfetch.txt
+++ b/test-scripts/testfetch.txt
@@ -6,4 +6,5 @@ C00004 LSUB "" "*"
C00005 SELECT INBOX
C00006 UID FETCH 1:* (FLAGS RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE FROM TO CC SUBJECT REFERENCES IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE)])
C00007 UID FETCH 1:* (BODY.PEEK[HEADER.FIELDS (References X-Ref X-Priority X-MSMail-Priority X-MSOESRec Newsgroups)] ENVELOPE RFC822.SIZE UID FLAGS INTERNALDATE)
+C00008 UID FETCH 1:* (UID RFC822.SIZE BODY.PEEK[])
C00009 LOGOUT
diff --git a/test-scripts/testimap.py b/test-scripts/testimap.py
index b06ce25e..b78316bc 100755
--- a/test-scripts/testimap.py
+++ b/test-scripts/testimap.py
@@ -16,7 +16,11 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+<<<<<<< master
# $Id$
+=======
+# $Id$
+>>>>>>> dbmail_2_2
# For a protocol trace set to 4
DEBUG = 0
@@ -42,7 +46,7 @@ HOST,PORT = "localhost", 143
# for stdin/stdout testing
DAEMONBIN = "./dbmail-imapd -n -f /etc/dbmail/dbmail-test.conf"
# with valgrind
-#DAEMONBIN = "valgrind --suppressions=./contrib/dbmail.supp --leak-check=full %s" % DAEMONBIN
+DAEMONBIN = "valgrind --suppressions=./contrib/dbmail.supp --leak-check=full %s" % DAEMONBIN
TESTMSG={}
diff --git a/test-scripts/testsearch.imap b/test-scripts/testsearch.imap
index d1dbbfae..6ce7ba7f 100644
--- a/test-scripts/testsearch.imap
+++ b/test-scripts/testsearch.imap
@@ -8,3 +8,4 @@ a08 SEARCH charset US-ASCII ALL
a09 UID SEARCH charset US-ASCII ALL
a11 UID SEARCH charset US-ASCII SUBJECT "some test"
a12 SEARCH charset utf-8 SUBJECT "lars hase"
+a13 SEARCH charset utf-8 SUBJECT "������ ����"