aboutsummaryrefslogtreecommitdiff
path: root/mail/dbmail22
diff options
context:
space:
mode:
authorCheng-Lung Sung <clsung@FreeBSD.org>2007-02-27 16:18:03 +0000
committerCheng-Lung Sung <clsung@FreeBSD.org>2007-02-27 16:18:03 +0000
commit3564914c7f5175480391be228cd09d8ffdb9c444 (patch)
tree57eb11af8247c1581dfe1c7e84e0861740ce6fae /mail/dbmail22
parent999065324a76a5364df5b8af3dd8be3a07eb7370 (diff)
downloadports-3564914c7f5175480391be228cd09d8ffdb9c444.tar.gz
ports-3564914c7f5175480391be228cd09d8ffdb9c444.zip
Notes
Diffstat (limited to 'mail/dbmail22')
-rw-r--r--mail/dbmail22/Makefile1
-rw-r--r--mail/dbmail22/files/patch-rfc822_headername_case26
2 files changed, 27 insertions, 0 deletions
diff --git a/mail/dbmail22/Makefile b/mail/dbmail22/Makefile
index a7b3b25184ad..c1d819a75e95 100644
--- a/mail/dbmail22/Makefile
+++ b/mail/dbmail22/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dbmail
PORTVERSION= 2.2.2
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.2/
diff --git a/mail/dbmail22/files/patch-rfc822_headername_case b/mail/dbmail22/files/patch-rfc822_headername_case
new file mode 100644
index 000000000000..1148c5e2a85b
--- /dev/null
+++ b/mail/dbmail22/files/patch-rfc822_headername_case
@@ -0,0 +1,26 @@
+--- dbmail-message.c
++++ dbmail-message.c
+@@ -885,9 +885,13 @@ static int _header_get_id(const struct D
+ u64_t tmp;
+ gpointer cacheid;
+ gchar *safe_header;
++ gchar *tmpheader;
+
+- if (! (safe_header = dm_strnesc(header,CACHE_WIDTH_NAME)))
++ // rfc822 headernames are case-insensitive
++ if (! (tmpheader = dm_strnesc(header,CACHE_WIDTH_NAME)))
+ return -1;
++ safe_header = g_ascii_strdown(tmpheader,-1);
++ g_free(tmpheader);
+
+ cacheid = g_hash_table_lookup(self->header_dict, (gconstpointer)safe_header);
+ if (cacheid) {
+@@ -897,7 +901,7 @@ static int _header_get_id(const struct D
+ }
+
+ GString *q = g_string_new("");
+- g_string_printf(q, "SELECT id FROM %sheadername WHERE headername='%s'", DBPFX, safe_header);
++ g_string_printf(q, "SELECT id FROM %sheadername WHERE lower(headername)='%s'", DBPFX, safe_header);
+ if (db_query(q->str) == -1) {
+ g_string_free(q,TRUE);
+ g_free(safe_header);