This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

Attachment 'avelsieve-1.9.7-dovecot.diff'

Download

   1 diff -r avelsieve-1.9.7/include/managesieve.lib.php avelsieve-1.9.7-dovecotfix/include/managesieve.lib.php
   2 84a85,90
   3 > 
   4 >   /** 
   5 >    * options
   6 >    */
   7 >   var $broken_tls;
   8 > 
   9 313a320,322
  10 >     
  11 >     $this->broken_tls = false;
  12 > 
  13 486a496,499
  14 > 
  15 > 	// set broken_tls. Older cyrus servers do not respond with 
  16 > 	// capabilities after STARTTLS
  17 > 	$broken_tls = true;
  18 507,508c520,526
  19 <             // RFC says that we need to ask for the capabilities again
  20 <             $this->sieve_get_capability();
  21 ---
  22 >             // RFC says that we get an unsolicited capability response after TLS negotiation. Older Cyrus
  23 >             // did not do this. If the server has old/broken TLS we need to send a CAPABILITY command,
  24 >             // otherwise we just parse the unsolicited capability response. 
  25 >             if ( $this->broken_tls )
  26 >                 $this->sieve_get_capability();
  27 >             else
  28 >                 $this->sieve_read_capability_response();
  29 820c838
  30 <    * Return an array of available capabilities.
  31 ---
  32 >    * Read incoming capability response.
  33 824,827c842
  34 <   function sieve_get_capability() {
  35 <     if($this->loggedin==false)
  36 <         return false;
  37 <     fputs($this->fp, "CAPABILITY\r\n"); 
  38 ---
  39 >   function sieve_read_capability_response() {
  40 878a894,905
  41 >   /**
  42 >    * Return an array of available capabilities.
  43 >    *
  44 >    * @return array
  45 >    */
  46 >   function sieve_get_capability() {
  47 >     if($this->loggedin==false)
  48 >         return false;
  49 >     fputs($this->fp, "CAPABILITY\r\n");
  50 > 
  51 > 	return $this->sieve_read_capability_response();
  52 >   }
  53 diff -r avelsieve-1.9.7/table.php avelsieve-1.9.7-dovecotfix/table.php
  54 165,168c165,169
  55 < 				$s->delete('phpscript');
  56 < 			}  else {
  57 < 		        $newscript = makesieverule($rules);
  58 <     		    $s->save($newscript, 'phpscript');
  59 ---
  60 > 			$s->setactive('');
  61 > 			$s->delete('phpscript');
  62 > 		    }  else {
  63 >   		       $newscript = makesieverule($rules);
  64 >     		       $s->save($newscript, 'phpscript');

New Attachment

File to upload
Rename to
Overwrite existing attachment of same name
I'm tired of too too much wiki spam. How do you definitely get rid of them? (or email tss at iki.fi for the answer)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2017-03-28 09:33:02, 1.9 KB) [[attachment:avelsieve-1.9.7-dovecot.diff]]
  • [get | view] (2017-03-28 09:33:02, 0.5 KB) [[attachment:sieve-auth-command.pl]]
 All files | Selected Files: delete move to page copy to page