we should issue a CAPABILITY even if we aren't going to use ssl/tls so that
cram-md5 auth still works.
This commit is contained in:
		
							parent
							
								
									891fab1a7d
								
							
						
					
					
						commit
						e2f1cd779b
					
				
					 3 changed files with 18 additions and 7 deletions
				
			
		
							
								
								
									
										8
									
								
								config.c
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								config.c
									
										
									
									
									
								
							|  | @ -44,6 +44,7 @@ config_defaults (config_t * conf) | |||
|     conf->copy_deleted_to = global.copy_deleted_to; | ||||
|     conf->use_namespace = global.use_namespace; | ||||
|     conf->expunge = global.expunge; | ||||
|     conf->poll = global.poll; | ||||
| #if HAVE_LIBSSL | ||||
|     conf->require_ssl = global.require_ssl; | ||||
|     conf->use_imaps = global.use_imaps; | ||||
|  | @ -235,6 +236,13 @@ load_config (const char *where) | |||
| 	    else | ||||
| 		global.expunge = (strcasecmp (val, "yes") == 0); | ||||
| 	} | ||||
| 	else if (!strncasecmp ("Poll", cmd, 4)) | ||||
| 	{ | ||||
| 	    if (*cur) | ||||
| 		(*cur)->poll = atoi (val); | ||||
| 	    else | ||||
| 		global.poll = atoi (val); | ||||
| 	} | ||||
| #if HAVE_LIBSSL | ||||
| 	else if (!strncasecmp ("CertificateFile", cmd, 15)) | ||||
| 	{ | ||||
|  |  | |||
							
								
								
									
										16
									
								
								imap.c
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								imap.c
									
										
									
									
									
								
							|  | @ -653,20 +653,22 @@ imap_open (config_t * box, unsigned int minuid, imap_t * imap) | |||
| #if HAVE_LIBSSL | ||||
| 	    if (box->use_imaps) | ||||
| 		use_ssl = 1; | ||||
| 	    else if (box->use_sslv2 || box->use_sslv3 || box->use_tlsv1) | ||||
| 	    else | ||||
| 	    { | ||||
| 		/* let's see what this puppy can do... */ | ||||
| 		if ((ret = imap_exec (imap, "CAPABILITY"))) | ||||
| 		    break; | ||||
| 
 | ||||
| 		/* always try to select SSL support if available */ | ||||
| 		if (imap->have_starttls) | ||||
| 		if (box->use_sslv2 || box->use_sslv3 || box->use_tlsv1) | ||||
| 		{ | ||||
| 		    if ((ret = imap_exec (imap, "STARTTLS"))) | ||||
| 			break; | ||||
| 		    use_ssl = 1; | ||||
| 		    /* always try to select SSL support if available */ | ||||
| 		    if (imap->have_starttls) | ||||
| 		    { | ||||
| 			if ((ret = imap_exec (imap, "STARTTLS"))) | ||||
| 			    break; | ||||
| 			use_ssl = 1; | ||||
| 		    } | ||||
| 		} | ||||
| 
 | ||||
| 	    } | ||||
| 
 | ||||
| 	    if (!use_ssl) | ||||
|  |  | |||
							
								
								
									
										1
									
								
								isync.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								isync.h
									
										
									
									
									
								
							|  | @ -57,6 +57,7 @@ struct config | |||
|     char *box; | ||||
|     char *alias; | ||||
|     char *copy_deleted_to; | ||||
|     int poll;	/* how often to poll (in seconds)  0 = OFF */ | ||||
|     off_t max_size; | ||||
|     config_t *next; | ||||
| #if HAVE_LIBSSL | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue