- Update to 2.0.10

PR:		95457
Submitted by:	maintainer
This commit is contained in:
Marcus Alves Grando 2006-04-08 18:24:18 +00:00
parent ed142c1b3f
commit ac08ee6091
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=159143
70 changed files with 95 additions and 97840 deletions

View File

@ -6,8 +6,7 @@
#
PORTNAME= dbmail
PORTVERSION= 2.0.7
PORTREVISION= 2
PORTVERSION= 2.0.10
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.0/
PKGNAMESUFFIX= -${DATABASE}
@ -15,7 +14,6 @@ PKGNAMESUFFIX= -${DATABASE}
MAINTAINER= mark_sf@kikg.ifmo.ru
COMMENT= An SQL database-based mail system (POP3 and IMAP)
USE_REINPLACE= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --prefix=${PREFIX}
USE_GMAKE= YES
@ -59,21 +57,21 @@ pre-everything::
@${ECHO} ""
post-patch:
${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
${FIND} ${WRKSRC} -name '*.orig' -type f -delete
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name '*.orig' -type f -delete
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
${WRKSRC}/dbmail.h
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@${MKDIR} ${DATADIR}/sql
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
@${ECHO} ""
@${ECHO} "IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!"

View File

@ -1,3 +1,3 @@
MD5 (dbmail-2.0.7.tar.gz) = 11e6eded9e5ec533f6e6ed11fc62a4d8
SHA256 (dbmail-2.0.7.tar.gz) = ef678002a0f6eed3ae8babc17760e36a76e678852c50d70d8dee1fe693f54026
SIZE (dbmail-2.0.7.tar.gz) = 584457
MD5 (dbmail-2.0.10.tar.gz) = 985c41a6ded0a6094948c5835d9dd4ec
SHA256 (dbmail-2.0.10.tar.gz) = 249a57d7c163155c7bf2ca758fa1fabc676aa84d3a0d8403e497a8da7ff49716
SIZE (dbmail-2.0.10.tar.gz) = 632451

View File

@ -1,27 +0,0 @@
--- server.c.orig Wed Aug 24 13:35:38 2005
+++ server.c Tue Sep 13 22:21:59 2005
@@ -119,7 +119,7 @@
trace(TRACE_DEBUG, "StartServer(): children created, starting main service loop");
while (!GeneralStopRequested) {
- if (db_connect() != 0) {
+ if (db_check_connection() != 0) {
if (! stopped)
manage_stop_children();
@@ -128,12 +128,11 @@
sleep(10);
} else {
- if (stopped)
+ if (stopped) {
+ manage_restart_children();
stopped=0;
-
- db_disconnect();
+ }
- manage_restart_children();
manage_spare_children();
sleep(1);

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
--- server.c (revision 1888)
+++ server.c (revision 1889)
@@ -98,7 +98,6 @@
return -1;
if (db_check_version() != 0)
return -1;
- db_disconnect();
ParentPID = getpid();
Restart = 0;

View File

@ -1,25 +0,0 @@
--- serverchild.c (revision 1889)
+++ serverchild.c (revision 1890)
@@ -312,19 +312,16 @@
client.timeoutMsg = info->timeoutMsg;
client.timeout = info->timeout;
- strncpy(client.ip, inet_ntoa(saClient.sin_addr),
- IPNUM_LEN);
+ strncpy(client.ip, inet_ntoa(saClient.sin_addr), IPNUM_LEN);
client.clientname[0] = '\0';
if (info->resolveIP) {
- clientHost =
- gethostbyaddr((char *) &saClient.sin_addr,
+ clientHost = gethostbyaddr((char *) &saClient.sin_addr,
sizeof(saClient.sin_addr),
saClient.sin_family);
if (clientHost && clientHost->h_name)
- strncpy(client.clientname,
- clientHost->h_name, FIELDSIZE);
+ strncpy(client.clientname, clientHost->h_name, FIELDSIZE);
trace(TRACE_MESSAGE, "%s,%s: incoming connection from [%s (%s)]",
__FILE__, __func__,

View File

@ -1,22 +0,0 @@
--- sql/mysql/create_tables.mysql (revision 1889)
+++ sql/mysql/create_tables.mysql (revision 1890)
@@ -118,7 +118,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) DEFAULT '0' NOT NULL,
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) DEFAULT '0' NOT NULL,
is_header tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (messageblk_idnr),
--- sql/mysql/create_tables_innoDB.mysql (revision 1889)
+++ sql/mysql/create_tables_innoDB.mysql (revision 1890)
@@ -148,7 +148,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) NOT NULL default '0',
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) NOT NULL default '0',
is_header tinyint(1) NOT NULL default '0',
PRIMARY KEY (messageblk_idnr),

View File

@ -1,95 +0,0 @@
--- ChangeLog (revision 1890)
+++ ChangeLog (revision 1904)
@@ -1,3 +1,12 @@
+2005-10-01 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, debian/patches/04_mailfilter.dpatch:
+ added postgres table to mailfilter patch
+ * debian/changelog, serverchild.c, sql/mysql/create_tables.mysql,
+ sql/mysql/create_tables_innoDB.mysql:
+ change dbmail_messageblks.messageblk from longtext to longblob in mysql
+ create scripts
+
2005-09-27 Paul J Stevens <paul@nfg.nl>
* ChangeLog, buildtools/config.guess, buildtools/config.sub,
--- dsn.c (revision 1890)
+++ dsn.c (revision 1904)
@@ -309,8 +309,10 @@
*/
else { /* from: 'if (delivery->useridnr != 0)' */
- alias_count =
- auth_check_user_ext(delivery->address,
+ if (! strlen(delivery->address))
+ return 0;
+
+ alias_count = auth_check_user_ext(delivery->address,
delivery->userids,
delivery->forwards, 0);
trace(TRACE_DEBUG,
--- auth/authsql.c (revision 1890)
+++ auth/authsql.c (revision 1904)
@@ -385,6 +385,9 @@
return 0;
}
+ if (strlen(username) < 1)
+ return 0;
+
saveres = db_get_result_set();
db_set_result_set(NULL);
--- main.c (revision 1890)
+++ main.c (revision 1904)
@@ -405,27 +405,25 @@
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
- trace(TRACE_DEBUG, "main(): scanning for [%s]",
- deliver_to_header);
- if (mail_adr_list(deliver_to_header, &users, &mimelist) !=
- 0) {
- trace(TRACE_STOP,
- "main(): scanner found no email addresses (scanned for %s)",
+ trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
+ if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
+ trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
/* Loop through the users list, moving the entries into the dsnusers list. */
- for (tmp = list_getstart(&users); tmp != NULL;
- tmp = tmp->nextnode) {
- deliver_to_user_t dsnuser;
+ for (tmp = list_getstart(&users); tmp != NULL; tmp = tmp->nextnode) {
+ if (! (strlen((char *)tmp->data) > 0))
+ continue;
+
+ deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser,
- sizeof(deliver_to_user_t));
+ list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
}
}
@@ -433,11 +431,10 @@
if (deliver_to_mailbox != NULL) {
trace(TRACE_DEBUG, "main(): setting mailbox for all deliveries to [%s]",
deliver_to_mailbox);
+
/* Loop through the dsnusers list, setting the destination mailbox. */
- for (tmp = list_getstart(&dsnusers); tmp != NULL;
- tmp = tmp->nextnode) {
+ for (tmp = list_getstart(&dsnusers); tmp != NULL; tmp = tmp->nextnode)
((deliver_to_user_t *)tmp->data)->mailbox = dm_strdup(deliver_to_mailbox);
- }
}
if (dsnuser_resolve_list(&dsnusers) == -1) {

View File

@ -1,11 +0,0 @@
--- ChangeLog (revision 1904)
+++ ChangeLog (revision 1905)
@@ -1,3 +1,8 @@
+2005-10-18 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, auth/authsql.c, dsn.c, main.c:
+ ignore empty addresses in delivery chain
+
2005-10-01 Paul J Stevens <paul@nfg.nl>
* ChangeLog, debian/patches/04_mailfilter.dpatch:

View File

@ -1,38 +0,0 @@
--- imapcommands.c (revision 1904)
+++ imapcommands.c (revision 1905)
@@ -1787,6 +1787,8 @@
if (args[i + 1]) {
struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
+
if (strptime(args[i], "%d-%b-%Y %T", &tm) != NULL)
strftime(sqldate,
sizeof(sqldate), "%Y-%m-%d %H:%M:%S",
--- imaputil.c (revision 1904)
+++ imaputil.c (revision 1905)
@@ -1788,13 +1788,14 @@
time_t ltime;
char *last;
+ memset(&tm_sql_date, 0, sizeof(struct tm));
+
last = strptime(sqldate,"%Y-%m-%d %T", &tm_sql_date);
if ( (last == NULL) || (*last != '\0') ) {
strcpy(_imapdate, IMAP_STANDARD_DATE);
return _imapdate;
}
- /* FIXME: this works fine on linux, but may cause dst offsets in netbsd. */
ltime = mktime (&tm_sql_date);
tm_imap_date = localtime(&ltime);
@@ -1814,6 +1815,8 @@
struct tm tm;
char *last_char;
+ memset(&tm, 0, sizeof(struct tm));
+
last_char = strptime(imapdate, "%d-%b-%Y", &tm);
if (last_char == NULL || *last_char != '\0') {
trace(TRACE_DEBUG, "%s,%s: error parsing IMAP date %s",

View File

@ -1,52 +0,0 @@
--- main.c (revision 1905)
+++ main.c (revision 1948)
@@ -388,8 +388,8 @@
/* parse the list and scan for field and content */
if (mime_readheader(header, &dummyidx, &mimelist, &dummysize) < 0) {
- trace(TRACE_ERROR,
- "main(): mime_readheader failed to read a header list");
+ trace(TRACE_ERROR, "%s,%s: mime_readheader failed",
+ __FILE__, __func__);
exitcode = EX_TEMPFAIL;
goto freeall;
}
@@ -400,15 +400,16 @@
if (returnpath.total_nodes == 0)
mail_adr_list("From", &returnpath, &mimelist);
if (returnpath.total_nodes == 0)
- trace(TRACE_DEBUG, "main(): no return path found.");
+ trace(TRACE_DEBUG, "%s,%s: no return path found.",
+ __FILE__,__func__);
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
- trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
- deliver_to_header);
+ trace(TRACE_STOP, "%s,%s: no email addresses found (scanned for %s)",
+ __FILE__,__func__, deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
@@ -419,11 +420,16 @@
if (! (strlen((char *)tmp->data) > 0))
continue;
- deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
+ if (! list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t))) {
+ trace(TRACE_ERROR,"%s,%s: out of memory in list_nodeadd",
+ __FILE__, __func__);
+ exitcode = EX_TEMPFAIL;
+ goto freeall;
+ }
+
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,10 @@ lib/dbmail/libsortdbmail.so.0
lib/dbmail/libsortdbmail.a
lib/dbmail/libsortdbmail.la
lib/dbmail/libsortdbmail.so
lib/libdbmail.so.0
lib/libdbmail.a
lib/libdbmail.la
lib/libdbmail.so
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
@ -23,10 +27,10 @@ sbin/dbmail-util
%%MYSQL%%lib/dbmail/libmysqldbmail.so
%%PGSQL%%%%DATADIR%%/sql/create_tables.pgsql
%%PGSQL%%%%DATADIR%%/sql/migrate_from_1.x_to_2.0.pgsql
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%/lib/dbmail/libpgsqldbmail.a
%%PGSQL%%/lib/dbmail/libpgsqldbmail.la
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so
%%PGSQL%%lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%lib/dbmail/libpgsqldbmail.a
%%PGSQL%%lib/dbmail/libpgsqldbmail.la
%%PGSQL%%lib/dbmail/libpgsqldbmail.so
@dirrm lib/dbmail
@dirrm %%DATADIR%%/sql
@dirrm %%DATADIR%%

View File

@ -6,8 +6,7 @@
#
PORTNAME= dbmail
PORTVERSION= 2.0.7
PORTREVISION= 2
PORTVERSION= 2.0.10
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.0/
PKGNAMESUFFIX= -${DATABASE}
@ -15,7 +14,6 @@ PKGNAMESUFFIX= -${DATABASE}
MAINTAINER= mark_sf@kikg.ifmo.ru
COMMENT= An SQL database-based mail system (POP3 and IMAP)
USE_REINPLACE= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --prefix=${PREFIX}
USE_GMAKE= YES
@ -59,21 +57,21 @@ pre-everything::
@${ECHO} ""
post-patch:
${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
${FIND} ${WRKSRC} -name '*.orig' -type f -delete
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name '*.orig' -type f -delete
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
${WRKSRC}/dbmail.h
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@${MKDIR} ${DATADIR}/sql
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
@${ECHO} ""
@${ECHO} "IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!"

View File

@ -1,3 +1,3 @@
MD5 (dbmail-2.0.7.tar.gz) = 11e6eded9e5ec533f6e6ed11fc62a4d8
SHA256 (dbmail-2.0.7.tar.gz) = ef678002a0f6eed3ae8babc17760e36a76e678852c50d70d8dee1fe693f54026
SIZE (dbmail-2.0.7.tar.gz) = 584457
MD5 (dbmail-2.0.10.tar.gz) = 985c41a6ded0a6094948c5835d9dd4ec
SHA256 (dbmail-2.0.10.tar.gz) = 249a57d7c163155c7bf2ca758fa1fabc676aa84d3a0d8403e497a8da7ff49716
SIZE (dbmail-2.0.10.tar.gz) = 632451

View File

@ -1,27 +0,0 @@
--- server.c.orig Wed Aug 24 13:35:38 2005
+++ server.c Tue Sep 13 22:21:59 2005
@@ -119,7 +119,7 @@
trace(TRACE_DEBUG, "StartServer(): children created, starting main service loop");
while (!GeneralStopRequested) {
- if (db_connect() != 0) {
+ if (db_check_connection() != 0) {
if (! stopped)
manage_stop_children();
@@ -128,12 +128,11 @@
sleep(10);
} else {
- if (stopped)
+ if (stopped) {
+ manage_restart_children();
stopped=0;
-
- db_disconnect();
+ }
- manage_restart_children();
manage_spare_children();
sleep(1);

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
--- server.c (revision 1888)
+++ server.c (revision 1889)
@@ -98,7 +98,6 @@
return -1;
if (db_check_version() != 0)
return -1;
- db_disconnect();
ParentPID = getpid();
Restart = 0;

View File

@ -1,25 +0,0 @@
--- serverchild.c (revision 1889)
+++ serverchild.c (revision 1890)
@@ -312,19 +312,16 @@
client.timeoutMsg = info->timeoutMsg;
client.timeout = info->timeout;
- strncpy(client.ip, inet_ntoa(saClient.sin_addr),
- IPNUM_LEN);
+ strncpy(client.ip, inet_ntoa(saClient.sin_addr), IPNUM_LEN);
client.clientname[0] = '\0';
if (info->resolveIP) {
- clientHost =
- gethostbyaddr((char *) &saClient.sin_addr,
+ clientHost = gethostbyaddr((char *) &saClient.sin_addr,
sizeof(saClient.sin_addr),
saClient.sin_family);
if (clientHost && clientHost->h_name)
- strncpy(client.clientname,
- clientHost->h_name, FIELDSIZE);
+ strncpy(client.clientname, clientHost->h_name, FIELDSIZE);
trace(TRACE_MESSAGE, "%s,%s: incoming connection from [%s (%s)]",
__FILE__, __func__,

View File

@ -1,22 +0,0 @@
--- sql/mysql/create_tables.mysql (revision 1889)
+++ sql/mysql/create_tables.mysql (revision 1890)
@@ -118,7 +118,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) DEFAULT '0' NOT NULL,
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) DEFAULT '0' NOT NULL,
is_header tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (messageblk_idnr),
--- sql/mysql/create_tables_innoDB.mysql (revision 1889)
+++ sql/mysql/create_tables_innoDB.mysql (revision 1890)
@@ -148,7 +148,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) NOT NULL default '0',
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) NOT NULL default '0',
is_header tinyint(1) NOT NULL default '0',
PRIMARY KEY (messageblk_idnr),

View File

@ -1,95 +0,0 @@
--- ChangeLog (revision 1890)
+++ ChangeLog (revision 1904)
@@ -1,3 +1,12 @@
+2005-10-01 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, debian/patches/04_mailfilter.dpatch:
+ added postgres table to mailfilter patch
+ * debian/changelog, serverchild.c, sql/mysql/create_tables.mysql,
+ sql/mysql/create_tables_innoDB.mysql:
+ change dbmail_messageblks.messageblk from longtext to longblob in mysql
+ create scripts
+
2005-09-27 Paul J Stevens <paul@nfg.nl>
* ChangeLog, buildtools/config.guess, buildtools/config.sub,
--- dsn.c (revision 1890)
+++ dsn.c (revision 1904)
@@ -309,8 +309,10 @@
*/
else { /* from: 'if (delivery->useridnr != 0)' */
- alias_count =
- auth_check_user_ext(delivery->address,
+ if (! strlen(delivery->address))
+ return 0;
+
+ alias_count = auth_check_user_ext(delivery->address,
delivery->userids,
delivery->forwards, 0);
trace(TRACE_DEBUG,
--- auth/authsql.c (revision 1890)
+++ auth/authsql.c (revision 1904)
@@ -385,6 +385,9 @@
return 0;
}
+ if (strlen(username) < 1)
+ return 0;
+
saveres = db_get_result_set();
db_set_result_set(NULL);
--- main.c (revision 1890)
+++ main.c (revision 1904)
@@ -405,27 +405,25 @@
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
- trace(TRACE_DEBUG, "main(): scanning for [%s]",
- deliver_to_header);
- if (mail_adr_list(deliver_to_header, &users, &mimelist) !=
- 0) {
- trace(TRACE_STOP,
- "main(): scanner found no email addresses (scanned for %s)",
+ trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
+ if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
+ trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
/* Loop through the users list, moving the entries into the dsnusers list. */
- for (tmp = list_getstart(&users); tmp != NULL;
- tmp = tmp->nextnode) {
- deliver_to_user_t dsnuser;
+ for (tmp = list_getstart(&users); tmp != NULL; tmp = tmp->nextnode) {
+ if (! (strlen((char *)tmp->data) > 0))
+ continue;
+
+ deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser,
- sizeof(deliver_to_user_t));
+ list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
}
}
@@ -433,11 +431,10 @@
if (deliver_to_mailbox != NULL) {
trace(TRACE_DEBUG, "main(): setting mailbox for all deliveries to [%s]",
deliver_to_mailbox);
+
/* Loop through the dsnusers list, setting the destination mailbox. */
- for (tmp = list_getstart(&dsnusers); tmp != NULL;
- tmp = tmp->nextnode) {
+ for (tmp = list_getstart(&dsnusers); tmp != NULL; tmp = tmp->nextnode)
((deliver_to_user_t *)tmp->data)->mailbox = dm_strdup(deliver_to_mailbox);
- }
}
if (dsnuser_resolve_list(&dsnusers) == -1) {

View File

@ -1,11 +0,0 @@
--- ChangeLog (revision 1904)
+++ ChangeLog (revision 1905)
@@ -1,3 +1,8 @@
+2005-10-18 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, auth/authsql.c, dsn.c, main.c:
+ ignore empty addresses in delivery chain
+
2005-10-01 Paul J Stevens <paul@nfg.nl>
* ChangeLog, debian/patches/04_mailfilter.dpatch:

View File

@ -1,38 +0,0 @@
--- imapcommands.c (revision 1904)
+++ imapcommands.c (revision 1905)
@@ -1787,6 +1787,8 @@
if (args[i + 1]) {
struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
+
if (strptime(args[i], "%d-%b-%Y %T", &tm) != NULL)
strftime(sqldate,
sizeof(sqldate), "%Y-%m-%d %H:%M:%S",
--- imaputil.c (revision 1904)
+++ imaputil.c (revision 1905)
@@ -1788,13 +1788,14 @@
time_t ltime;
char *last;
+ memset(&tm_sql_date, 0, sizeof(struct tm));
+
last = strptime(sqldate,"%Y-%m-%d %T", &tm_sql_date);
if ( (last == NULL) || (*last != '\0') ) {
strcpy(_imapdate, IMAP_STANDARD_DATE);
return _imapdate;
}
- /* FIXME: this works fine on linux, but may cause dst offsets in netbsd. */
ltime = mktime (&tm_sql_date);
tm_imap_date = localtime(&ltime);
@@ -1814,6 +1815,8 @@
struct tm tm;
char *last_char;
+ memset(&tm, 0, sizeof(struct tm));
+
last_char = strptime(imapdate, "%d-%b-%Y", &tm);
if (last_char == NULL || *last_char != '\0') {
trace(TRACE_DEBUG, "%s,%s: error parsing IMAP date %s",

View File

@ -1,52 +0,0 @@
--- main.c (revision 1905)
+++ main.c (revision 1948)
@@ -388,8 +388,8 @@
/* parse the list and scan for field and content */
if (mime_readheader(header, &dummyidx, &mimelist, &dummysize) < 0) {
- trace(TRACE_ERROR,
- "main(): mime_readheader failed to read a header list");
+ trace(TRACE_ERROR, "%s,%s: mime_readheader failed",
+ __FILE__, __func__);
exitcode = EX_TEMPFAIL;
goto freeall;
}
@@ -400,15 +400,16 @@
if (returnpath.total_nodes == 0)
mail_adr_list("From", &returnpath, &mimelist);
if (returnpath.total_nodes == 0)
- trace(TRACE_DEBUG, "main(): no return path found.");
+ trace(TRACE_DEBUG, "%s,%s: no return path found.",
+ __FILE__,__func__);
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
- trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
- deliver_to_header);
+ trace(TRACE_STOP, "%s,%s: no email addresses found (scanned for %s)",
+ __FILE__,__func__, deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
@@ -419,11 +420,16 @@
if (! (strlen((char *)tmp->data) > 0))
continue;
- deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
+ if (! list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t))) {
+ trace(TRACE_ERROR,"%s,%s: out of memory in list_nodeadd",
+ __FILE__, __func__);
+ exitcode = EX_TEMPFAIL;
+ goto freeall;
+ }
+
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,10 @@ lib/dbmail/libsortdbmail.so.0
lib/dbmail/libsortdbmail.a
lib/dbmail/libsortdbmail.la
lib/dbmail/libsortdbmail.so
lib/libdbmail.so.0
lib/libdbmail.a
lib/libdbmail.la
lib/libdbmail.so
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
@ -23,10 +27,10 @@ sbin/dbmail-util
%%MYSQL%%lib/dbmail/libmysqldbmail.so
%%PGSQL%%%%DATADIR%%/sql/create_tables.pgsql
%%PGSQL%%%%DATADIR%%/sql/migrate_from_1.x_to_2.0.pgsql
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%/lib/dbmail/libpgsqldbmail.a
%%PGSQL%%/lib/dbmail/libpgsqldbmail.la
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so
%%PGSQL%%lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%lib/dbmail/libpgsqldbmail.a
%%PGSQL%%lib/dbmail/libpgsqldbmail.la
%%PGSQL%%lib/dbmail/libpgsqldbmail.so
@dirrm lib/dbmail
@dirrm %%DATADIR%%/sql
@dirrm %%DATADIR%%

View File

@ -6,8 +6,7 @@
#
PORTNAME= dbmail
PORTVERSION= 2.0.7
PORTREVISION= 2
PORTVERSION= 2.0.10
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.0/
PKGNAMESUFFIX= -${DATABASE}
@ -15,7 +14,6 @@ PKGNAMESUFFIX= -${DATABASE}
MAINTAINER= mark_sf@kikg.ifmo.ru
COMMENT= An SQL database-based mail system (POP3 and IMAP)
USE_REINPLACE= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --prefix=${PREFIX}
USE_GMAKE= YES
@ -59,21 +57,21 @@ pre-everything::
@${ECHO} ""
post-patch:
${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
${FIND} ${WRKSRC} -name '*.orig' -type f -delete
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name '*.orig' -type f -delete
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
${WRKSRC}/dbmail.h
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@${MKDIR} ${DATADIR}/sql
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
@${ECHO} ""
@${ECHO} "IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!"

View File

@ -1,3 +1,3 @@
MD5 (dbmail-2.0.7.tar.gz) = 11e6eded9e5ec533f6e6ed11fc62a4d8
SHA256 (dbmail-2.0.7.tar.gz) = ef678002a0f6eed3ae8babc17760e36a76e678852c50d70d8dee1fe693f54026
SIZE (dbmail-2.0.7.tar.gz) = 584457
MD5 (dbmail-2.0.10.tar.gz) = 985c41a6ded0a6094948c5835d9dd4ec
SHA256 (dbmail-2.0.10.tar.gz) = 249a57d7c163155c7bf2ca758fa1fabc676aa84d3a0d8403e497a8da7ff49716
SIZE (dbmail-2.0.10.tar.gz) = 632451

View File

@ -1,27 +0,0 @@
--- server.c.orig Wed Aug 24 13:35:38 2005
+++ server.c Tue Sep 13 22:21:59 2005
@@ -119,7 +119,7 @@
trace(TRACE_DEBUG, "StartServer(): children created, starting main service loop");
while (!GeneralStopRequested) {
- if (db_connect() != 0) {
+ if (db_check_connection() != 0) {
if (! stopped)
manage_stop_children();
@@ -128,12 +128,11 @@
sleep(10);
} else {
- if (stopped)
+ if (stopped) {
+ manage_restart_children();
stopped=0;
-
- db_disconnect();
+ }
- manage_restart_children();
manage_spare_children();
sleep(1);

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
--- server.c (revision 1888)
+++ server.c (revision 1889)
@@ -98,7 +98,6 @@
return -1;
if (db_check_version() != 0)
return -1;
- db_disconnect();
ParentPID = getpid();
Restart = 0;

View File

@ -1,25 +0,0 @@
--- serverchild.c (revision 1889)
+++ serverchild.c (revision 1890)
@@ -312,19 +312,16 @@
client.timeoutMsg = info->timeoutMsg;
client.timeout = info->timeout;
- strncpy(client.ip, inet_ntoa(saClient.sin_addr),
- IPNUM_LEN);
+ strncpy(client.ip, inet_ntoa(saClient.sin_addr), IPNUM_LEN);
client.clientname[0] = '\0';
if (info->resolveIP) {
- clientHost =
- gethostbyaddr((char *) &saClient.sin_addr,
+ clientHost = gethostbyaddr((char *) &saClient.sin_addr,
sizeof(saClient.sin_addr),
saClient.sin_family);
if (clientHost && clientHost->h_name)
- strncpy(client.clientname,
- clientHost->h_name, FIELDSIZE);
+ strncpy(client.clientname, clientHost->h_name, FIELDSIZE);
trace(TRACE_MESSAGE, "%s,%s: incoming connection from [%s (%s)]",
__FILE__, __func__,

View File

@ -1,22 +0,0 @@
--- sql/mysql/create_tables.mysql (revision 1889)
+++ sql/mysql/create_tables.mysql (revision 1890)
@@ -118,7 +118,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) DEFAULT '0' NOT NULL,
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) DEFAULT '0' NOT NULL,
is_header tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (messageblk_idnr),
--- sql/mysql/create_tables_innoDB.mysql (revision 1889)
+++ sql/mysql/create_tables_innoDB.mysql (revision 1890)
@@ -148,7 +148,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) NOT NULL default '0',
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) NOT NULL default '0',
is_header tinyint(1) NOT NULL default '0',
PRIMARY KEY (messageblk_idnr),

View File

@ -1,95 +0,0 @@
--- ChangeLog (revision 1890)
+++ ChangeLog (revision 1904)
@@ -1,3 +1,12 @@
+2005-10-01 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, debian/patches/04_mailfilter.dpatch:
+ added postgres table to mailfilter patch
+ * debian/changelog, serverchild.c, sql/mysql/create_tables.mysql,
+ sql/mysql/create_tables_innoDB.mysql:
+ change dbmail_messageblks.messageblk from longtext to longblob in mysql
+ create scripts
+
2005-09-27 Paul J Stevens <paul@nfg.nl>
* ChangeLog, buildtools/config.guess, buildtools/config.sub,
--- dsn.c (revision 1890)
+++ dsn.c (revision 1904)
@@ -309,8 +309,10 @@
*/
else { /* from: 'if (delivery->useridnr != 0)' */
- alias_count =
- auth_check_user_ext(delivery->address,
+ if (! strlen(delivery->address))
+ return 0;
+
+ alias_count = auth_check_user_ext(delivery->address,
delivery->userids,
delivery->forwards, 0);
trace(TRACE_DEBUG,
--- auth/authsql.c (revision 1890)
+++ auth/authsql.c (revision 1904)
@@ -385,6 +385,9 @@
return 0;
}
+ if (strlen(username) < 1)
+ return 0;
+
saveres = db_get_result_set();
db_set_result_set(NULL);
--- main.c (revision 1890)
+++ main.c (revision 1904)
@@ -405,27 +405,25 @@
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
- trace(TRACE_DEBUG, "main(): scanning for [%s]",
- deliver_to_header);
- if (mail_adr_list(deliver_to_header, &users, &mimelist) !=
- 0) {
- trace(TRACE_STOP,
- "main(): scanner found no email addresses (scanned for %s)",
+ trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
+ if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
+ trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
/* Loop through the users list, moving the entries into the dsnusers list. */
- for (tmp = list_getstart(&users); tmp != NULL;
- tmp = tmp->nextnode) {
- deliver_to_user_t dsnuser;
+ for (tmp = list_getstart(&users); tmp != NULL; tmp = tmp->nextnode) {
+ if (! (strlen((char *)tmp->data) > 0))
+ continue;
+
+ deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser,
- sizeof(deliver_to_user_t));
+ list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
}
}
@@ -433,11 +431,10 @@
if (deliver_to_mailbox != NULL) {
trace(TRACE_DEBUG, "main(): setting mailbox for all deliveries to [%s]",
deliver_to_mailbox);
+
/* Loop through the dsnusers list, setting the destination mailbox. */
- for (tmp = list_getstart(&dsnusers); tmp != NULL;
- tmp = tmp->nextnode) {
+ for (tmp = list_getstart(&dsnusers); tmp != NULL; tmp = tmp->nextnode)
((deliver_to_user_t *)tmp->data)->mailbox = dm_strdup(deliver_to_mailbox);
- }
}
if (dsnuser_resolve_list(&dsnusers) == -1) {

View File

@ -1,11 +0,0 @@
--- ChangeLog (revision 1904)
+++ ChangeLog (revision 1905)
@@ -1,3 +1,8 @@
+2005-10-18 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, auth/authsql.c, dsn.c, main.c:
+ ignore empty addresses in delivery chain
+
2005-10-01 Paul J Stevens <paul@nfg.nl>
* ChangeLog, debian/patches/04_mailfilter.dpatch:

View File

@ -1,38 +0,0 @@
--- imapcommands.c (revision 1904)
+++ imapcommands.c (revision 1905)
@@ -1787,6 +1787,8 @@
if (args[i + 1]) {
struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
+
if (strptime(args[i], "%d-%b-%Y %T", &tm) != NULL)
strftime(sqldate,
sizeof(sqldate), "%Y-%m-%d %H:%M:%S",
--- imaputil.c (revision 1904)
+++ imaputil.c (revision 1905)
@@ -1788,13 +1788,14 @@
time_t ltime;
char *last;
+ memset(&tm_sql_date, 0, sizeof(struct tm));
+
last = strptime(sqldate,"%Y-%m-%d %T", &tm_sql_date);
if ( (last == NULL) || (*last != '\0') ) {
strcpy(_imapdate, IMAP_STANDARD_DATE);
return _imapdate;
}
- /* FIXME: this works fine on linux, but may cause dst offsets in netbsd. */
ltime = mktime (&tm_sql_date);
tm_imap_date = localtime(&ltime);
@@ -1814,6 +1815,8 @@
struct tm tm;
char *last_char;
+ memset(&tm, 0, sizeof(struct tm));
+
last_char = strptime(imapdate, "%d-%b-%Y", &tm);
if (last_char == NULL || *last_char != '\0') {
trace(TRACE_DEBUG, "%s,%s: error parsing IMAP date %s",

View File

@ -1,52 +0,0 @@
--- main.c (revision 1905)
+++ main.c (revision 1948)
@@ -388,8 +388,8 @@
/* parse the list and scan for field and content */
if (mime_readheader(header, &dummyidx, &mimelist, &dummysize) < 0) {
- trace(TRACE_ERROR,
- "main(): mime_readheader failed to read a header list");
+ trace(TRACE_ERROR, "%s,%s: mime_readheader failed",
+ __FILE__, __func__);
exitcode = EX_TEMPFAIL;
goto freeall;
}
@@ -400,15 +400,16 @@
if (returnpath.total_nodes == 0)
mail_adr_list("From", &returnpath, &mimelist);
if (returnpath.total_nodes == 0)
- trace(TRACE_DEBUG, "main(): no return path found.");
+ trace(TRACE_DEBUG, "%s,%s: no return path found.",
+ __FILE__,__func__);
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
- trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
- deliver_to_header);
+ trace(TRACE_STOP, "%s,%s: no email addresses found (scanned for %s)",
+ __FILE__,__func__, deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
@@ -419,11 +420,16 @@
if (! (strlen((char *)tmp->data) > 0))
continue;
- deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
+ if (! list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t))) {
+ trace(TRACE_ERROR,"%s,%s: out of memory in list_nodeadd",
+ __FILE__, __func__);
+ exitcode = EX_TEMPFAIL;
+ goto freeall;
+ }
+
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,10 @@ lib/dbmail/libsortdbmail.so.0
lib/dbmail/libsortdbmail.a
lib/dbmail/libsortdbmail.la
lib/dbmail/libsortdbmail.so
lib/libdbmail.so.0
lib/libdbmail.a
lib/libdbmail.la
lib/libdbmail.so
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
@ -23,10 +27,10 @@ sbin/dbmail-util
%%MYSQL%%lib/dbmail/libmysqldbmail.so
%%PGSQL%%%%DATADIR%%/sql/create_tables.pgsql
%%PGSQL%%%%DATADIR%%/sql/migrate_from_1.x_to_2.0.pgsql
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%/lib/dbmail/libpgsqldbmail.a
%%PGSQL%%/lib/dbmail/libpgsqldbmail.la
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so
%%PGSQL%%lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%lib/dbmail/libpgsqldbmail.a
%%PGSQL%%lib/dbmail/libpgsqldbmail.la
%%PGSQL%%lib/dbmail/libpgsqldbmail.so
@dirrm lib/dbmail
@dirrm %%DATADIR%%/sql
@dirrm %%DATADIR%%

View File

@ -6,8 +6,7 @@
#
PORTNAME= dbmail
PORTVERSION= 2.0.7
PORTREVISION= 2
PORTVERSION= 2.0.10
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.0/
PKGNAMESUFFIX= -${DATABASE}
@ -15,7 +14,6 @@ PKGNAMESUFFIX= -${DATABASE}
MAINTAINER= mark_sf@kikg.ifmo.ru
COMMENT= An SQL database-based mail system (POP3 and IMAP)
USE_REINPLACE= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --prefix=${PREFIX}
USE_GMAKE= YES
@ -59,21 +57,21 @@ pre-everything::
@${ECHO} ""
post-patch:
${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
${FIND} ${WRKSRC} -name '*.orig' -type f -delete
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name '*.orig' -type f -delete
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
${WRKSRC}/dbmail.h
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@${MKDIR} ${DATADIR}/sql
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
@${ECHO} ""
@${ECHO} "IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!"

View File

@ -1,3 +1,3 @@
MD5 (dbmail-2.0.7.tar.gz) = 11e6eded9e5ec533f6e6ed11fc62a4d8
SHA256 (dbmail-2.0.7.tar.gz) = ef678002a0f6eed3ae8babc17760e36a76e678852c50d70d8dee1fe693f54026
SIZE (dbmail-2.0.7.tar.gz) = 584457
MD5 (dbmail-2.0.10.tar.gz) = 985c41a6ded0a6094948c5835d9dd4ec
SHA256 (dbmail-2.0.10.tar.gz) = 249a57d7c163155c7bf2ca758fa1fabc676aa84d3a0d8403e497a8da7ff49716
SIZE (dbmail-2.0.10.tar.gz) = 632451

View File

@ -1,27 +0,0 @@
--- server.c.orig Wed Aug 24 13:35:38 2005
+++ server.c Tue Sep 13 22:21:59 2005
@@ -119,7 +119,7 @@
trace(TRACE_DEBUG, "StartServer(): children created, starting main service loop");
while (!GeneralStopRequested) {
- if (db_connect() != 0) {
+ if (db_check_connection() != 0) {
if (! stopped)
manage_stop_children();
@@ -128,12 +128,11 @@
sleep(10);
} else {
- if (stopped)
+ if (stopped) {
+ manage_restart_children();
stopped=0;
-
- db_disconnect();
+ }
- manage_restart_children();
manage_spare_children();
sleep(1);

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
--- server.c (revision 1888)
+++ server.c (revision 1889)
@@ -98,7 +98,6 @@
return -1;
if (db_check_version() != 0)
return -1;
- db_disconnect();
ParentPID = getpid();
Restart = 0;

View File

@ -1,25 +0,0 @@
--- serverchild.c (revision 1889)
+++ serverchild.c (revision 1890)
@@ -312,19 +312,16 @@
client.timeoutMsg = info->timeoutMsg;
client.timeout = info->timeout;
- strncpy(client.ip, inet_ntoa(saClient.sin_addr),
- IPNUM_LEN);
+ strncpy(client.ip, inet_ntoa(saClient.sin_addr), IPNUM_LEN);
client.clientname[0] = '\0';
if (info->resolveIP) {
- clientHost =
- gethostbyaddr((char *) &saClient.sin_addr,
+ clientHost = gethostbyaddr((char *) &saClient.sin_addr,
sizeof(saClient.sin_addr),
saClient.sin_family);
if (clientHost && clientHost->h_name)
- strncpy(client.clientname,
- clientHost->h_name, FIELDSIZE);
+ strncpy(client.clientname, clientHost->h_name, FIELDSIZE);
trace(TRACE_MESSAGE, "%s,%s: incoming connection from [%s (%s)]",
__FILE__, __func__,

View File

@ -1,22 +0,0 @@
--- sql/mysql/create_tables.mysql (revision 1889)
+++ sql/mysql/create_tables.mysql (revision 1890)
@@ -118,7 +118,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) DEFAULT '0' NOT NULL,
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) DEFAULT '0' NOT NULL,
is_header tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (messageblk_idnr),
--- sql/mysql/create_tables_innoDB.mysql (revision 1889)
+++ sql/mysql/create_tables_innoDB.mysql (revision 1890)
@@ -148,7 +148,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) NOT NULL default '0',
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) NOT NULL default '0',
is_header tinyint(1) NOT NULL default '0',
PRIMARY KEY (messageblk_idnr),

View File

@ -1,95 +0,0 @@
--- ChangeLog (revision 1890)
+++ ChangeLog (revision 1904)
@@ -1,3 +1,12 @@
+2005-10-01 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, debian/patches/04_mailfilter.dpatch:
+ added postgres table to mailfilter patch
+ * debian/changelog, serverchild.c, sql/mysql/create_tables.mysql,
+ sql/mysql/create_tables_innoDB.mysql:
+ change dbmail_messageblks.messageblk from longtext to longblob in mysql
+ create scripts
+
2005-09-27 Paul J Stevens <paul@nfg.nl>
* ChangeLog, buildtools/config.guess, buildtools/config.sub,
--- dsn.c (revision 1890)
+++ dsn.c (revision 1904)
@@ -309,8 +309,10 @@
*/
else { /* from: 'if (delivery->useridnr != 0)' */
- alias_count =
- auth_check_user_ext(delivery->address,
+ if (! strlen(delivery->address))
+ return 0;
+
+ alias_count = auth_check_user_ext(delivery->address,
delivery->userids,
delivery->forwards, 0);
trace(TRACE_DEBUG,
--- auth/authsql.c (revision 1890)
+++ auth/authsql.c (revision 1904)
@@ -385,6 +385,9 @@
return 0;
}
+ if (strlen(username) < 1)
+ return 0;
+
saveres = db_get_result_set();
db_set_result_set(NULL);
--- main.c (revision 1890)
+++ main.c (revision 1904)
@@ -405,27 +405,25 @@
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
- trace(TRACE_DEBUG, "main(): scanning for [%s]",
- deliver_to_header);
- if (mail_adr_list(deliver_to_header, &users, &mimelist) !=
- 0) {
- trace(TRACE_STOP,
- "main(): scanner found no email addresses (scanned for %s)",
+ trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
+ if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
+ trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
/* Loop through the users list, moving the entries into the dsnusers list. */
- for (tmp = list_getstart(&users); tmp != NULL;
- tmp = tmp->nextnode) {
- deliver_to_user_t dsnuser;
+ for (tmp = list_getstart(&users); tmp != NULL; tmp = tmp->nextnode) {
+ if (! (strlen((char *)tmp->data) > 0))
+ continue;
+
+ deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser,
- sizeof(deliver_to_user_t));
+ list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
}
}
@@ -433,11 +431,10 @@
if (deliver_to_mailbox != NULL) {
trace(TRACE_DEBUG, "main(): setting mailbox for all deliveries to [%s]",
deliver_to_mailbox);
+
/* Loop through the dsnusers list, setting the destination mailbox. */
- for (tmp = list_getstart(&dsnusers); tmp != NULL;
- tmp = tmp->nextnode) {
+ for (tmp = list_getstart(&dsnusers); tmp != NULL; tmp = tmp->nextnode)
((deliver_to_user_t *)tmp->data)->mailbox = dm_strdup(deliver_to_mailbox);
- }
}
if (dsnuser_resolve_list(&dsnusers) == -1) {

View File

@ -1,11 +0,0 @@
--- ChangeLog (revision 1904)
+++ ChangeLog (revision 1905)
@@ -1,3 +1,8 @@
+2005-10-18 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, auth/authsql.c, dsn.c, main.c:
+ ignore empty addresses in delivery chain
+
2005-10-01 Paul J Stevens <paul@nfg.nl>
* ChangeLog, debian/patches/04_mailfilter.dpatch:

View File

@ -1,38 +0,0 @@
--- imapcommands.c (revision 1904)
+++ imapcommands.c (revision 1905)
@@ -1787,6 +1787,8 @@
if (args[i + 1]) {
struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
+
if (strptime(args[i], "%d-%b-%Y %T", &tm) != NULL)
strftime(sqldate,
sizeof(sqldate), "%Y-%m-%d %H:%M:%S",
--- imaputil.c (revision 1904)
+++ imaputil.c (revision 1905)
@@ -1788,13 +1788,14 @@
time_t ltime;
char *last;
+ memset(&tm_sql_date, 0, sizeof(struct tm));
+
last = strptime(sqldate,"%Y-%m-%d %T", &tm_sql_date);
if ( (last == NULL) || (*last != '\0') ) {
strcpy(_imapdate, IMAP_STANDARD_DATE);
return _imapdate;
}
- /* FIXME: this works fine on linux, but may cause dst offsets in netbsd. */
ltime = mktime (&tm_sql_date);
tm_imap_date = localtime(&ltime);
@@ -1814,6 +1815,8 @@
struct tm tm;
char *last_char;
+ memset(&tm, 0, sizeof(struct tm));
+
last_char = strptime(imapdate, "%d-%b-%Y", &tm);
if (last_char == NULL || *last_char != '\0') {
trace(TRACE_DEBUG, "%s,%s: error parsing IMAP date %s",

View File

@ -1,52 +0,0 @@
--- main.c (revision 1905)
+++ main.c (revision 1948)
@@ -388,8 +388,8 @@
/* parse the list and scan for field and content */
if (mime_readheader(header, &dummyidx, &mimelist, &dummysize) < 0) {
- trace(TRACE_ERROR,
- "main(): mime_readheader failed to read a header list");
+ trace(TRACE_ERROR, "%s,%s: mime_readheader failed",
+ __FILE__, __func__);
exitcode = EX_TEMPFAIL;
goto freeall;
}
@@ -400,15 +400,16 @@
if (returnpath.total_nodes == 0)
mail_adr_list("From", &returnpath, &mimelist);
if (returnpath.total_nodes == 0)
- trace(TRACE_DEBUG, "main(): no return path found.");
+ trace(TRACE_DEBUG, "%s,%s: no return path found.",
+ __FILE__,__func__);
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
- trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
- deliver_to_header);
+ trace(TRACE_STOP, "%s,%s: no email addresses found (scanned for %s)",
+ __FILE__,__func__, deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
@@ -419,11 +420,16 @@
if (! (strlen((char *)tmp->data) > 0))
continue;
- deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
+ if (! list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t))) {
+ trace(TRACE_ERROR,"%s,%s: out of memory in list_nodeadd",
+ __FILE__, __func__);
+ exitcode = EX_TEMPFAIL;
+ goto freeall;
+ }
+
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,10 @@ lib/dbmail/libsortdbmail.so.0
lib/dbmail/libsortdbmail.a
lib/dbmail/libsortdbmail.la
lib/dbmail/libsortdbmail.so
lib/libdbmail.so.0
lib/libdbmail.a
lib/libdbmail.la
lib/libdbmail.so
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
@ -23,10 +27,10 @@ sbin/dbmail-util
%%MYSQL%%lib/dbmail/libmysqldbmail.so
%%PGSQL%%%%DATADIR%%/sql/create_tables.pgsql
%%PGSQL%%%%DATADIR%%/sql/migrate_from_1.x_to_2.0.pgsql
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%/lib/dbmail/libpgsqldbmail.a
%%PGSQL%%/lib/dbmail/libpgsqldbmail.la
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so
%%PGSQL%%lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%lib/dbmail/libpgsqldbmail.a
%%PGSQL%%lib/dbmail/libpgsqldbmail.la
%%PGSQL%%lib/dbmail/libpgsqldbmail.so
@dirrm lib/dbmail
@dirrm %%DATADIR%%/sql
@dirrm %%DATADIR%%

View File

@ -6,8 +6,7 @@
#
PORTNAME= dbmail
PORTVERSION= 2.0.7
PORTREVISION= 2
PORTVERSION= 2.0.10
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.0/
PKGNAMESUFFIX= -${DATABASE}
@ -15,7 +14,6 @@ PKGNAMESUFFIX= -${DATABASE}
MAINTAINER= mark_sf@kikg.ifmo.ru
COMMENT= An SQL database-based mail system (POP3 and IMAP)
USE_REINPLACE= YES
GNU_CONFIGURE= YES
CONFIGURE_ARGS= --prefix=${PREFIX}
USE_GMAKE= YES
@ -59,21 +57,21 @@ pre-everything::
@${ECHO} ""
post-patch:
${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
${FIND} ${WRKSRC} -name '*.orig' -type f -delete
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
@${FIND} ${WRKSRC} -name '*.orig' -type f -delete
post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
${WRKSRC}/dbmail.h
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
@${MKDIR} ${DATADIR}/sql
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
@${ECHO} ""
@${ECHO} "IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!"

View File

@ -1,3 +1,3 @@
MD5 (dbmail-2.0.7.tar.gz) = 11e6eded9e5ec533f6e6ed11fc62a4d8
SHA256 (dbmail-2.0.7.tar.gz) = ef678002a0f6eed3ae8babc17760e36a76e678852c50d70d8dee1fe693f54026
SIZE (dbmail-2.0.7.tar.gz) = 584457
MD5 (dbmail-2.0.10.tar.gz) = 985c41a6ded0a6094948c5835d9dd4ec
SHA256 (dbmail-2.0.10.tar.gz) = 249a57d7c163155c7bf2ca758fa1fabc676aa84d3a0d8403e497a8da7ff49716
SIZE (dbmail-2.0.10.tar.gz) = 632451

View File

@ -1,27 +0,0 @@
--- server.c.orig Wed Aug 24 13:35:38 2005
+++ server.c Tue Sep 13 22:21:59 2005
@@ -119,7 +119,7 @@
trace(TRACE_DEBUG, "StartServer(): children created, starting main service loop");
while (!GeneralStopRequested) {
- if (db_connect() != 0) {
+ if (db_check_connection() != 0) {
if (! stopped)
manage_stop_children();
@@ -128,12 +128,11 @@
sleep(10);
} else {
- if (stopped)
+ if (stopped) {
+ manage_restart_children();
stopped=0;
-
- db_disconnect();
+ }
- manage_restart_children();
manage_spare_children();
sleep(1);

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
--- server.c (revision 1888)
+++ server.c (revision 1889)
@@ -98,7 +98,6 @@
return -1;
if (db_check_version() != 0)
return -1;
- db_disconnect();
ParentPID = getpid();
Restart = 0;

View File

@ -1,25 +0,0 @@
--- serverchild.c (revision 1889)
+++ serverchild.c (revision 1890)
@@ -312,19 +312,16 @@
client.timeoutMsg = info->timeoutMsg;
client.timeout = info->timeout;
- strncpy(client.ip, inet_ntoa(saClient.sin_addr),
- IPNUM_LEN);
+ strncpy(client.ip, inet_ntoa(saClient.sin_addr), IPNUM_LEN);
client.clientname[0] = '\0';
if (info->resolveIP) {
- clientHost =
- gethostbyaddr((char *) &saClient.sin_addr,
+ clientHost = gethostbyaddr((char *) &saClient.sin_addr,
sizeof(saClient.sin_addr),
saClient.sin_family);
if (clientHost && clientHost->h_name)
- strncpy(client.clientname,
- clientHost->h_name, FIELDSIZE);
+ strncpy(client.clientname, clientHost->h_name, FIELDSIZE);
trace(TRACE_MESSAGE, "%s,%s: incoming connection from [%s (%s)]",
__FILE__, __func__,

View File

@ -1,22 +0,0 @@
--- sql/mysql/create_tables.mysql (revision 1889)
+++ sql/mysql/create_tables.mysql (revision 1890)
@@ -118,7 +118,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) DEFAULT '0' NOT NULL,
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) DEFAULT '0' NOT NULL,
is_header tinyint(1) DEFAULT '0' NOT NULL,
PRIMARY KEY (messageblk_idnr),
--- sql/mysql/create_tables_innoDB.mysql (revision 1889)
+++ sql/mysql/create_tables_innoDB.mysql (revision 1890)
@@ -148,7 +148,7 @@
CREATE TABLE dbmail_messageblks (
messageblk_idnr bigint(21) NOT NULL auto_increment,
physmessage_id bigint(21) NOT NULL default '0',
- messageblk longtext NOT NULL,
+ messageblk longblob NOT NULL,
blocksize bigint(21) NOT NULL default '0',
is_header tinyint(1) NOT NULL default '0',
PRIMARY KEY (messageblk_idnr),

View File

@ -1,95 +0,0 @@
--- ChangeLog (revision 1890)
+++ ChangeLog (revision 1904)
@@ -1,3 +1,12 @@
+2005-10-01 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, debian/patches/04_mailfilter.dpatch:
+ added postgres table to mailfilter patch
+ * debian/changelog, serverchild.c, sql/mysql/create_tables.mysql,
+ sql/mysql/create_tables_innoDB.mysql:
+ change dbmail_messageblks.messageblk from longtext to longblob in mysql
+ create scripts
+
2005-09-27 Paul J Stevens <paul@nfg.nl>
* ChangeLog, buildtools/config.guess, buildtools/config.sub,
--- dsn.c (revision 1890)
+++ dsn.c (revision 1904)
@@ -309,8 +309,10 @@
*/
else { /* from: 'if (delivery->useridnr != 0)' */
- alias_count =
- auth_check_user_ext(delivery->address,
+ if (! strlen(delivery->address))
+ return 0;
+
+ alias_count = auth_check_user_ext(delivery->address,
delivery->userids,
delivery->forwards, 0);
trace(TRACE_DEBUG,
--- auth/authsql.c (revision 1890)
+++ auth/authsql.c (revision 1904)
@@ -385,6 +385,9 @@
return 0;
}
+ if (strlen(username) < 1)
+ return 0;
+
saveres = db_get_result_set();
db_set_result_set(NULL);
--- main.c (revision 1890)
+++ main.c (revision 1904)
@@ -405,27 +405,25 @@
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
- trace(TRACE_DEBUG, "main(): scanning for [%s]",
- deliver_to_header);
- if (mail_adr_list(deliver_to_header, &users, &mimelist) !=
- 0) {
- trace(TRACE_STOP,
- "main(): scanner found no email addresses (scanned for %s)",
+ trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
+ if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
+ trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
/* Loop through the users list, moving the entries into the dsnusers list. */
- for (tmp = list_getstart(&users); tmp != NULL;
- tmp = tmp->nextnode) {
- deliver_to_user_t dsnuser;
+ for (tmp = list_getstart(&users); tmp != NULL; tmp = tmp->nextnode) {
+ if (! (strlen((char *)tmp->data) > 0))
+ continue;
+
+ deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser,
- sizeof(deliver_to_user_t));
+ list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
}
}
@@ -433,11 +431,10 @@
if (deliver_to_mailbox != NULL) {
trace(TRACE_DEBUG, "main(): setting mailbox for all deliveries to [%s]",
deliver_to_mailbox);
+
/* Loop through the dsnusers list, setting the destination mailbox. */
- for (tmp = list_getstart(&dsnusers); tmp != NULL;
- tmp = tmp->nextnode) {
+ for (tmp = list_getstart(&dsnusers); tmp != NULL; tmp = tmp->nextnode)
((deliver_to_user_t *)tmp->data)->mailbox = dm_strdup(deliver_to_mailbox);
- }
}
if (dsnuser_resolve_list(&dsnusers) == -1) {

View File

@ -1,11 +0,0 @@
--- ChangeLog (revision 1904)
+++ ChangeLog (revision 1905)
@@ -1,3 +1,8 @@
+2005-10-18 Paul J Stevens <paul@nfg.nl>
+
+ * ChangeLog, auth/authsql.c, dsn.c, main.c:
+ ignore empty addresses in delivery chain
+
2005-10-01 Paul J Stevens <paul@nfg.nl>
* ChangeLog, debian/patches/04_mailfilter.dpatch:

View File

@ -1,38 +0,0 @@
--- imapcommands.c (revision 1904)
+++ imapcommands.c (revision 1905)
@@ -1787,6 +1787,8 @@
if (args[i + 1]) {
struct tm tm;
+ memset(&tm, 0, sizeof(struct tm));
+
if (strptime(args[i], "%d-%b-%Y %T", &tm) != NULL)
strftime(sqldate,
sizeof(sqldate), "%Y-%m-%d %H:%M:%S",
--- imaputil.c (revision 1904)
+++ imaputil.c (revision 1905)
@@ -1788,13 +1788,14 @@
time_t ltime;
char *last;
+ memset(&tm_sql_date, 0, sizeof(struct tm));
+
last = strptime(sqldate,"%Y-%m-%d %T", &tm_sql_date);
if ( (last == NULL) || (*last != '\0') ) {
strcpy(_imapdate, IMAP_STANDARD_DATE);
return _imapdate;
}
- /* FIXME: this works fine on linux, but may cause dst offsets in netbsd. */
ltime = mktime (&tm_sql_date);
tm_imap_date = localtime(&ltime);
@@ -1814,6 +1815,8 @@
struct tm tm;
char *last_char;
+ memset(&tm, 0, sizeof(struct tm));
+
last_char = strptime(imapdate, "%d-%b-%Y", &tm);
if (last_char == NULL || *last_char != '\0') {
trace(TRACE_DEBUG, "%s,%s: error parsing IMAP date %s",

View File

@ -1,52 +0,0 @@
--- main.c (revision 1905)
+++ main.c (revision 1948)
@@ -388,8 +388,8 @@
/* parse the list and scan for field and content */
if (mime_readheader(header, &dummyidx, &mimelist, &dummysize) < 0) {
- trace(TRACE_ERROR,
- "main(): mime_readheader failed to read a header list");
+ trace(TRACE_ERROR, "%s,%s: mime_readheader failed",
+ __FILE__, __func__);
exitcode = EX_TEMPFAIL;
goto freeall;
}
@@ -400,15 +400,16 @@
if (returnpath.total_nodes == 0)
mail_adr_list("From", &returnpath, &mimelist);
if (returnpath.total_nodes == 0)
- trace(TRACE_DEBUG, "main(): no return path found.");
+ trace(TRACE_DEBUG, "%s,%s: no return path found.",
+ __FILE__,__func__);
/* If the NORMAL delivery mode has been selected... */
if (deliver_to_header != NULL) {
/* parse for destination addresses */
trace(TRACE_DEBUG, "main(): scanning for [%s]", deliver_to_header);
if (mail_adr_list(deliver_to_header, &users, &mimelist) != 0) {
- trace(TRACE_STOP, "main(): scanner found no email addresses (scanned for %s)",
- deliver_to_header);
+ trace(TRACE_STOP, "%s,%s: no email addresses found (scanned for %s)",
+ __FILE__,__func__, deliver_to_header);
exitcode = EX_NOUSER;
goto freeall;
}
@@ -419,11 +420,16 @@
if (! (strlen((char *)tmp->data) > 0))
continue;
- deliver_to_user_t dsnuser;
dsnuser_init(&dsnuser);
dsnuser.address = dm_strdup((char *) tmp->data);
- list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t));
+ if (! list_nodeadd(&dsnusers, &dsnuser, sizeof(deliver_to_user_t))) {
+ trace(TRACE_ERROR,"%s,%s: out of memory in list_nodeadd",
+ __FILE__, __func__);
+ exitcode = EX_TEMPFAIL;
+ goto freeall;
+ }
+
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -7,6 +7,10 @@ lib/dbmail/libsortdbmail.so.0
lib/dbmail/libsortdbmail.a
lib/dbmail/libsortdbmail.la
lib/dbmail/libsortdbmail.so
lib/libdbmail.so.0
lib/libdbmail.a
lib/libdbmail.la
lib/libdbmail.so
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
@ -23,10 +27,10 @@ sbin/dbmail-util
%%MYSQL%%lib/dbmail/libmysqldbmail.so
%%PGSQL%%%%DATADIR%%/sql/create_tables.pgsql
%%PGSQL%%%%DATADIR%%/sql/migrate_from_1.x_to_2.0.pgsql
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%/lib/dbmail/libpgsqldbmail.a
%%PGSQL%%/lib/dbmail/libpgsqldbmail.la
%%PGSQL%%/lib/dbmail/libpgsqldbmail.so
%%PGSQL%%lib/dbmail/libpgsqldbmail.so.0
%%PGSQL%%lib/dbmail/libpgsqldbmail.a
%%PGSQL%%lib/dbmail/libpgsqldbmail.la
%%PGSQL%%lib/dbmail/libpgsqldbmail.so
@dirrm lib/dbmail
@dirrm %%DATADIR%%/sql
@dirrm %%DATADIR%%