1 message in net.sourceforge.lists.courier-sqwebmail[sqwebmail] [PATCH] Ignore colon on e...
FromSent OnAttachments
Marcin SemeniukSep 5, 2006 3:37 am.patch
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[sqwebmail] [PATCH] Ignore colon on end of headernameActions...
From:Marcin Semeniuk (m.se@net.icm.edu.pl)
Date:Sep 5, 2006 3:37:32 am
List:net.sourceforge.lists.courier-sqwebmail
Attachments:

Hello Sam,

For some users, while editing filter it's more natural to enter headername with colon, but webmail forbid that. I made simple patch that ignore last colon in headername. It's small thing but can be annoying, so please apply this patch.

best regards, Marcin Semeniuk

Index: mailfilter.c =================================================================== RCS file: /home/cvs/uwmail/sources/courier/courier-0.53.2/webmail/mailfilter.c,v retrieving revision 1.7 diff -u -r1.7 mailfilter.c --- courier-0.53.2/webmail/mailfilter.c 22 Aug 2006 09:57:57 -0000 1.7 +++ courier-0.53.2/webmail/mailfilter.c 5 Sep 2006 09:14:25 -0000 @@ -433,7 +433,7 @@ enum maildirfiltertype type; int flags=0; const char *rulename=0; -const char *fieldname=0; + char *fieldname=0; const char *fieldvalue=0; char *tofolder=0; int err_num; @@ -507,7 +507,9 @@ if (strcmp(p, "body") == 0) flags |= MFR_BODY;

- fieldname=cgi("headername"); + fieldname=strdup(cgi("headername")); + if ((strlen(fieldname) > 0) && fieldname[strlen(fieldname)-1]==':') + fieldname[strlen(fieldname)-1]=0; p=cgi("headermatchtype"); type=strcmp(p, "startswith") == 0 || strcmp(p, "notstartswith") == 0 ? startswith: @@ -633,6 +635,7 @@ fieldvalue, tofolder, autoreply_from, &err_num)) r=0; free(tofolder); + free(fieldname); if (r) { maildir_filter_savemaildirfilter(&mf, ".", login_returnaddr());