[Dovecot] Implementation of editheaders in dovecot

2009-04-03 Thread Konstantin Lepa
Hello. I wrote the hook function for deliver. I want to add support of editheaders in the plug-in for dovecot. For this purpose I wrote the function rarules_get_stream. Remover of headrs works properly, but adding does not work. I took Timo Sirainen's advice from http://markmail.org/message

Re: [Dovecot] Implementation of editheaders in dovecot

2009-04-03 Thread Konstantin Lepa
4+1 From: pup...@virtualworld.com Reply-to: konstan...@bsdman.virtualworld.com, l...@bsdman.virtualworld.com To: pit...@virtualworld.com Message-Id: <20090402010751.8ab84...@bsdman.virtualworld.com> Date: Thu, 2 Apr 2009 05:07:51 +0400 (MSD) Message 1 ) . OK Fetch completed. On Apr 3,

Re: [Dovecot] Implementation of editheaders in dovecot

2009-04-03 Thread Konstantin Lepa
Also, i'd like to know how to cut last '\n' from header stream. If I don't remove a last lf symbol, then all my headers'll added to message body :-( On Apr 3, 2009, at 17:37 , Konstantin Lepa wrote: I fixed the problem and I created another :-) I removed head

Re: [Dovecot] Implementation of editheaders in dovecot

2009-04-03 Thread Konstantin Lepa
ve :-( Maybe, another way? On Apr 3, 2009, at 20:48 , Timo Sirainen wrote: On Fri, 2009-04-03 at 17:37 +0400, Konstantin Lepa wrote: I fixed the problem and I created another :-) I removed header "Subject" and added "X-DSPAM: test value\n\n". Now, problem is message_get_head

Re: [Dovecot] Implementation of editheaders in dovecot

2009-04-03 Thread Konstantin Lepa
Thank you very much :-) On Apr 3, 2009, at 21:29 , Timo Sirainen wrote: On Fri, 2009-04-03 at 21:25 +0400, Konstantin Lepa wrote: Yeah, but it doesn't work without i_stream_seek(stream, 0) before. How can I remove EOH after i_stream_create_header_filter (second '\n')? Is it

Re: [Dovecot] Implementation of editheaders in dovecot

2009-04-05 Thread Konstantin Lepa
My company is migrating to dovecot from commercial soft. It wants to use MySQL db instead sieve scripts. I must to write a new plug-in for dovecot with support of editheaders. On Apr 5, 2009, at 20:30 , Stephan Bosch wrote: Konstantin Lepa schreef: Hello. I wrote the hook function for

Re: [Dovecot] Implementation of editheaders in dovecot

2009-04-06 Thread Konstantin Lepa
NULL); } On Apr 3, 2009, at 21:29 , Timo Sirainen wrote: On Fri, 2009-04-03 at 21:25 +0400, Konstantin Lepa wrote: Yeah, but it doesn't work without i_stream_seek(stream, 0) before. How can I remove EOH after i_stream_create_header_filter (second '\n&#x

[Dovecot] Strange behavior of header_filter_callback

2009-04-08 Thread Konstantin Lepa
example.tgz Description: Binary data

Re: [Dovecot] Strange behavior of header_filter_callback

2009-04-09 Thread Konstantin Lepa
I commented the else branch, but EOF exists after i_stream_header_filter. My headers appears in a message body. On Apr 8, 2009, at 20:42 , Timo Sirainen wrote: On Wed, 2009-04-08 at 14:05 +0400, Konstantin Lepa wrote: You didn't say what the strange behavior was .. But: if

Re: [Dovecot] Strange behavior of header_filter_callback

2009-04-09 Thread Konstantin Lepa
I mean EOH in previous message. I noticed, that my callback for hdr->eoh==1 doesn't call. I checked by comparing func pointers. Instead, another default callback is called. On Apr 9, 2009, at 17:48 , Konstantin Lepa wrote: I commented the else branch, but EOF exis

[Dovecot] How can I skip EOH in headers?

2009-04-13 Thread Konstantin Lepa
Hello. My callback for get_stream is called from mail_get_stream in mail_storage_copy. Further, mbox_save_init is called and it called mbox_save_get_input_stream. backtrace (A) for my callback: #0 i_stream_header_filter_read (stream=0x8147e00) at istream-header- filter.c:314 #1 0x080cdb