- Integrate vendor patches:
1. #266 - Excessive db connects and quits 2. #271 - BUG with connect to postgresql database 3. #272 - Non-UTF characters in a message's body 4. #277 - Fix "INTERNALDATE" calculation in imaputil.c 5. other patches from repository. - Add SHA256 PR: ports/88277 Submitted by: Mark Starovoytov <mark_sf@kikg.ifmo.ru> (maintainer)
This commit is contained in:
parent
200edfa028
commit
efc03a7db4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=148303
55 changed files with 8060 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= dbmail
|
||||
PORTVERSION= 2.0.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.dbmail.org/download/2.0/
|
||||
PKGNAMESUFFIX= -${DATABASE}
|
||||
|
@ -59,6 +60,7 @@ pre-everything::
|
|||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
|
||||
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
|
||||
|
||||
post-configure:
|
||||
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
|
||||
|
|
|
@ -1,2 +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
|
||||
|
|
1397
mail/dbmail-devel/files/patch-2.0.7_002
Normal file
1397
mail/dbmail-devel/files/patch-2.0.7_002
Normal file
File diff suppressed because it is too large
Load diff
10
mail/dbmail-devel/files/patch-2.0.7_002_271
Normal file
10
mail/dbmail-devel/files/patch-2.0.7_002_271
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- 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;
|
25
mail/dbmail-devel/files/patch-2.0.7_003
Normal file
25
mail/dbmail-devel/files/patch-2.0.7_003
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- 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__,
|
22
mail/dbmail-devel/files/patch-2.0.7_003_272
Normal file
22
mail/dbmail-devel/files/patch-2.0.7_003_272
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- 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),
|
95
mail/dbmail-devel/files/patch-2.0.7_004
Normal file
95
mail/dbmail-devel/files/patch-2.0.7_004
Normal file
|
@ -0,0 +1,95 @@
|
|||
--- 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) {
|
11
mail/dbmail-devel/files/patch-2.0.7_005
Normal file
11
mail/dbmail-devel/files/patch-2.0.7_005
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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:
|
38
mail/dbmail-devel/files/patch-2.0.7_005_277
Normal file
38
mail/dbmail-devel/files/patch-2.0.7_005_277
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- 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(<ime);
|
||||
|
||||
@@ -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",
|
11
mail/dbmail-devel/files/patch-2.0.7_006_281
Normal file
11
mail/dbmail-devel/files/patch-2.0.7_006_281
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- main.c.orig Mon Nov 7 17:22:39 2005
|
||||
+++ main.c Mon Nov 7 17:22:56 2005
|
||||
@@ -419,7 +419,7 @@
|
||||
if (! (strlen((char *)tmp->data) > 0))
|
||||
continue;
|
||||
|
||||
- deliver_to_user_t dsnuser;
|
||||
+ //deliver_to_user_t dsnuser;
|
||||
dsnuser_init(&dsnuser);
|
||||
dsnuser.address = dm_strdup((char *) tmp->data);
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= dbmail
|
||||
PORTVERSION= 2.0.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.dbmail.org/download/2.0/
|
||||
PKGNAMESUFFIX= -${DATABASE}
|
||||
|
@ -59,6 +60,7 @@ pre-everything::
|
|||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
|
||||
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
|
||||
|
||||
post-configure:
|
||||
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
|
||||
|
|
|
@ -1,2 +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
|
||||
|
|
1397
mail/dbmail/files/patch-2.0.7_002
Normal file
1397
mail/dbmail/files/patch-2.0.7_002
Normal file
File diff suppressed because it is too large
Load diff
10
mail/dbmail/files/patch-2.0.7_002_271
Normal file
10
mail/dbmail/files/patch-2.0.7_002_271
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- 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;
|
25
mail/dbmail/files/patch-2.0.7_003
Normal file
25
mail/dbmail/files/patch-2.0.7_003
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- 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__,
|
22
mail/dbmail/files/patch-2.0.7_003_272
Normal file
22
mail/dbmail/files/patch-2.0.7_003_272
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- 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),
|
95
mail/dbmail/files/patch-2.0.7_004
Normal file
95
mail/dbmail/files/patch-2.0.7_004
Normal file
|
@ -0,0 +1,95 @@
|
|||
--- 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) {
|
11
mail/dbmail/files/patch-2.0.7_005
Normal file
11
mail/dbmail/files/patch-2.0.7_005
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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:
|
38
mail/dbmail/files/patch-2.0.7_005_277
Normal file
38
mail/dbmail/files/patch-2.0.7_005_277
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- 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(<ime);
|
||||
|
||||
@@ -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",
|
11
mail/dbmail/files/patch-2.0.7_006_281
Normal file
11
mail/dbmail/files/patch-2.0.7_006_281
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- main.c.orig Mon Nov 7 17:22:39 2005
|
||||
+++ main.c Mon Nov 7 17:22:56 2005
|
||||
@@ -419,7 +419,7 @@
|
||||
if (! (strlen((char *)tmp->data) > 0))
|
||||
continue;
|
||||
|
||||
- deliver_to_user_t dsnuser;
|
||||
+ //deliver_to_user_t dsnuser;
|
||||
dsnuser_init(&dsnuser);
|
||||
dsnuser.address = dm_strdup((char *) tmp->data);
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= dbmail
|
||||
PORTVERSION= 2.0.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.dbmail.org/download/2.0/
|
||||
PKGNAMESUFFIX= -${DATABASE}
|
||||
|
@ -59,6 +60,7 @@ pre-everything::
|
|||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
|
||||
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
|
||||
|
||||
post-configure:
|
||||
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
|
||||
|
|
|
@ -1,2 +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
|
||||
|
|
1397
mail/dbmail20/files/patch-2.0.7_002
Normal file
1397
mail/dbmail20/files/patch-2.0.7_002
Normal file
File diff suppressed because it is too large
Load diff
10
mail/dbmail20/files/patch-2.0.7_002_271
Normal file
10
mail/dbmail20/files/patch-2.0.7_002_271
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- 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;
|
25
mail/dbmail20/files/patch-2.0.7_003
Normal file
25
mail/dbmail20/files/patch-2.0.7_003
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- 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__,
|
22
mail/dbmail20/files/patch-2.0.7_003_272
Normal file
22
mail/dbmail20/files/patch-2.0.7_003_272
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- 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),
|
95
mail/dbmail20/files/patch-2.0.7_004
Normal file
95
mail/dbmail20/files/patch-2.0.7_004
Normal file
|
@ -0,0 +1,95 @@
|
|||
--- 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) {
|
11
mail/dbmail20/files/patch-2.0.7_005
Normal file
11
mail/dbmail20/files/patch-2.0.7_005
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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:
|
38
mail/dbmail20/files/patch-2.0.7_005_277
Normal file
38
mail/dbmail20/files/patch-2.0.7_005_277
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- 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(<ime);
|
||||
|
||||
@@ -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",
|
11
mail/dbmail20/files/patch-2.0.7_006_281
Normal file
11
mail/dbmail20/files/patch-2.0.7_006_281
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- main.c.orig Mon Nov 7 17:22:39 2005
|
||||
+++ main.c Mon Nov 7 17:22:56 2005
|
||||
@@ -419,7 +419,7 @@
|
||||
if (! (strlen((char *)tmp->data) > 0))
|
||||
continue;
|
||||
|
||||
- deliver_to_user_t dsnuser;
|
||||
+ //deliver_to_user_t dsnuser;
|
||||
dsnuser_init(&dsnuser);
|
||||
dsnuser.address = dm_strdup((char *) tmp->data);
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= dbmail
|
||||
PORTVERSION= 2.0.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.dbmail.org/download/2.0/
|
||||
PKGNAMESUFFIX= -${DATABASE}
|
||||
|
@ -59,6 +60,7 @@ pre-everything::
|
|||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
|
||||
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
|
||||
|
||||
post-configure:
|
||||
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
|
||||
|
|
|
@ -1,2 +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
|
||||
|
|
1397
mail/dbmail21/files/patch-2.0.7_002
Normal file
1397
mail/dbmail21/files/patch-2.0.7_002
Normal file
File diff suppressed because it is too large
Load diff
10
mail/dbmail21/files/patch-2.0.7_002_271
Normal file
10
mail/dbmail21/files/patch-2.0.7_002_271
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- 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;
|
25
mail/dbmail21/files/patch-2.0.7_003
Normal file
25
mail/dbmail21/files/patch-2.0.7_003
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- 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__,
|
22
mail/dbmail21/files/patch-2.0.7_003_272
Normal file
22
mail/dbmail21/files/patch-2.0.7_003_272
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- 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),
|
95
mail/dbmail21/files/patch-2.0.7_004
Normal file
95
mail/dbmail21/files/patch-2.0.7_004
Normal file
|
@ -0,0 +1,95 @@
|
|||
--- 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) {
|
11
mail/dbmail21/files/patch-2.0.7_005
Normal file
11
mail/dbmail21/files/patch-2.0.7_005
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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:
|
38
mail/dbmail21/files/patch-2.0.7_005_277
Normal file
38
mail/dbmail21/files/patch-2.0.7_005_277
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- 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(<ime);
|
||||
|
||||
@@ -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",
|
11
mail/dbmail21/files/patch-2.0.7_006_281
Normal file
11
mail/dbmail21/files/patch-2.0.7_006_281
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- main.c.orig Mon Nov 7 17:22:39 2005
|
||||
+++ main.c Mon Nov 7 17:22:56 2005
|
||||
@@ -419,7 +419,7 @@
|
||||
if (! (strlen((char *)tmp->data) > 0))
|
||||
continue;
|
||||
|
||||
- deliver_to_user_t dsnuser;
|
||||
+ //deliver_to_user_t dsnuser;
|
||||
dsnuser_init(&dsnuser);
|
||||
dsnuser.address = dm_strdup((char *) tmp->data);
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= dbmail
|
||||
PORTVERSION= 2.0.7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail
|
||||
MASTER_SITES= http://www.dbmail.org/download/2.0/
|
||||
PKGNAMESUFFIX= -${DATABASE}
|
||||
|
@ -59,6 +60,7 @@ pre-everything::
|
|||
|
||||
post-patch:
|
||||
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
|
||||
@${FIND} ${WRKSRC} -name *.orig -type f | ${XARGS} ${RM} -fr
|
||||
|
||||
post-configure:
|
||||
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
|
||||
|
|
|
@ -1,2 +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
|
||||
|
|
1397
mail/dbmail22/files/patch-2.0.7_002
Normal file
1397
mail/dbmail22/files/patch-2.0.7_002
Normal file
File diff suppressed because it is too large
Load diff
10
mail/dbmail22/files/patch-2.0.7_002_271
Normal file
10
mail/dbmail22/files/patch-2.0.7_002_271
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- 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;
|
25
mail/dbmail22/files/patch-2.0.7_003
Normal file
25
mail/dbmail22/files/patch-2.0.7_003
Normal file
|
@ -0,0 +1,25 @@
|
|||
--- 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__,
|
22
mail/dbmail22/files/patch-2.0.7_003_272
Normal file
22
mail/dbmail22/files/patch-2.0.7_003_272
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- 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),
|
95
mail/dbmail22/files/patch-2.0.7_004
Normal file
95
mail/dbmail22/files/patch-2.0.7_004
Normal file
|
@ -0,0 +1,95 @@
|
|||
--- 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) {
|
11
mail/dbmail22/files/patch-2.0.7_005
Normal file
11
mail/dbmail22/files/patch-2.0.7_005
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- 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:
|
38
mail/dbmail22/files/patch-2.0.7_005_277
Normal file
38
mail/dbmail22/files/patch-2.0.7_005_277
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- 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(<ime);
|
||||
|
||||
@@ -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",
|
11
mail/dbmail22/files/patch-2.0.7_006_281
Normal file
11
mail/dbmail22/files/patch-2.0.7_006_281
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- main.c.orig Mon Nov 7 17:22:39 2005
|
||||
+++ main.c Mon Nov 7 17:22:56 2005
|
||||
@@ -419,7 +419,7 @@
|
||||
if (! (strlen((char *)tmp->data) > 0))
|
||||
continue;
|
||||
|
||||
- deliver_to_user_t dsnuser;
|
||||
+ //deliver_to_user_t dsnuser;
|
||||
dsnuser_init(&dsnuser);
|
||||
dsnuser.address = dm_strdup((char *) tmp->data);
|
||||
|
Loading…
Reference in a new issue