aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dbmail
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-03 06:19:04 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-03 06:19:04 +0000
commit6f1dc21bd4e8ae7ef0d7afce465b2bc15d0ffa07 (patch)
tree1f70b259fe7fb5c82f437c6b006284893cf4eb5a /testing/dbmail
parent66765c30ac7a9c9a560ab43d5618de820fb373c6 (diff)
downloadaports-6f1dc21bd4e8ae7ef0d7afce465b2bc15d0ffa07.tar.bz2
aports-6f1dc21bd4e8ae7ef0d7afce465b2bc15d0ffa07.tar.xz
testing/*: removed
We dont ship testing things in a stable release
Diffstat (limited to 'testing/dbmail')
-rw-r--r--testing/dbmail/APKBUILD94
-rw-r--r--testing/dbmail/dbmail-httpd.initd39
-rw-r--r--testing/dbmail/dbmail-imapd.initd39
-rw-r--r--testing/dbmail/dbmail-lmtpd.initd40
-rw-r--r--testing/dbmail/dbmail-pop3d.initd39
-rw-r--r--testing/dbmail/dbmail-timsieved.initd38
-rw-r--r--testing/dbmail/dbmail.conf408
-rw-r--r--testing/dbmail/dbmail.pre-install5
-rw-r--r--testing/dbmail/post-rc3.patch635
9 files changed, 0 insertions, 1337 deletions
diff --git a/testing/dbmail/APKBUILD b/testing/dbmail/APKBUILD
deleted file mode 100644
index bc5c0cad11..0000000000
--- a/testing/dbmail/APKBUILD
+++ /dev/null
@@ -1,94 +0,0 @@
-# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
-pkgname=dbmail
-_realpkgver=3.0.0-rc3
-pkgver=${_realpkgver/-/_}
-pkgrel=1
-pkgdesc="Fast and scalable sql based mail services"
-url="http://dbmail.org"
-arch="all"
-license="GPL"
-pkgusers="dbmail"
-pkggroups="dbmail"
-depends=
-depends_dev="openldap-dev libsieve-dev glib-dev gmime-dev
- mhash-dev libevent-dev libzdb-dev"
-makedepends="$depends_dev asciidoc xmlto automake autoconf"
-install=""
-subpackages="$pkgname-doc $pkgname-auth-ldap:auth_ldap"
-source="http://www.dbmail.org/download/3.0/dbmail-${_realpkgver}.tar.gz
- $pkgname-imapd.initd
- $pkgname-lmtpd.initd
- $pkgname-pop3d.initd
- $pkgname-httpd.initd
- $pkgname-timsieved.initd
- $pkgname.pre-install
- post-rc3.patch
- dbmail.conf
- "
-
-_builddir="$srcdir/${pkgname}-${_realpkgver}"
-
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- # we need support for gmine 2.6
- sed -i 's/gmime-2.4/gmime-2.6/g' configure
-}
-
-build() {
- cd "$_builddir"
- ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --with-sieve \
- --with-ldap \
- --disable-static
- make || return 1
- # make man pages
- cd "$_builddir/man"
- make || return 1
-}
-
-package() {
- cd "$_builddir"
- make DESTDIR="$pkgdir" install || return 1
- rm "$pkgdir"/usr/lib/dbmail/*.la || return 1
- mkdir -p "$pkgdir/usr/share/$pkgname"
- mv sql/* "$pkgdir/usr/share/$pkgname/"
- mv "$pkgname.schema" "$pkgdir/usr/share/$pkgname/"
- for i in imapd lmtpd pop3d httpd timsieved; do
- install -Dm755 "$srcdir/$pkgname-$i.initd" \
- "$pkgdir/etc/init.d/dbmail-$i" || return 1
- done
- #install man pages
- cd "$_builddir/man"
- make DESTDIR="$pkgdir" install || return 1
- install -m644 -D "$srcdir"/$pkgname.conf \
- "$pkgdir"/etc/$pkgname.conf || return 1
- install -dDo dbmail "$pkgdir"/var/run/dbmail || return 1
- install -dDo dbmail "$pkgdir"/var/lib/dbmail || return 1
-}
-
-auth_ldap() {
- pkgdesc="$pkgname ldap authentication"
- mkdir -p "$subpkgdir"/usr/lib/dbmail
- mv "$pkgdir"/usr/lib/dbmail/libauth_ldap* \
- "$subpkgdir"/usr/lib/dbmail/ || return 1
-}
-
-md5sums="52c3b9aad310efc90a6a2fff0552f73e dbmail-3.0.0-rc3.tar.gz
-2f77092fade3b10123a47a5cce5b6a4a dbmail-imapd.initd
-f3a84b58ba878375ca088a0b544922cc dbmail-lmtpd.initd
-4273524211baefd9f32ea40ce9cb7dd1 dbmail-pop3d.initd
-1bf891189a6daf14254738d28f3c654f dbmail-httpd.initd
-4cd701bf1a8d292848fffe208afbe182 dbmail-timsieved.initd
-f146703e0c8c9badc92de152ac6f1e5b dbmail.pre-install
-f609d4cd01dbef95c6a1c498133a2065 post-rc3.patch
-549f2073f1c6ac902f783b493c0667d4 dbmail.conf"
diff --git a/testing/dbmail/dbmail-httpd.initd b/testing/dbmail/dbmail-httpd.initd
deleted file mode 100644
index 2bda360b6d..0000000000
--- a/testing/dbmail/dbmail-httpd.initd
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/sbin/runscript
-#
-
-PIDFILE="/var/run/dbmail/httpd.pid"
-
-depend() {
- need net
- use mysql
- use pgsql
- after mta
-}
-
-checkconfig() {
- if [ ! -e "/etc/dbmail.conf" ]; then
- eerror "You need to create apropriate config"
- eerror "/etc/dbmail.conf"
- return 1
- fi
- # Avoid using root's TMPDIR
- unset TMPDIR
-}
-
-start() {
- checkconfig && \
- ebegin "Starting DBMail HTTP daemon"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/dbmail-httpd \
- --name dbmail-httpd \
- -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping DBMail HTTP daemon"
- start-stop-daemon --stop --quiet --retry 5 \
- --pidfile ${PIDFILE}
- eend $?
-}
-
diff --git a/testing/dbmail/dbmail-imapd.initd b/testing/dbmail/dbmail-imapd.initd
deleted file mode 100644
index cd8ed89cd1..0000000000
--- a/testing/dbmail/dbmail-imapd.initd
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/sbin/runscript
-#
-
-PIDFILE="/var/run/dbmail/imapd.pid"
-
-depend() {
- need net
- use mysql
- use pgsql
- after mta
-}
-
-checkconfig() {
- if [ ! -e "/etc/dbmail.conf" ]; then
- eerror "You need to create apropriate config"
- eerror "/etc/dbmail.conf"
- return 1
- fi
- # Avoid using root's TMPDIR
- unset TMPDIR
-}
-
-start() {
- checkconfig && \
- ebegin "Starting DBMail IMAP daemon"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/dbmail-imapd \
- --name dbmail-imapd \
- -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping DBMail IMAP daemon"
- start-stop-daemon --stop --quiet --retry 5 \
- --pidfile ${PIDFILE}
- eend $?
-}
-
diff --git a/testing/dbmail/dbmail-lmtpd.initd b/testing/dbmail/dbmail-lmtpd.initd
deleted file mode 100644
index 38c0f552b2..0000000000
--- a/testing/dbmail/dbmail-lmtpd.initd
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/sbin/runscript
-#
-
-PIDFILE="/var/run/dbmail/lmtpd.pid"
-
-depend() {
- need net
- use mysql
- use pgsql
- after mta
-}
-
-checkconfig() {
- if [ ! -e "/etc/dbmail.conf" ]; then
- eerror "You need to create apropriate config"
- eerror "/etc/dbmail.conf"
- return 1
- fi
- # Avoid using root's TMPDIR
- unset TMPDIR
-}
-
-
-start() {
- checkconfig && \
- ebegin "Starting DBMail LMTP daemon"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/dbmail-lmtpd \
- --name dbmail-lmtpd \
- -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping DBMail LMTP daemon"
- start-stop-daemon --stop --quiet --retry 5 \
- --pidfile ${PIDFILE}
- eend $?
-}
-
diff --git a/testing/dbmail/dbmail-pop3d.initd b/testing/dbmail/dbmail-pop3d.initd
deleted file mode 100644
index 3ceb12efec..0000000000
--- a/testing/dbmail/dbmail-pop3d.initd
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/sbin/runscript
-#
-
-PIDFILE="/var/run/dbmail/pop3d.pid"
-
-depend() {
- need net
- use mysql
- use pgsql
- after mta
-}
-
-checkconfig() {
- if [ ! -e "/etc/dbmail.conf" ]; then
- eerror "You need to create apropriate config"
- eerror "/etc/dbmail.conf"
- return 1
- fi
- # Avoid using root's TMPDIR
- unset TMPDIR
-}
-
-start() {
- checkconfig && \
- ebegin "Starting DBMail POP3 daemon"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/dbmail-pop3d \
- --name dbmail-pop3d \
- -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping DBMail POP3 daemon"
- start-stop-daemon --stop --quiet --retry 5 \
- --pidfile ${PIDFILE}
- eend $?
-}
-
diff --git a/testing/dbmail/dbmail-timsieved.initd b/testing/dbmail/dbmail-timsieved.initd
deleted file mode 100644
index 4c6414c2a5..0000000000
--- a/testing/dbmail/dbmail-timsieved.initd
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/sbin/runscript
-#
-
-PIDFILE="/var/run/dbmail/timsieved.pid"
-
-depend() {
- need net
- use mysql
- use pgsql
- after mta
-}
-
-checkconfig() checkconfig() {
- if [ ! -e "/etc/dbmail.conf" ]; then
- eerror "You need to create apropriate config"
- eerror "/etc/dbmail.conf"
- return 1
- fi
- # Avoid using root's TMPDIR
- unset TMPDIR
-}
-
-start() {
- checkconfig && \
- ebegin "Starting DBMail SIEVE daemon"
- start-stop-daemon --start --quiet \
- --exec /usr/sbin/dbmail-timsieved \
- -- -p ${PIDFILE} -f /etc/dbmail.conf 2>&1
- eend $?
-}
-
-stop() {
- ebegin "Stopping DBMail SIEVE daemon"
- start-stop-daemon --stop --quiet --retry 5 \
- --pidfile ${PIDFILE}
- eend $?
-}
-
diff --git a/testing/dbmail/dbmail.conf b/testing/dbmail/dbmail.conf
deleted file mode 100644
index fdcb7ac7c0..0000000000
--- a/testing/dbmail/dbmail.conf
+++ /dev/null
@@ -1,408 +0,0 @@
-
-# (c) 2000-2006 IC&S, The Netherlands
-#
-# Configuration file for DBMAIL
-
-[DBMAIL]
-#
-# Database settings
-#
-
-#
-# Supported drivers are mysql, postgresql, sqlite.
-#
-driver = sqlite
-
-#
-# Supported drivers are sql, ldap.
-#
-authdriver = sql
-
-#
-# Host for database, set to localhost if database is on
-# the same host as dbmail and you want to use a local
-# socket for connecting.
-#
-host =
-
-#
-# If you want to use TCP/IP for connecting to the database,
-# and have the database running on a non-standard port.
-#
-sqlport =
-
-#
-# When using a local socket connection to the database, fill
-# in the path to the socket here (e.g. /var/run/mysql.sock).
-#
-sqlsocket =
-
-#
-# Database username.
-#
-user = dbmail
-
-#
-# Database password.
-#
-pass =
-
-#
-# Database name.
-#
-db = /var/lib/dbmail/dbmail.db
-
-#
-# Number of database connections per threaded daemon
-# This also determines the size of the worker threadpool
-#
-#max_db_connections = 10
-
-#
-# Table prefix. Defaults to "dbmail_" if not specified.
-#
-table_prefix = dbmail_
-
-#
-# encoding must match the database/table encoding.
-# i.e. latin1, utf8
-encoding = utf8
-
-#
-# messages with unknown encoding will be assumed to have
-# default_msg_encoding
-# i.e. iso8859-1, utf8
-default_msg_encoding = utf8
-
-#
-# Postmaster's email address for use in bounce messages.
-#
-#postmaster = DBMAIL-MAILER
-
-#
-# Sendmail executable for forwards, replies, notifies, vacations.
-# You may use pipes (|) in this command, for example:
-# dos2unix|/usr/sbin/sendmail works well with Qmail.
-# You may use quotes (") for executables with unusual names.
-#
-sendmail = /usr/sbin/sendmail
-
-#
-#
-# The following items can be overridden in the service-specific sections.
-#
-#
-
-#
-# Logging via stderr/log file and syslog
-#
-# Logging is broken up into 8 logging levels and each level can be indivually turned on or off.
-# The Stderr/log file logs all entries to stderr or the log file.
-# Syslog logging uses the facility mail and the logging level of the event for logging.
-# Syslog can then be configured to log data according to the levels.
-#
-# Set the log level to the sum of the values next to the levels you want to record.
-# 1 = Emergency
-# 2 = Alert
-# 4 = Critical
-# 8 = Error
-# 16 = Warning
-# 32 = Notice
-# 64 = Info
-# 128 = Debug
-# 256 = Database -> Logs at debug level
-#
-# Examples: 0 = Nothing
-# 31 = Emergency + Alert + Critical + Error + Warning
-# 511 = Everything
-#
-file_logging_levels = 7
-#
-syslog_logging_levels = 31
-
-#
-# Generate a log entry for database queries for the log level at number of seconds of query execution time.
-#
-query_time_info = 10
-query_time_notice = 20
-query_time_warning = 30
-
-#
-# Throw an exception is the query takes longer than query_timeout seconds
-query_timeout = 300
-
-#
-# Root privs are used to open a port, then privs
-# are dropped down to the user/group specified here.
-#
-effective_user = dbmail
-effective_group = dbmail
-
-#
-# The IPv4 and/or IPv6 addresses the services will bind to.
-# Use * for all local interfaces.
-# Use 127.0.0.1 for localhost only.
-# Separate multiple entries with spaces ( ) or commas (,).
-#
-bindip = 0.0.0.0 # IPv4 only - all IP's
-#bindip = :: # IPv4 and IPv6 - all IP's (linux)
-#bindip = :: # IPv6 only - all IP's (BSD)
-#bindip = 0.0.0.0,:: # IPv4 and IPv6 - all IP's (BSD)
-
-
-#
-# Idle time allowed before a connection is shut off.
-#
-timeout = 300
-
-#
-# Idle time allowed before a connection is shut off if you have not logged in yet.
-#
-login_timeout = 60
-
-#
-# If yes, resolves IP addresses to DNS names when logging.
-#
-resolve_ip = no
-
-#
-# If yes, keep statistics in the authlog table for connecting users
-#
-authlog = no
-
-#
-# logfile for stdout messages
-#
-logfile = /var/log/dbmail.log
-
-#
-# logfile for stderr messages
-#
-errorlog = /var/log/dbmail.err
-
-#
-# directory for storing PID files
-#
-pid_directory = /var/run/dbmail
-
-#
-# directory for locating libraries (normally has a sane default compiled-in)
-#
-library_directory = /usr/lib/dbmail
-
-#
-# SSL/TLS certificates
-#
-# A file containing a list of CAs in PEM format
-tls_cafile =
-
-# A file containing a PEM format certificate
-tls_cert =
-
-# A file containing a PEM format RSA or DSA key
-tls_key =
-
-# A cipher list string in the format given in ciphers(1)
-tls_ciphers =
-
-
-# hashing algorithm. You can select your favorite hash type
-# for generating unique ids for message parts.
-#
-# for valid values check mhash(3) but minus the MHASH_ prefix.
-#
-# if you ever change this value run 'dbmail-util --rehash' to
-# update the hash for all mimeparts.
-#
-# examples: MD5, SHA1, SHA256, SHA512, TIGER, WHIRLPOOL
-#
-hash_algorithm = SHA1
-
-
-
-[LMTP]
-port = 24
-#tls_port =
-
-
-[POP]
-port = 110
-#tls_port = 995
-
-# You can set an alternate banner to display when connecting to the service
-# banner = DBMAIL pop3 server ready to rock
-
-#
-# If yes, allows SMTP access from the host IP connecting by POP3.
-# This requires addition configuration of your MTA
-#
-pop_before_smtp = no
-
-[HTTP]
-port = 41380
-#
-# the httpd daemon provides full access to all users, mailboxes
-# and messages. Be very careful with this one!
-bindip = 127.0.0.1
-admin = admin:secret
-
-[IMAP]
-# You can set an alternate banner to display when connecting to the service
-# banner = imap 4r1 server (dbmail 2.3.x)
-
-#
-# Port to bind to.
-#
-port = 143
-#tls_port = 993
-
-#
-# IMAP prefers a longer timeout than other services.
-#
-timeout = 4000
-
-#
-# If yes, allows SMTP access from the host IP connecting by IMAP.
-# This requires addition configuration of your MTA
-#
-imap_before_smtp = no
-
-#
-# during IDLE, how many seconds between checking the mailbox
-# status (default: 30)
-#
-# idle_timeout = 30
-
-#
-# Provide a CAPABILITY to override the default
-#
-# capability = IMAP4 IMAP4rev1 AUTH=LOGIN ACL RIGHTS=texk NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE
-
-# Send '* STATUS "mailbox" (MESSAGES x RECENT x UNSEEN x NEXTUID x)'
-# for all subscribed mailboxes during IDLE (default: no)
-# note: EXPERIMENTAL (and most likely disabled in the code)
-#
-# idle_status = yes
-
-
-[SIEVE]
-#
-# Port to bind to.
-#
-port = 2000
-tls_port =
-
-
-[LDAP]
-port = 389
-version = 3
-hostname = ldap
-base_dn = ou=People,dc=mydomain,dc=com
-
-#
-# If your LDAP library supports ldap_initialize(), then you can use the
-# alternative LDAP server DSN like following.
-#
-# URI = ldap://127.0.0.1:389
-# URI = ldapi://%2fvar%2frun%2fopenldap%2fldapi/
-
-#
-# Leave blank for anonymous bind.
-# example: cn=admin,dc=mydomain,dc=com
-#
-bind_dn =
-
-#
-# Leave blank for anonymous bind.
-#
-bind_pw =
-scope = SubTree
-
-# AD users may want to set this to 'no' to disable
-# ldap referrals if you are seeing 'Operations errors'
-# in your logs
-#
-referrals = yes
-
-user_objectclass = top,account,dbmailUser
-forw_objectclass = top,account,dbmailForwardingAddress
-cn_string = uid
-field_passwd = userPassword
-field_uid = uid
-field_nid = uidNumber
-min_nid = 10000
-max_nid = 15000
-field_cid = gidNumber
-min_cid = 10000
-max_cid = 15000
-
-# a comma-separated list of attributes to match when searching
-# for users or forwards that match a delivery address. A match
-# on any of them is a hit.
-field_mail = mail
-
-# field that holds the mail-quota size for a user.
-field_quota = mailQuota
-
-# field that holds the forwarding address.
-field_fwdtarget = mailForwardingAddress
-
-# override the query string used to search for users
-# or forwards with a delivery address.
-# query_string = (mail=%s)
-
-[DELIVERY]
-#
-# Run Sieve scripts as messages are delivered.
-#
-SIEVE = yes
-
-#
-# Use 'user+mailbox@domain' format to deliver to a mailbox.
-#
-SUBADDRESS = yes
-
-#
-# Turn on/off the Sieve Vacation extension.
-#
-SIEVE_VACATION = yes
-
-#
-# Turn on/off the Sieve Notify extension
-#
-SIEVE_NOTIFY = yes
-
-#
-# Turn on/off additional Sieve debugging.
-#
-SIEVE_DEBUG = no
-
-
-# Use the auto_notify table to send email notifications.
-#
-AUTO_NOTIFY = no
-
-#
-# Use the auto_reply table to send away messages.
-#
-AUTO_REPLY = no
-
-#
-# Defaults to "NEW MAIL NOTIFICATION"
-#
-#AUTO_NOTIFY_SUBJECT =
-
-#
-# Defaults to POSTMASTER from the DBMAIL section.
-#
-#AUTO_NOTIFY_SENDER =
-
-
-# If you set this to 'yes' dbmail will check for duplicate
-# messages in the relevant mailbox during delivery using
-# the Message-ID header
-#
-suppress_duplicates = yes
-
-
-# end of configuration file
diff --git a/testing/dbmail/dbmail.pre-install b/testing/dbmail/dbmail.pre-install
deleted file mode 100644
index 1abaeb9c0a..0000000000
--- a/testing/dbmail/dbmail.pre-install
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-adduser -s /bin/false -D -H -h /var/lib/dbmail dbmail 2>/dev/null
-exit 0
-
diff --git a/testing/dbmail/post-rc3.patch b/testing/dbmail/post-rc3.patch
deleted file mode 100644
index 9d7e34be36..0000000000
--- a/testing/dbmail/post-rc3.patch
+++ /dev/null
@@ -1,635 +0,0 @@
-From b73172be67b4665b04c791f914cf284e01dea33c Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Mon, 15 Aug 2011 16:11:32 +0200
-Subject: [PATCH 1/8] fix broken SEARCH TEXT (#912)'
-
----
- src/dbmail-mailbox.c | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/src/dbmail-mailbox.c b/src/dbmail-mailbox.c
-index 3491105..09be275 100644
---- a/src/dbmail-mailbox.c
-+++ b/src/dbmail-mailbox.c
-@@ -1183,7 +1183,7 @@ static GTree * mailbox_search(DbmailMailbox *self, search_key_t *s)
-
- case IST_DATA_TEXT:
-
-- g_string_printf(q,"SELECT DISTINCT m.message_idnr"
-+ g_string_printf(q,"SELECT DISTINCT m.message_idnr "
- "FROM %smimeparts k "
- "LEFT JOIN %spartlists l ON k.id=l.part_id "
- "LEFT JOIN %sphysmessage p ON l.physmessage_id=p.id "
---
-1.7.7.1
-
-From cd5cc297ab1c05103c45f6ee903298eca5357a19 Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Sat, 20 Aug 2011 14:00:35 +0200
-Subject: [PATCH 2/8] fix dbmail.h generation (#916)
-
----
- acinclude.m4 | 2 +-
- configure | 2 +-
- src/dbmail.h.in | 4 +---
- 3 files changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 2d2960d..fbf702a 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -300,7 +300,7 @@ AC_DEFUN([DM_CHECK_ZDB], [dnl
- ])
-
- AC_DEFUN([DM_SET_SQLITECREATE], [dnl
-- SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\" \\\\/' sql/sqlite/create_tables.sqlite`
-+ SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\"/' -e '$!s/$/ \\\\/' sql/sqlite/create_tables.sqlite`
- ])
-
- AC_DEFUN([DM_CHECK_MATH], [dnl
-diff --git a/configure b/configure
-index 6be85f6..e9d6e84 100755
---- a/configure
-+++ b/configure
-@@ -6697,7 +6697,7 @@ if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
- fi
-
-
-- SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\" \\\\/' sql/sqlite/create_tables.sqlite`
-+ SQLITECREATE=`sed -e 's/\"/\\\"/g' -e 's/^/\"/' -e 's/$/\\\n\"/' -e '$!s/$/ \\\\/' sql/sqlite/create_tables.sqlite`
-
-
-
-diff --git a/src/dbmail.h.in b/src/dbmail.h.in
-index 956246a..15acc31 100644
---- a/src/dbmail.h.in
-+++ b/src/dbmail.h.in
-@@ -183,9 +183,7 @@
- ""
-
- /* include sql/sqlite/create_tables.sqlite for autocreation */
--#define DM_SQLITECREATE \
--@SQLITECREATE@
--""
-+#define DM_SQLITECREATE @SQLITECREATE@
-
- /** default directory and extension for pidfiles */
- #define DEFAULT_PID_DIR "@DM_STATEDIR@"
---
-1.7.7.1
-
-From 0e640aa861ceebebff59877440d084fa2dcd9efd Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Thu, 22 Sep 2011 16:39:53 +0200
-Subject: [PATCH 3/8] fix IDLE regression (#927)
-
----
- src/imapcommands.c | 2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/src/imapcommands.c b/src/imapcommands.c
-index 7bfe3c1..8159214 100644
---- a/src/imapcommands.c
-+++ b/src/imapcommands.c
-@@ -1113,6 +1113,7 @@ int _ic_idle(ImapSession *self)
- int idle_timeout = IDLE_TIMEOUT;
- field_t val;
-
-+ ci_cork(self->ci);
- GETCONFIGVALUE("idle_timeout", "IMAP", val);
- if ( strlen(val) && (idle_timeout = atoi(val)) <= 0 ) {
- TRACE(TRACE_ERR, "[%p] illegal value for idle_timeout [%s]", self, val);
-@@ -1125,6 +1126,7 @@ int _ic_idle(ImapSession *self)
- dbmail_imap_session_buff_printf(self, "+ idling\r\n");
- dbmail_imap_session_mailbox_status(self,TRUE);
- dbmail_imap_session_buff_flush(self);
-+ ci_uncork(self->ci);
-
- return 0;
- }
---
-1.7.7.1
-
-From a82434e61e10f7e3e6b5feefb12c341ad96229ea Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Fri, 21 Oct 2011 15:57:31 +0200
-Subject: [PATCH 4/8] handle hangups better during read (#932)
-
----
- src/imap4.c | 9 ++++++---
- 1 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/src/imap4.c b/src/imap4.c
-index 5fbf849..1d6869a 100644
---- a/src/imap4.c
-+++ b/src/imap4.c
-@@ -143,20 +143,23 @@ void imap_cb_read(void *arg)
- {
- ImapSession *session = (ImapSession *) arg;
-
-- TRACE(TRACE_DEBUG,"reading...");
--
- ci_read_cb(session->ci);
-
- size_t have = session->ci->read_buffer->len;
-+ size_t need = session->ci->rbuff_size;
-+
-+ int enough = (need>0?(have == 0):(have > 0));
-+
- int state = session->ci->client_state;
-
-+ TRACE(TRACE_DEBUG,"reading %d: %ld/%ld", enough, have, need);
- if (state & CLIENT_ERR) {
- ci_cork(session->ci);
- dbmail_imap_session_set_state(session,CLIENTSTATE_ERROR);
- return;
- }
- if (state & CLIENT_EOF) {
-- if (have)
-+ if (enough)
- imap_handle_input(session);
- else
- imap_session_bailout(session);
---
-1.7.7.1
-
-From f9f332c7b917c6b0683b0d43a0f614d675181855 Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Sat, 22 Oct 2011 13:53:12 +0200
-Subject: [PATCH 5/8] gracefully degrade after decoding error (#930)
-
----
- src/dbmail-message.c | 8 +++++---
- 1 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/src/dbmail-message.c b/src/dbmail-message.c
-index e62cfb4..cf8fc23 100644
---- a/src/dbmail-message.c
-+++ b/src/dbmail-message.c
-@@ -1457,12 +1457,11 @@ static int _header_value_get_id(const char *value, const char *sortfield, const
- CATCH(SQLException)
- LOG_SQLERROR;
- db_rollback_transaction(c);
-+ *id = 0;
- FINALLY
- db_con_close(c);
- END_TRY;
-
-- assert(*id);
--
- g_free(hash);
-
- return TRUE;
-@@ -1596,7 +1595,10 @@ static gboolean _header_cache(const char UNUSED *key, const char *header, gpoint
- g_free(value);
-
- /* Insert relation between physmessage, header name and header value */
-- _header_insert(self->physid, headername_id, headervalue_id);
-+ if (headervalue_id)
-+ _header_insert(self->physid, headername_id, headervalue_id);
-+ else
-+ TRACE(TRACE_INFO, "error inserting headervalue. skipping.");
-
- headervalue_id=0;
-
---
-1.7.7.1
-
-From 11bcc6294807be46ded604b23cad2648fcbf7c5b Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Sat, 22 Oct 2011 18:08:59 +0200
-Subject: [PATCH 6/8] reset timeout after idle is done (#932)
-
----
- src/imap4.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-diff --git a/src/imap4.c b/src/imap4.c
-index 1d6869a..69a7a7e 100644
---- a/src/imap4.c
-+++ b/src/imap4.c
-@@ -468,6 +468,7 @@ void dbmail_imap_session_reset(ImapSession *session)
- session->parser_state = FALSE;
- dbmail_imap_session_args_free(session, FALSE);
-
-+ session->ci->timeout->tv_sec = server_conf->timeout;
- ci_uncork(session->ci);
-
- return;
---
-1.7.7.1
-
-From 8dc7ab5ec45a4321af191fecd7da1f50d76d3ce1 Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Mon, 24 Oct 2011 16:23:59 +0200
-Subject: [PATCH 7/8] call database schema version check on all connections
-
----
- src/dm_db.c | 17 ++++++++++++-----
- src/main.c | 5 -----
- 2 files changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/src/dm_db.c b/src/dm_db.c
-index 22cfe95..ec516e8 100644
---- a/src/dm_db.c
-+++ b/src/dm_db.c
-@@ -216,7 +216,7 @@ int db_connect(void)
- db_connected = 3;
- db_con_close(c);
-
-- return 0;
-+ return db_check_version();
- }
-
- /* But sometimes this gets called after help text or an
-@@ -803,19 +803,26 @@ static void check_table_exists(C c, const char *table, const char *errormessage)
- int db_check_version(void)
- {
- C c = db_con_get();
-+ volatile int ok = 0;
- TRY
- check_table_exists(c, "physmessage", "pre-2.0 database incompatible. You need to run the conversion script");
- check_table_exists(c, "headervalue", "2.0 database incompatible. You need to add the header tables.");
-- check_table_exists(c, "envelope", "2.1 database incompatible. You need to add the envelopes table and run dbmail-util -by");
-- check_table_exists(c, "mimeparts", "2.3 database incompatible.");
-- check_table_exists(c, "header", "2.3.5 database incompatible - single instance header storage missing.");
-+ check_table_exists(c, "envelope", "2.1+ database incompatible. You need to add the envelopes table and run dbmail-util -by");
-+ check_table_exists(c, "mimeparts", "3.x database incompatible.");
-+ check_table_exists(c, "header", "3.x database incompatible - single instance header storage missing.");
-+ ok = 1;
- CATCH(SQLException)
- LOG_SQLERROR;
- FINALLY
- db_con_close(c);
- END_TRY;
-
-- return DM_SUCCESS;
-+ if (ok)
-+ TRACE(TRACE_DEBUG,"Tables OK");
-+ else
-+ TRACE(TRACE_WARNING,"Schema version incompatible. Bailing out");
-+
-+ return ok?DM_SUCCESS:DM_EQUERY;
- }
-
- /* test existence of usermap table */
-diff --git a/src/main.c b/src/main.c
-index f9c8328..4065997 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -240,11 +240,6 @@ int main(int argc, char *argv[])
- goto freeall;
- }
-
-- if (db_check_version() != 0) {
-- exitcode = EX_TEMPFAIL;
-- goto freeall;
-- }
--
- /* read the whole message */
- memset(buf, 0, sizeof(buf));
- while ( (n = read(fileno(stdin), (void *)buf, READ_SIZE-1)) > 0) {
---
-1.7.7.1
-
-From 105cfefa0a1cc7366b66c6759e05e46ae5a6e53c Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Sat, 29 Oct 2011 15:57:09 +0200
-Subject: [PATCH 8/8] gmime-2.6 compatibility (#935)
-
----
- src/dbmail-message.c | 5 ++---
- 1 files changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/src/dbmail-message.c b/src/dbmail-message.c
-index cf8fc23..8a1a66c 100644
---- a/src/dbmail-message.c
-+++ b/src/dbmail-message.c
-@@ -561,7 +561,7 @@ gboolean store_mime_object(GMimeObject *parent, GMimeObject *object, DbmailMessa
- // part of the rfc822 headers
- skiphead = TRUE;
-
-- g_mime_header_list_set_raw (GMIME_MESSAGE(object)->mime_part->headers, NULL);
-+ g_mime_header_list_set_stream (GMIME_MESSAGE(object)->mime_part->headers, NULL);
- mime_part = g_mime_message_get_mime_part((GMimeMessage *)object);
- } else
- mime_part = object;
-@@ -1744,8 +1744,7 @@ DbmailMessage * dbmail_message_construct(DbmailMessage *self,
- TRACE(TRACE_DEBUG, "from: [%s] to: [%s] subject: [%s] body: [%s]", from, to, subject, body);
- g_mime_message_set_sender(message, from);
- g_mime_message_set_subject(message, subject);
-- g_mime_object_set_header(GMIME_OBJECT(message), "To", to);
-- g_mime_message_add_recipient(message, GMIME_RECIPIENT_TYPE_TO, "", to);
-+ g_mime_message_add_recipient(message, GMIME_RECIPIENT_TYPE_TO, NULL, to);
-
- // construct mime-part
- mime_part = g_mime_part_new();
---
-1.7.7.1
-
-From e95bcfa3f470de0f385a88266bf07065e65695a2 Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Wed, 02 Nov 2011 04:30:45 +0000
-Subject: re-indent php code
-
----
-diff --git a/contrib/dbmailclient.php b/contrib/dbmailclient.php
-index ffe5cd0..0693c0a 100644
---- a/contrib/dbmailclient.php
-+++ b/contrib/dbmailclient.php
-@@ -190,137 +190,137 @@ class DBMailMessage extends DBMailMailbox
-
- class Curl
- {
-- public $cookie_file;
-- public $headers = array();
-- public $options = array();
-- public $referer = '';
-- public $user_agent = '';
-+ public $cookie_file;
-+ public $headers = array();
-+ public $options = array();
-+ public $referer = '';
-+ public $user_agent = '';
-
-- protected $error = '';
-- protected $handle;
-+ protected $error = '';
-+ protected $handle;
-
-
-- public function __construct()
-- {
-+ public function __construct()
-+ {
- $this->cookie_file = realpath('.').'/curl_cookie.txt';
-- $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ?
-- $_SERVER['HTTP_USER_AGENT'] :
-- 'Curl/PHP ' . PHP_VERSION . ' (http://github.com/shuber/curl/)';
-- }
--
-- public function delete($url, $vars = array())
-- {
-- return $this->request('DELETE', $url, $vars);
-- }
--
-- public function error()
-- {
-- return $this->error;
-- }
--
-- public function get($url, $vars = array())
-- {
-- if (!empty($vars)) {
-- $url .= (stripos($url, '?') !== false) ? '&' : '?';
-- $url .= http_build_query($vars, '', '&');
-- }
-- return $this->request('GET', $url);
-- }
--
-- public function post($url, $vars = array())
-- {
-- return $this->request('POST', $url, $vars);
-- }
--
-- public function put($url, $vars = array())
-- {
-- return $this->request('PUT', $url, $vars);
-- }
--
-- protected function request($method, $url, $vars = array())
-- {
-- $this->handle = curl_init();
--
-- # Set some default CURL options
-- curl_setopt($this->handle, CURLOPT_COOKIEFILE, $this->cookie_file);
-- curl_setopt($this->handle, CURLOPT_COOKIEJAR, $this->cookie_file);
-- curl_setopt($this->handle, CURLOPT_FOLLOWLOCATION, true);
-- curl_setopt($this->handle, CURLOPT_HEADER, true);
-- curl_setopt($this->handle, CURLOPT_POSTFIELDS, (is_array($vars) ? http_build_query($vars, '', '&') : $vars));
-- curl_setopt($this->handle, CURLOPT_REFERER, $this->referer);
-- curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, true);
-- curl_setopt($this->handle, CURLOPT_URL, $url);
-- curl_setopt($this->handle, CURLOPT_USERAGENT, $this->user_agent);
--
-- # Format custom headers for this request and set CURL option
-- $headers = array();
-- foreach ($this->headers as $key => $value) {
-- $headers[] = $key.': '.$value;
-- }
-- curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
--
-- # Determine the request method and set the correct CURL option
-- switch ($method) {
-- case 'GET':
-- curl_setopt($this->handle, CURLOPT_HTTPGET, true);
-- break;
-- case 'POST':
-- curl_setopt($this->handle, CURLOPT_POST, true);
-- break;
-- default:
-- curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $method);
-- }
--
-- # Set any custom CURL options
-- foreach ($this->options as $option => $value) {
-- curl_setopt($this->handle, constant('CURLOPT_'.str_replace('CURLOPT_', '', strtoupper($option))), $value);
-- }
--
-- $response = curl_exec($this->handle);
-- if ($response) {
-- $response = new CurlResponse($response);
-- } else {
-- $this->error = curl_errno($this->handle).' - '.curl_error($this->handle);
-- }
-- curl_close($this->handle);
-- return $response;
-- }
-+ $this->user_agent = isset($_SERVER['HTTP_USER_AGENT']) ?
-+ $_SERVER['HTTP_USER_AGENT'] :
-+ 'Curl/PHP ' . PHP_VERSION . ' (http://github.com/shuber/curl/)';
-+ }
-+
-+ public function delete($url, $vars = array())
-+ {
-+ return $this->request('DELETE', $url, $vars);
-+ }
-+
-+ public function error()
-+ {
-+ return $this->error;
-+ }
-+
-+ public function get($url, $vars = array())
-+ {
-+ if (!empty($vars)) {
-+ $url .= (stripos($url, '?') !== false) ? '&' : '?';
-+ $url .= http_build_query($vars, '', '&');
-+ }
-+ return $this->request('GET', $url);
-+ }
-+
-+ public function post($url, $vars = array())
-+ {
-+ return $this->request('POST', $url, $vars);
-+ }
-+
-+ public function put($url, $vars = array())
-+ {
-+ return $this->request('PUT', $url, $vars);
-+ }
-+
-+ protected function request($method, $url, $vars = array())
-+ {
-+ $this->handle = curl_init();
-+
-+ # Set some default CURL options
-+ curl_setopt($this->handle, CURLOPT_COOKIEFILE, $this->cookie_file);
-+ curl_setopt($this->handle, CURLOPT_COOKIEJAR, $this->cookie_file);
-+ curl_setopt($this->handle, CURLOPT_FOLLOWLOCATION, true);
-+ curl_setopt($this->handle, CURLOPT_HEADER, true);
-+ curl_setopt($this->handle, CURLOPT_POSTFIELDS, (is_array($vars) ? http_build_query($vars, '', '&') : $vars));
-+ curl_setopt($this->handle, CURLOPT_REFERER, $this->referer);
-+ curl_setopt($this->handle, CURLOPT_RETURNTRANSFER, true);
-+ curl_setopt($this->handle, CURLOPT_URL, $url);
-+ curl_setopt($this->handle, CURLOPT_USERAGENT, $this->user_agent);
-+
-+ # Format custom headers for this request and set CURL option
-+ $headers = array();
-+ foreach ($this->headers as $key => $value) {
-+ $headers[] = $key.': '.$value;
-+ }
-+ curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
-+
-+ # Determine the request method and set the correct CURL option
-+ switch ($method) {
-+ case 'GET':
-+ curl_setopt($this->handle, CURLOPT_HTTPGET, true);
-+ break;
-+ case 'POST':
-+ curl_setopt($this->handle, CURLOPT_POST, true);
-+ break;
-+ default:
-+ curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, $method);
-+ }
-+
-+ # Set any custom CURL options
-+ foreach ($this->options as $option => $value) {
-+ curl_setopt($this->handle, constant('CURLOPT_'.str_replace('CURLOPT_', '', strtoupper($option))), $value);
-+ }
-+
-+ $response = curl_exec($this->handle);
-+ if ($response) {
-+ $response = new CurlResponse($response);
-+ } else {
-+ $this->error = curl_errno($this->handle).' - '.curl_error($this->handle);
-+ }
-+ curl_close($this->handle);
-+ return $response;
-+ }
-
- }
-
- class CurlResponse
- {
-- public $body = '';
-- public $headers = array();
--
-- public function __construct($response)
-- {
-- # Extract headers from response
-- $pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
-- preg_match_all($pattern, $response, $matches);
-- $headers = split("\r\n", str_replace("\r\n\r\n", '', array_pop($matches[0])));
--
-- # Extract the version and status from the first header
-- $version_and_status = array_shift($headers);
-- preg_match('#HTTP/(\d\.\d)\s(\d\d\d)\s(.*)#', $version_and_status, $matches);
-- $this->headers['Http-Version'] = $matches[1];
-- $this->headers['Status-Code'] = $matches[2];
-- $this->headers['Status'] = $matches[2].' '.$matches[3];
--
-- # Convert headers into an associative array
-- foreach ($headers as $header) {
-- preg_match('#(.*?)\:\s(.*)#', $header, $matches);
-- $this->headers[$matches[1]] = $matches[2];
-- }
--
-- # Remove the headers from the response body
-- $this->body = preg_replace($pattern, '', $response);
-- }
--
-- public function __toString()
-- {
-- return $this->body;
-- }
-+ public $body = '';
-+ public $headers = array();
-+
-+ public function __construct($response)
-+ {
-+ # Extract headers from response
-+ $pattern = '#HTTP/\d\.\d.*?$.*?\r\n\r\n#ims';
-+ preg_match_all($pattern, $response, $matches);
-+ $headers = split("\r\n", str_replace("\r\n\r\n", '', array_pop($matches[0])));
-+
-+ # Extract the version and status from the first header
-+ $version_and_status = array_shift($headers);
-+ preg_match('#HTTP/(\d\.\d)\s(\d\d\d)\s(.*)#', $version_and_status, $matches);
-+ $this->headers['Http-Version'] = $matches[1];
-+ $this->headers['Status-Code'] = $matches[2];
-+ $this->headers['Status'] = $matches[2].' '.$matches[3];
-+
-+ # Convert headers into an associative array
-+ foreach ($headers as $header) {
-+ preg_match('#(.*?)\:\s(.*)#', $header, $matches);
-+ $this->headers[$matches[1]] = $matches[2];
-+ }
-+
-+ # Remove the headers from the response body
-+ $this->body = preg_replace($pattern, '', $response);
-+ }
-+
-+ public function __toString()
-+ {
-+ return $this->body;
-+ }
- }
-
-
---
-cgit v0.8.3.4
-From 288b73a79fe20bae7737fb622aefff761bb34c3f Mon Sep 17 00:00:00 2001
-From: Paul J Stevens <paul@nfg.nl>
-Date: Wed, 02 Nov 2011 04:31:12 +0000
-Subject: parse From_ time as localtime
-
----
-diff --git a/src/dbmail-mailbox.c b/src/dbmail-mailbox.c
-index 09be275..5e493ab 100644
---- a/src/dbmail-mailbox.c
-+++ b/src/dbmail-mailbox.c
-@@ -100,7 +100,7 @@ static gchar * _message_get_envelope_date(const DbmailMessage *self)
-
- res = g_new0(char, TIMESTRING_SIZE+1);
- memset(&gmt,'\0', sizeof(struct tm));
-- gmtime_r(&self->internal_date, &gmt);
-+ localtime_r(&self->internal_date, &gmt);
-
- strftime(res, TIMESTRING_SIZE, "%a %b %d %H:%M:%S %Y", &gmt);
- return res;
-diff --git a/src/dbmail-message.c b/src/dbmail-message.c
-index 8a1a66c..1b4d826 100644
---- a/src/dbmail-message.c
-+++ b/src/dbmail-message.c
-@@ -837,7 +837,7 @@ gchar * dbmail_message_get_internal_date(const DbmailMessage *self, int thisyear
-
- res = g_new0(char, TIMESTRING_SIZE+1);
- memset(&gmt,'\0', sizeof(struct tm));
-- gmtime_r(&self->internal_date, &gmt);
-+ localtime_r(&self->internal_date, &gmt);
-
- /* override if the date is not sane */
- if (thisyear && gmt.tm_year + 1900 > thisyear + 1) {
---
-cgit v0.8.3.4