diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 2006-11-17 01:18:44 +0000 |
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 2006-11-17 01:18:44 +0000 |
| commit | f8374320671c6a39b6d2935b5b3e21b5824e4407 (patch) | |
| tree | e8f1280d7479efefe71879ca2d9e78fbe327b405 /mail/dbmail21 | |
| parent | 088b4fa7df37b5bea6880adfa83fcc36d9e7dc6a (diff) | |
Diffstat (limited to 'mail/dbmail21')
| -rw-r--r-- | mail/dbmail21/Makefile | 135 | ||||
| -rw-r--r-- | mail/dbmail21/distinfo | 3 | ||||
| -rw-r--r-- | mail/dbmail21/files/dbmail-imapd.sh.in | 32 | ||||
| -rw-r--r-- | mail/dbmail21/files/dbmail-lmtpd.sh.in | 32 | ||||
| -rw-r--r-- | mail/dbmail21/files/dbmail-pop3d.sh.in | 32 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_001_383 | 44 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_002 | 28 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_004 | 52 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_005 | 14 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_006 | 138 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_007_385 | 76 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_008 | 22 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_009_372 | 63 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-2.1.7_010_372 | 116 | ||||
| -rw-r--r-- | mail/dbmail21/files/patch-dm_md5.c | 20 | ||||
| -rw-r--r-- | mail/dbmail21/pkg-descr | 26 | ||||
| -rw-r--r-- | mail/dbmail21/pkg-message | 12 | ||||
| -rw-r--r-- | mail/dbmail21/pkg-plist | 54 |
18 files changed, 0 insertions, 899 deletions
diff --git a/mail/dbmail21/Makefile b/mail/dbmail21/Makefile deleted file mode 100644 index 7757983ee16e..000000000000 --- a/mail/dbmail21/Makefile +++ /dev/null @@ -1,135 +0,0 @@ -# New ports collection makefile for: dbmail-devel -# Date created: 3 August 2006 -# Whom: Mark Starovoytov <mark_sf@kikg.ifmo.ru> -# -# $FreeBSD$ -# - -PORTNAME= dbmail -PORTVERSION= 2.1.7 -PORTREVISION= 1 -CATEGORIES= mail -MASTER_SITES= http://www.dbmail.org/download/2.1/ - -MAINTAINER= mark_sf@kikg.ifmo.ru -COMMENT= An SQL database-based mail system (POP3 and IMAP) - -CONFLICTS= dbmail-*-2.0.* - -OPTIONS= MYSQL "Build with MySQL support" on \ - POSTGRESQL "Build with PostgreSQL support" off \ - SQLITE "Build with SQLite support" off \ - SIEVE "Build w. support for Sieve mail sorting language" off \ - LDAP "Build with support for LDAP authentication" off - -USE_AUTOTOOLS= libtool:15 -GNU_CONFIGURE= YES -CONFIGURE_ARGS= --prefix=${PREFIX} -USE_GMAKE= YES -USE_GCC= 3.2+ -USE_LDCONFIG= ${PREFIX}/lib/dbmail -USE_RC_SUBR= dbmail-pop3d.sh dbmail-lmtpd.sh dbmail-imapd.sh - -LIB_DEPENDS+= gmime-2.0.4:${PORTSDIR}/mail/gmime2 -USE_GNOME= glib20 -USE_OPENSSL= YES -USE_PTHREADS= YES - -CFLAGS+= -fPIC -I${LOCALBASE}/include -L${LOCALBASE}/lib -LDFLAGS+= -pthread -CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" LOCALBASE=${LOCALBASE} - -PORTDOCS= AUTHORS BUGS COPYING INSTALL NEWS README \ - README.aliases README.exim README.ldap \ - README.postfix README.qmail README.sieve \ - README.smtp README.solaris README.usermap \ - THANKS -MAN1= dbmail-smtp.1 dbmail.1 -MAN5= dbmail.conf.5 -MAN8= dbmail-export.8 dbmail-imapd.8 dbmail-lmtpd.8 \ - dbmail-pop3d.8 dbmail-sievecmd.8 dbmail-timsieved.8 \ - dbmail-users.8 dbmail-util.8 -MANCOMPRESSED= no -MSG_FILE= ${PKGDIR}/pkg-message -PKGMESSAGE= ${WRKDIR}/pkg-message - -PLIST_SUB+= PORTNAME=${PORTNAME} -.if defined(NOPORTDOCS) -PLIST_SUB+= PORTDOCS="@comment " -.else -PLIST_SUB+= PORTDOCS="" -.endif - -.include <bsd.port.pre.mk> - -.if defined(WITH_MYSQL) -CONFIGURE_ARGS+=--with-mysql -USE_MYSQL= YES -DATABASE+= mysql -PLIST_SUB+= MYSQL="" -.else -PLIST_SUB+= MYSQL="@comment " -.endif - -.if defined(WITH_POSTGRESQL) -CONFIGURE_ARGS+=--with-pgsql -USE_PGSQL= yes -DATABASE+= postgresql -PLIST_SUB+= PGSQL="" -.else -PLIST_SUB+= PGSQL="@comment " -.endif - -.if defined(WITH_SQLITE) -CONFIGURE_ARGS+=--with-sqlite -USE_SQLITE= yes -DATABASE+= sqlite -PLIST_SUB+= SQLITE="" -.else -PLIST_SUB+= SQLITE="@comment " -.endif - -.if defined(WITH_SIEVE) -CONFIGURE_ARGS+=--with-sieve=${LOCALBASE}/include -LIB_DEPENDS+= sieve.1:${PORTSDIR}/mail/libsieve -PLIST_SUB+= SIEVE="" -.else -PLIST_SUB+= SIEVE="@comment " -.endif - -.if defined(WITH_LDAP) -CONFIGURE_ARGS+=--with-auth-ldap=${LOCALBASE}/include -USE_OPENLDAP= yes -.endif - -.if defined(WITHOUT_MYSQL) && defined(WITHOUT_POSTGRESQL) && defined(WITHOUT_SQLITE) -IGNORE="requires at least one database backend selected. Run 'make config'" -.endif - -post-patch: - @${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr - @${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr - ${SED} -e 's|%%DATADIR%%|${DATADIR}|g' \ - ${MSG_FILE} > ${PKGMESSAGE} - -post-configure: - @${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \ - ${WRKSRC}/dbmail.h - -post-install: - @${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist - @if [ ! -f ${PREFIX}/etc/dbmail.conf ] ; then \ - ${CP} -p ${PREFIX}/etc/dbmail.conf-dist ${PREFIX}/etc/dbmail.conf; \ - fi - @${MKDIR} ${DATADIR} - @for f in ${DATABASE}; do \ - ${MKDIR} ${DATADIR}/$$f ; \ - ${INSTALL_DATA} ${WRKSRC}/sql/$$f/* ${DATADIR}/$$f; \ - done -.if !defined(NOPORTDOCS) - @${MKDIR} ${DOCSDIR} - @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} -.endif - @${CAT} ${PKGMESSAGE} - -.include <bsd.port.post.mk> diff --git a/mail/dbmail21/distinfo b/mail/dbmail21/distinfo deleted file mode 100644 index 345b98be2d99..000000000000 --- a/mail/dbmail21/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (dbmail-2.1.7.tar.gz) = b6523e36d228198eeaf631c9a78a7fec -SHA256 (dbmail-2.1.7.tar.gz) = f46272083fcf4a30cd79a4c97ef19d3e4abc047dbea39eb137eab66c1b6ae133 -SIZE (dbmail-2.1.7.tar.gz) = 842237 diff --git a/mail/dbmail21/files/dbmail-imapd.sh.in b/mail/dbmail21/files/dbmail-imapd.sh.in deleted file mode 100644 index 82505e96d9b0..000000000000 --- a/mail/dbmail21/files/dbmail-imapd.sh.in +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: dbmail-imapd -# REQUIRE: DAEMON -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable dbmail-imapd: -# -#dbmail_imapd_enable="YES" -# -# See dbmail-imapd(8) for flags -# - -. %%RC_SUBR%% - -name=dbmail_imapd -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/dbmail-imapd -pidfile=/var/run/dbmail-imapd.pid -required_files=%%PREFIX%%/etc/dbmail.conf - -# read settings, set default values -load_rc_config "$name" -: ${dbmail_imapd_enable="NO"} -: ${dbmail_imapd_flags=""} - -run_rc_command "$1" diff --git a/mail/dbmail21/files/dbmail-lmtpd.sh.in b/mail/dbmail21/files/dbmail-lmtpd.sh.in deleted file mode 100644 index f1133f43a70e..000000000000 --- a/mail/dbmail21/files/dbmail-lmtpd.sh.in +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: dbmail-lmtpd -# REQUIRE: DAEMON -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable dbmail-lmtpd: -# -#dbmail_lmtpd_enable="YES" -# -# See dbmail-lmtpd(8) for flags -# - -. %%RC_SUBR%% - -name=dbmail_lmtpd -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/dbmail-lmtpd -pidfile=/var/run/dbmail-lmtpd.pid -required_files=%%PREFIX%%/etc/dbmail.conf - -# read settings, set default values -load_rc_config "$name" -: ${dbmail_lmtpd_enable="NO"} -: ${dbmail_lmtpd_flags=""} - -run_rc_command "$1" diff --git a/mail/dbmail21/files/dbmail-pop3d.sh.in b/mail/dbmail21/files/dbmail-pop3d.sh.in deleted file mode 100644 index 21bc97377b8b..000000000000 --- a/mail/dbmail21/files/dbmail-pop3d.sh.in +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: dbmail-pop3d -# REQUIRE: DAEMON -# KEYWORD: shutdown - -# -# Add the following lines to /etc/rc.conf to enable dbmail-pop3d: -# -#dbmail_pop3d_enable="YES" -# -# See dbmail-pop3d(8) for flags -# - -. %%RC_SUBR%% - -name=dbmail_pop3d -rcvar=`set_rcvar` - -command=%%PREFIX%%/sbin/dbmail-pop3d -pidfile=/var/run/dbmail-pop3d.pid -required_files=%%PREFIX%%/etc/dbmail.conf - -# read settings, set default values -load_rc_config "$name" -: ${dbmail_pop3d_enable="NO"} -: ${dbmail_pop3d_flags=""} - -run_rc_command "$1" diff --git a/mail/dbmail21/files/patch-2.1.7_001_383 b/mail/dbmail21/files/patch-2.1.7_001_383 deleted file mode 100644 index 3dfd1954f67b..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_001_383 +++ /dev/null @@ -1,44 +0,0 @@ -Index: modules/sortsieve.c -=================================================================== ---- modules/sortsieve.c (revision 2211) -+++ modules/sortsieve.c (revision 2212) -@@ -198,11 +198,10 @@ - } - - /* If there were any imapflags, set them. */ -+ memset(&msgflags, 0, IMAP_NFLAGS * sizeof(int)); - if (flags) { - int i, j; - -- memset(&msgflags, 0, IMAP_NFLAGS * sizeof(int)); -- - for (i = 0; flags[i]; i++) { // Loop through all script/user-specified flags. - for (j = 0; imap_flag_desc[j]; i++) { // Find the ones we support. - if (g_strcasestr(imap_flag_desc[j], flags[i])) { -@@ -684,8 +683,10 @@ - void sort_free_result(sort_result_t *result) - { - if (result == NULL) return; -- g_string_free(result->errormsg, TRUE); -- g_string_free(result->rejectmsg, TRUE); -+ if (result->errormsg != NULL) -+ g_string_free(result->errormsg, TRUE); -+ if (result->rejectmsg != NULL) -+ g_string_free(result->rejectmsg, TRUE); - dm_free(result); - } - -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 2211) -+++ ChangeLog (revision 2212) -@@ -1,3 +1,9 @@ -+2006-07-26 Aaron Stone <aaron@serendipity.cx> -+ -+ * modules/sortsieve.c: -+ Accepted patch from maenaka (closes bug #383) to clear the IMAP flags -+ if none are given by the Sieve script. -+ - 2006-07-25 Paul J Stevens <paul@nfg.nl> - - * misc.c: diff --git a/mail/dbmail21/files/patch-2.1.7_002 b/mail/dbmail21/files/patch-2.1.7_002 deleted file mode 100644 index c268d37c635a..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_002 +++ /dev/null @@ -1,28 +0,0 @@ -Index: db.c -=================================================================== ---- db.c (revision 2212) -+++ db.c (revision 2213) -@@ -2885,6 +2885,9 @@ - *mailboxes = g_list_reverse(*mailboxes); - *errmsg = "Everything is peachy keen"; - -+ g_strfreev(chunks); -+ dm_free(cpy); -+ - return DM_SUCCESS; - - equery: -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 2212) -+++ ChangeLog (revision 2213) -@@ -3,6 +3,9 @@ - * modules/sortsieve.c: - Accepted patch from maenaka (closes bug #383) to clear the IMAP flags - if none are given by the Sieve script. -+ * db.c: -+ Accepted patch from Leif Jackson to close a memory leak in -+ db_imap_split_mailbox. - - 2006-07-25 Paul J Stevens <paul@nfg.nl> - diff --git a/mail/dbmail21/files/patch-2.1.7_004 b/mail/dbmail21/files/patch-2.1.7_004 deleted file mode 100644 index 6fbd421ffe24..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_004 +++ /dev/null @@ -1,52 +0,0 @@ -Index: debug.c -=================================================================== ---- debug.c (revision 2214) -+++ debug.c (revision 2215) -@@ -103,6 +103,7 @@ - fprintf(stderr, "%s %s", trace_to_text(level), message); - if (message[l] != '\n') - fprintf(stderr, "\n"); -+ fflush(stderr); - } - - if (level <= TRACE_SYSLOG) { -Index: modules/sortsieve.c -=================================================================== ---- modules/sortsieve.c (revision 2214) -+++ modules/sortsieve.c (revision 2215) -@@ -187,7 +187,7 @@ - extern const char * imap_flag_desc[]; - const char * const * flags; - const char * mailbox; -- int msgflags[IMAP_NFLAGS]; -+ int *msgflags = NULL; - - mailbox = sieve2_getvalue_string(s, "mailbox"); - flags = sieve2_getvalue_stringlist(s, "imapflags"); // TODO -@@ -198,9 +198,9 @@ - } - - /* If there were any imapflags, set them. */ -- memset(&msgflags, 0, IMAP_NFLAGS * sizeof(int)); - if (flags) { - int i, j; -+ msgflags = g_new0(int, IMAP_NFLASGS); - - for (i = 0; flags[i]; i++) { // Loop through all script/user-specified flags. - for (j = 0; imap_flag_desc[j]; i++) { // Find the ones we support. -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 2214) -+++ ChangeLog (revision 2215) -@@ -1,3 +1,11 @@ -+2006-07-27 Aaron Stone <aaron@serendipity.cx> -+ -+ * debug.c: -+ Added fflush after fprintf (closes bug #388). -+ * modules/sortsieve.c: -+ Make sure that the msgflags pointer is NULL if there are no special -+ flags (closes bug #383). -+ - 2006-07-26 Paul J Stevens <paul@nfg.nl> - - * debian/control, modules/sortsieve.c: diff --git a/mail/dbmail21/files/patch-2.1.7_005 b/mail/dbmail21/files/patch-2.1.7_005 deleted file mode 100644 index bed2fd41dde4..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_005 +++ /dev/null @@ -1,14 +0,0 @@ -Index: modules/sortsieve.c -=================================================================== ---- modules/sortsieve.c (revision 2215) -+++ modules/sortsieve.c (revision 2216) -@@ -222,6 +222,9 @@ - m->result->cancelkeep = 1; - } - -+ if (msgflags) -+ g_free(msgflasgs); -+ - return SIEVE2_OK; - } - diff --git a/mail/dbmail21/files/patch-2.1.7_006 b/mail/dbmail21/files/patch-2.1.7_006 deleted file mode 100644 index 0102ba6fbc02..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_006 +++ /dev/null @@ -1,138 +0,0 @@ -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 2216) -+++ ChangeLog (revision 2217) -@@ -1,3 +1,11 @@ -+2006-07-30 Aaron Stone <aaron@serendipity.cx> -+ -+ * sql/mysql/create_tables.mysql, migrate_from_2.0_to_2.1.mysql: -+ Accepted patch from Maenaka to only create Sieve tables once, in -+ InnoDB format (closes bug #386). -+ * pipe.c: -+ Attempt to resolve bug #372. -+ - 2006-07-27 Aaron Stone <aaron@serendipity.cx> - - * debug.c: -Index: sql/mysql/migrate_from_2.0_to_2.1.mysql -=================================================================== ---- sql/mysql/migrate_from_2.0_to_2.1.mysql (revision 2216) -+++ sql/mysql/migrate_from_2.0_to_2.1.mysql (revision 2217) -@@ -176,21 +176,18 @@ - - - CREATE TABLE dbmail_sievescripts ( -- id BIGINT NOT NULL AUTO_INCREMENT, -- owner_idnr BIGINT NOT NULL -- REFERENCES dbmail_users(user_idnr) -- ON UPDATE CASCADE ON DELETE CASCADE, -- active TINYINT(1) DEFAULT '0' NOT NULL, -- name VARCHAR(100) NOT NULL DEFAULT '', -- script TEXT NOT NULL DEFAULT '', -- PRIMARY KEY (id) --); -+ owner_idnr bigint(21) DEFAULT '0' NOT NULL, -+ name varchar(100) NOT NULL, -+ script text, -+ active tinyint(1) default '0' not null, -+ INDEX (name), -+ INDEX (owner_idnr), -+ INDEX (owner_idnr, name), -+ FOREIGN KEY owner_idnr_fk (owner_idnr) -+ REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE -+) ENGINE=InnoDB; - --# Looking in db.c, the WHERE clauses are: owner, owner name, owner active. --CREATE INDEX dbmail_sievescripts_1 on dbmail_sievescripts(owner_idnr,name); --CREATE INDEX dbmail_sievescripts_2 on dbmail_sievescripts(owner_idnr,active); - -- - # Add columns for storing the Sieve quota. - ALTER TABLE dbmail_users - ADD maxsieve_size BIGINT DEFAULT '0' NOT NULL, -Index: sql/mysql/create_tables.mysql -=================================================================== ---- sql/mysql/create_tables.mysql (revision 2216) -+++ sql/mysql/create_tables.mysql (revision 2217) -@@ -207,7 +207,9 @@ - active tinyint(1) default '0' not null, - INDEX (name), - INDEX (owner_idnr), -- INDEX (owner_idnr, name) -+ INDEX (owner_idnr, name), -+ FOREIGN KEY owner_idnr_fk (owner_idnr) -+ REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE - ) ENGINE=InnoDB; - - -@@ -359,25 +361,6 @@ - UNIQUE KEY replycache_1 (to_addr,from_addr, handle) - ) ENGINE=InnoDB; - --# --# Add tables and columns to hold Sieve scripts. -- --DROP TABLE IF EXISTS dbmail_sievescripts; --CREATE TABLE dbmail_sievescripts ( -- id BIGINT NOT NULL AUTO_INCREMENT, -- owner_idnr BIGINT NOT NULL -- REFERENCES dbmail_users(user_idnr) -- ON UPDATE CASCADE ON DELETE CASCADE, -- active TINYINT(1) DEFAULT '0' NOT NULL, -- name VARCHAR(100) NOT NULL DEFAULT '', -- script TEXT NOT NULL DEFAULT '', -- PRIMARY KEY (id) --); -- --# Looking in db.c, the WHERE clauses are: owner, owner name, owner active. --CREATE INDEX dbmail_sievescripts_1 on dbmail_sievescripts(owner_idnr,name); --CREATE INDEX dbmail_sievescripts_2 on dbmail_sievescripts(owner_idnr,active); -- - DROP TABLE IF EXISTS dbmail_usermap; - CREATE TABLE dbmail_usermap ( - login VARCHAR(100) NOT NULL, -Index: pipe.c -=================================================================== ---- pipe.c (revision 2216) -+++ pipe.c (revision 2217) -@@ -61,10 +61,12 @@ - int sendwhat, char *sendmail_external) - { - FILE *mailpipe = NULL; -- char *escaped_to = NULL; -- char *escaped_from = NULL; -+ char *escaped_to = NULL, *parsed_to = NULL; -+ char *escaped_from = NULL, *parsed_from = NULL; - char *sendmail_command = NULL; - field_t sendmail, postmaster; -+ InternetAddressList *ialist; -+ InternetAddress *ia; - int result; - - if (!from || strlen(from) < 1) { -@@ -94,13 +96,23 @@ - trace(TRACE_DEBUG, "%s, %s: sendmail command is [%s]", - __FILE__, __func__, sendmail); - -- if (! (escaped_to = dm_shellesc(to))) { -+ ialist = internet_address_parse_string(to); -+ ia = ialist->address; -+ parsed_to = internet_address_to_string(ia, TRUE); -+ internet_address_list_destroy(ialist); -+ -+ if (! (escaped_to = dm_shellesc(parsed_to))) { - trace(TRACE_ERROR, "%s, %s: out of memory calling dm_shellesc", - __FILE__, __func__); - return -1; - } - -- if (! (escaped_from = dm_shellesc(from))) { -+ ialist = internet_address_parse_string(from); -+ ia = ialist->address; -+ parsed_from = internet_address_to_string(ia, TRUE); -+ internet_address_list_destroy(ialist); -+ -+ if (! (escaped_from = dm_shellesc(parsed_from))) { - trace(TRACE_ERROR, "%s, %s: out of memory calling dm_shellesc", - __FILE__, __func__); - return -1; diff --git a/mail/dbmail21/files/patch-2.1.7_007_385 b/mail/dbmail21/files/patch-2.1.7_007_385 deleted file mode 100644 index b84a00ebc9d8..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_007_385 +++ /dev/null @@ -1,76 +0,0 @@ -Index: config.c -=================================================================== ---- config.c (revision 2217) -+++ config.c (revision 2218) -@@ -212,9 +212,10 @@ - if (config_get_value("serverid", "DBMAIL", serverid_string) < 0) - trace(TRACE_FATAL, "%s,%s: error getting config!", - __FILE__, __func__); -+ if (config_get_value("encoding", "DBMAIL", db_params->encoding) < 0) -+ trace(TRACE_FATAL, "%s,%s: error getting config!", -+ __FILE__, __func__); - -- -- - if (config_get_value("table_prefix", "DBMAIL", db_params->pfx) < 0) - trace(TRACE_FATAL, "%s,%s: error getting config!", - __FILE__, __func__); -Index: modules/dbmysql.c -=================================================================== ---- modules/dbmysql.c (revision 2217) -+++ modules/dbmysql.c (revision 2218) -@@ -90,6 +90,16 @@ - int collations_match = 0; - int i, j; - -+ if (strlen(_db_params.encoding) > 0) { -+ snprintf(the_query, DEF_QUERYSIZE, "SET NAMES %s", _db_params.encoding); -+ if (db_query(the_query) == DM_EQUERY) { -+ trace(TRACE_ERROR, -+ "%s,%s: error setting collation", __FILE__, __func__); -+ return DM_EQUERY; -+ } -+ db_free_result(); -+ } -+ - snprintf(the_query, DEF_QUERYSIZE, - "SHOW VARIABLES LIKE 'collation_%%'"); - if (db_query(the_query) == DM_EQUERY) { -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 2217) -+++ ChangeLog (revision 2218) -@@ -5,6 +5,9 @@ - InnoDB format (closes bug #386). - * pipe.c: - Attempt to resolve bug #372. -+ * config.c, dbmail.conf, dbmailtypes.h, modules/dbmysql.c: -+ Accepted patch from Maenaka to allow configurable MySQL connection -+ encoding (closes bug #385). - - 2006-07-27 Aaron Stone <aaron@serendipity.cx> - -Index: dbmail.conf -=================================================================== ---- dbmail.conf (revision 2217) -+++ dbmail.conf (revision 2218) -@@ -18,6 +18,7 @@ - pass= # Database password. - db=dbmail # Database name. - #table_prefix=dbmail_ # Table prefix. Defaults to "dbmail_" if not specified. -+#encoding=latin1 # MySQL connection encoding must match to table encoding. - #postmaster=DBMAIL-MAILER # Postmaster's email address for use in bounce messages. - sendmail=/usr/sbin/sendmail # Sendmail executable for forwards, replies, notifies, vacations. - -Index: dbmailtypes.h -=================================================================== ---- dbmailtypes.h (revision 2217) -+++ dbmailtypes.h (revision 2218) -@@ -99,6 +99,7 @@ - field_t sock; /**< path to local unix socket (local connection) */ - field_t pfx; /**< prefix for tables e.g. dbmail_ */ - unsigned int serverid; /**< unique id for dbmail instance used in clusters */ -+ field_t encoding; /**< character encoding to use */ - } db_param_t; - - /** configuration items */ diff --git a/mail/dbmail21/files/patch-2.1.7_008 b/mail/dbmail21/files/patch-2.1.7_008 deleted file mode 100644 index 4e050d901c09..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_008 +++ /dev/null @@ -1,22 +0,0 @@ -Index: modules/sortsieve.c -=================================================================== ---- modules/sortsieve.c (revision 2218) -+++ modules/sortsieve.c (revision 2219) -@@ -200,7 +200,7 @@ - /* If there were any imapflags, set them. */ - if (flags) { - int i, j; -- msgflags = g_new0(int, IMAP_NFLASGS); -+ msgflags = g_new0(int, IMAP_NFLAGS); - - for (i = 0; flags[i]; i++) { // Loop through all script/user-specified flags. - for (j = 0; imap_flag_desc[j]; i++) { // Find the ones we support. -@@ -223,7 +223,7 @@ - } - - if (msgflags) -- g_free(msgflasgs); -+ g_free(msgflags); - - return SIEVE2_OK; - } diff --git a/mail/dbmail21/files/patch-2.1.7_009_372 b/mail/dbmail21/files/patch-2.1.7_009_372 deleted file mode 100644 index d92952dcefa8..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_009_372 +++ /dev/null @@ -1,63 +0,0 @@ -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 2219) -+++ ChangeLog (revision 2220) -@@ -1,3 +1,9 @@ -+2006-08-01 Aaron Stone <aaron@serendipity.cx> -+ -+ * pipe.c: -+ Proper fix to prevent passing addresses with full names on the -+ sendmail command line (closes bug #372). -+ - 2006-07-30 Aaron Stone <aaron@serendipity.cx> - - * sql/mysql/create_tables.mysql, migrate_from_2.0_to_2.1.mysql: -Index: pipe.c -=================================================================== ---- pipe.c (revision 2219) -+++ pipe.c (revision 2220) -@@ -98,26 +98,40 @@ - - ialist = internet_address_parse_string(to); - ia = ialist->address; -- parsed_to = internet_address_to_string(ia, TRUE); -- internet_address_list_destroy(ialist); -+ if (ia->type != INTERNET_ADDRESS_NAME) { -+ // There isn't a valid address here. Bail... -+ internet_address_list_destroy(ialist); -+ return -1; -+ } -+ parsed_to = ia->value.addr; - - if (! (escaped_to = dm_shellesc(parsed_to))) { - trace(TRACE_ERROR, "%s, %s: out of memory calling dm_shellesc", - __FILE__, __func__); -+ internet_address_list_destroy(ialist); - return -1; - } - -+ internet_address_list_destroy(ialist); -+ - ialist = internet_address_parse_string(from); - ia = ialist->address; -- parsed_from = internet_address_to_string(ia, TRUE); -- internet_address_list_destroy(ialist); -+ if (ia->type != INTERNET_ADDRESS_NAME) { -+ // There isn't a valid address here. Bail... -+ internet_address_list_destroy(ialist); -+ return -1; -+ } -+ parsed_from = ia->value.addr; - - if (! (escaped_from = dm_shellesc(parsed_from))) { - trace(TRACE_ERROR, "%s, %s: out of memory calling dm_shellesc", - __FILE__, __func__); -+ internet_address_list_destroy(ialist); - return -1; - } - -+ internet_address_list_destroy(ialist); -+ - if (!sendmail_external) { - sendmail_command = g_strconcat(sendmail, " -f ", escaped_from, " ", escaped_to, NULL); - dm_free(escaped_to); diff --git a/mail/dbmail21/files/patch-2.1.7_010_372 b/mail/dbmail21/files/patch-2.1.7_010_372 deleted file mode 100644 index dc87a13f1a54..000000000000 --- a/mail/dbmail21/files/patch-2.1.7_010_372 +++ /dev/null @@ -1,116 +0,0 @@ -Index: pipe.c -=================================================================== ---- pipe.c (revision 2220) -+++ pipe.c (revision 2221) -@@ -46,6 +46,31 @@ - return ret; - } - -+static int parse_and_escape(const char *in, char **out) -+{ -+ InternetAddressList *ialist; -+ InternetAddress *ia; -+ -+ TRACE(TRACE_DEBUG, "parsing address [%s]", in); -+ ialist = internet_address_parse_string(in); -+ ia = ialist->address; -+ if (ia->type != INTERNET_ADDRESS_NAME) { -+ TRACE(TRACE_MESSAGE, "unable to parse email address [%s]", in); -+ internet_address_list_destroy(ialist); -+ return -1; -+ } -+ -+ if (! (*out = dm_shellesc(ia->value.addr))) { -+ TRACE(TRACE_ERROR, "out of memory calling dm_shellesc"); -+ internet_address_list_destroy(ialist); -+ return -1; -+ } -+ -+ internet_address_list_destroy(ialist); -+ -+ return 0; -+} -+ - // Send only certain parts of the message. - #define SENDNOTHING 0 - #define SENDHEADERS 1 -@@ -61,12 +86,10 @@ - int sendwhat, char *sendmail_external) - { - FILE *mailpipe = NULL; -- char *escaped_to = NULL, *parsed_to = NULL; -- char *escaped_from = NULL, *parsed_from = NULL; -+ char *escaped_to = NULL; -+ char *escaped_from = NULL; - char *sendmail_command = NULL; - field_t sendmail, postmaster; -- InternetAddressList *ialist; -- InternetAddress *ia; - int result; - - if (!from || strlen(from) < 1) { -@@ -93,60 +116,21 @@ - return -1; - } - -- trace(TRACE_DEBUG, "%s, %s: sendmail command is [%s]", -- __FILE__, __func__, sendmail); -- -- ialist = internet_address_parse_string(to); -- ia = ialist->address; -- if (ia->type != INTERNET_ADDRESS_NAME) { -- // There isn't a valid address here. Bail... -- internet_address_list_destroy(ialist); -- return -1; -- } -- parsed_to = ia->value.addr; -- -- if (! (escaped_to = dm_shellesc(parsed_to))) { -- trace(TRACE_ERROR, "%s, %s: out of memory calling dm_shellesc", -- __FILE__, __func__); -- internet_address_list_destroy(ialist); -- return -1; -- } -- -- internet_address_list_destroy(ialist); -- -- ialist = internet_address_parse_string(from); -- ia = ialist->address; -- if (ia->type != INTERNET_ADDRESS_NAME) { -- // There isn't a valid address here. Bail... -- internet_address_list_destroy(ialist); -- return -1; -- } -- parsed_from = ia->value.addr; -- -- if (! (escaped_from = dm_shellesc(parsed_from))) { -- trace(TRACE_ERROR, "%s, %s: out of memory calling dm_shellesc", -- __FILE__, __func__); -- internet_address_list_destroy(ialist); -- return -1; -- } -- -- internet_address_list_destroy(ialist); -- - if (!sendmail_external) { -+ parse_and_escape(to, &escaped_to); -+ parse_and_escape(from, &escaped_from); - sendmail_command = g_strconcat(sendmail, " -f ", escaped_from, " ", escaped_to, NULL); - dm_free(escaped_to); - dm_free(escaped_from); - if (!sendmail_command) { -- trace(TRACE_ERROR, "%s, %s: out of memory calling g_strconcat", -- __FILE__, __func__); -+ TRACE(TRACE_ERROR, "out of memory calling g_strconcat"); - return -1; - } - } else { - sendmail_command = sendmail_external; - } - -- trace(TRACE_INFO, "%s, %s: opening pipe to [%s]", -- __FILE__, __func__, sendmail_command); -+ TRACE(TRACE_INFO, "opening pipe to [%s]", sendmail_command); - - if (!(mailpipe = popen(sendmail_command, "w"))) { - trace(TRACE_ERROR, "%s, %s: could not open pipe to sendmail", diff --git a/mail/dbmail21/files/patch-dm_md5.c b/mail/dbmail21/files/patch-dm_md5.c deleted file mode 100644 index e48944867155..000000000000 --- a/mail/dbmail21/files/patch-dm_md5.c +++ /dev/null @@ -1,20 +0,0 @@ ---- dm_md5.c.orig Sat Sep 16 20:42:05 2006 -+++ dm_md5.c Sat Sep 16 20:44:42 2006 -@@ -42,6 +42,8 @@ - - #include "dbmail.h" - -+typedef unsigned int uint32; -+ - /* If endian.h is present, it will tell us, otherwise - * autoconf's AC_C_BIGENDIAN will have tested the host. */ - #if (BYTE_ORDER == LITTLE_ENDIAN) || !defined(WORDS_BIGENDIAN) -@@ -63,8 +65,6 @@ - } - - #endif -- --typedef unsigned int uint32; - - struct GdmMD5Context { - uint32 buf[4]; diff --git a/mail/dbmail21/pkg-descr b/mail/dbmail21/pkg-descr deleted file mode 100644 index 975d756571ae..000000000000 --- a/mail/dbmail21/pkg-descr +++ /dev/null @@ -1,26 +0,0 @@ -Dbmail is the name of a group of programs that enable the possiblilty -of storing and retrieving mail messages from a database (currently -MySQL, PostgreSQL or SQLite). - -What are the advantages? - - * Scalability. - Dbmail is as scalable as the database that is used for the - mail storage. - * Manageability. - Dbmail is based upon a database. Dbmail can be managed by - changing settings in the database (f.e. using PHP/Perl/SQL). - * Speed. - Dbmail uses very efficient, database specific queries for - retrieving mail information. This is much faster then parsing - a filesystem. - * Security. - Dbmail has got nothing to do with the filesystem or interaction - with other programs in the Unix environment which need special - permissions. Dbmail is as secure as the database it's based - upon. - * Flexibility. - Changes on a Dbmail system (adding of users, changing passwords - etc.) are effective immediately. - -WWW: http://www.dbmail.org/ diff --git a/mail/dbmail21/pkg-message b/mail/dbmail21/pkg-message deleted file mode 100644 index 5cb452372e73..000000000000 --- a/mail/dbmail21/pkg-message +++ /dev/null @@ -1,12 +0,0 @@ - -IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!! - - *) Don't forget to update the database using a script from - %%DATADIR%%/ - *) Many programs have been renamed and their arguments changed. - *) Read the upgrading notes. - *) Don't be careless with this upgrade or mail will be lost! - *) dbmail can be controled by setting dbmail_imapd_enable, - dbmail_lmtpd_enable, and/or dbmail_pop3d_enable in - /etc/rc.conf. - diff --git a/mail/dbmail21/pkg-plist b/mail/dbmail21/pkg-plist deleted file mode 100644 index 441f27155676..000000000000 --- a/mail/dbmail21/pkg-plist +++ /dev/null @@ -1,54 +0,0 @@ -@unexec if cmp -s %D/etc/dbmail.conf-dist %D/etc/dbmail.conf; then rm -f %D/etc/dbmail.conf; fi -etc/dbmail.conf-dist -@exec if [ ! -f %D/etc/dbmail.conf ] ; then cp -p %D/%F %B/dbmail.conf; fi -@exec mkdir -p %D/lib/dbmail -lib/libdbmail.a -lib/libdbmail.la -lib/libdbmail.so -lib/libdbmail.so.0 -lib/dbmail/libauth_ldap.a -lib/dbmail/libauth_ldap.la -lib/dbmail/libauth_ldap.so -lib/dbmail/libauth_ldap.so.0 -lib/dbmail/libauth_sql.a -lib/dbmail/libauth_sql.la -lib/dbmail/libauth_sql.so -lib/dbmail/libauth_sql.so.0 -lib/dbmail/libmysql.a -lib/dbmail/libmysql.la -lib/dbmail/libmysql.so -lib/dbmail/libmysql.so.0 -lib/dbmail/libpgsql.a -lib/dbmail/libpgsql.la -lib/dbmail/libpgsql.so -lib/dbmail/libpgsql.so.0 -lib/dbmail/libsort_sieve.a -lib/dbmail/libsort_sieve.la -lib/dbmail/libsort_sieve.so -lib/dbmail/libsort_sieve.so.0 -lib/dbmail/libsqlite.a -lib/dbmail/libsqlite.la -lib/dbmail/libsqlite.so -lib/dbmail/libsqlite.so.0 -@dirrm lib/dbmail -sbin/dbmail-export -sbin/dbmail-imapd -sbin/dbmail-lmtpd -sbin/dbmail-pop3d -sbin/dbmail-smtp -sbin/dbmail-users -sbin/dbmail-util -%%SIEVE%%sbin/dbmail-sievecmd -%%SIEVE%%sbin/dbmail-timsieved -%%MYSQL%%%%DATADIR%%/mysql/create_tables.mysql -%%MYSQL%%%%DATADIR%%/mysql/migrate_from_1.x_to_2.0_innodb.mysql -%%MYSQL%%%%DATADIR%%/mysql/migrate_from_2.0_to_2.1.mysql -%%MYSQL%%%%DATADIR%%/mysql/update_headervalue_01.mysql -%%MYSQL%%@dirrm %%DATADIR%%/mysql -%%PGSQL%%%%DATADIR%%/postgresql/create_tables.pgsql -%%PGSQL%%%%DATADIR%%/postgresql/migrate_from_1.x_to_2.0.pgsql -%%PGSQL%%%%DATADIR%%/postgresql/migrate_from_2.0_to_2.1.pgsql -%%PGSQL%%@dirrm %%DATADIR%%/postgresql -%%SQLITE%%%%DATADIR%%/sqlite/create_tables.sqlite -%%SQLITE%%@dirrm %%DATADIR%%/sqlite -@dirrm %%DATADIR%% |
