Hi. I'm writing a courier global mailfilter in C to verify DKIM signatures on incoming mails (in second step it will sign outgoing mails too).
Its goal would be to play very fast and to consume very little resources, so I thought to develop a process with unblocking multiplexed i/o techniques for parallel ux socket accept()/read()/write(), and a thread pool with a request queue for parallel message filtering operations. All the DKIM stuff is handled by libopendkim (http://www.opendkim.org/libopendkim/index.html) The very first alpha implementation is working great, but it seems that courier feeds my filter with mangled headers, so that any signatures is bad. I tried to tcpdump on an incoming mail that comes from gmail to my courier server. I compared the incoming mail to the mail feeded by courier. This is a unified diff: --- test.eml 2010-04-13 21:32:21.621063539 +0200 +++ test.eml.OK 2010-04-13 21:13:13.374040723 +0200 @@ -14,9 +14,7 @@ b=jpPHcnCIIS4udQHO59Q23wTjccsgbjpMAcWMnQQhzk8jj89yF4nzjUp8epIMgvPXZL X1hqt0CJuk7/7XLzGicXrb8FhcTMV9Kj34FVuWY8HBEygxqOf7g9yS9IcIqjOiXAEsij 5kwsmNao/CyuNN/WNXYFoNmCKyAaQwWBo1H1M= -Mime-Version: 1.0 -Content-Type: text/plain; charset=iso-8859-1 -Content-Transfer-Encoding: 7bit +MIME-Version: 1.0 Received: by xx.xxx.xx.xxx with HTTP; Tue, 13 Apr 2010 11:56:09 -0700 (PDT) Date: Tue, 13 Apr 2010 20:56:09 +0200 Received: by xx.xxx.xxx.xxx with SMTP id n50mr1106102wel.217.1271184969615; @@ -25,5 +23,6 @@ Subject: t From: dAm2K <xxxx...@gmail.com> To: Dino <d...@xxxxxx.it> +Content-Type: text/plain; charset=ISO-8859-1 t It seems that: 1) the header called "MIME-Version" become "Mime-Version" and it also change position 2) the header called "Content-Type" change its value some way and its position 3) a non existent header called "Content-Transfer-Encoding" get added by courier My first query is: is there a way to avoid courier to do header mangling or to do it after global mailfilter phase? Second query: someone want to help me writing the filter release (GPLv2)? Ciao e grazie, gente di courier!! Dino. -- Dino Ciuffetti Linux System Administrator and Architect TuxWeb S.r.l. - http://www.tuxweb.it/ ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users