aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-command.c
Commit message (Collapse)AuthorAgeFilesLines
* Kill dead filesJP Rosevear2005-01-111-819/+0
| | | | svn path=/trunk/; revision=28342
* ** See bug #69446.S.Çağlar Onur2004-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2004-11-28 S.Çağlar Onur <caglar@uludag.org.tr> ** See bug #69446. * evolution-2.0.2/camel/camel-charset-map.c (camel_charset_iso_to_windows) * evolution-2.0.2/camel/camel-filter-search.c (check_header) * evolution-2.0.2/camel/camel-folder-search.c (check_header) * evolution-2.0.2/camel/camel-folder-summary.c (message_info_new,summary_build_content_info,camel_system_flag) * evolution-2.0.2/camel/camel-html-parser.c (camel_html_parser_attr) * evolution-2.0.2/camel/camel-mime-filter-enriched.c (param_parse,camel_mime_filter_enriched_init) * evolution-2.0.2/camel/camel-mime-parser.c (folder_scan_step,main) * evolution-2.0.2/camel/camel-mime-utils.c (camel_header_param,camel_header_set_param,camel_content_type_is,camel_transfer_encoding_from_string,camel_conten t_type_format,camel_content_type_simple,camel_header_decode_date,header_raw_find_node) * evolution-2.0.2/camel/camel-sasl-digest-md5.c (decode_data_type) * evolution-2.0.2/camel/providers/imap/camel-imap-command.c (camel_imap_response_free) * evolution-2.0.2/camel/providers/imap/camel-imap-folder.c (camel_imap_folder_new,camel_imap_folder_selected,imap_refresh_info,camel_imap_folder_new,camel_i map_folder_selected) * evolution-2.0.2/camel/providers/imap/camel-imap-store.c (imap_get_capability,imap_connect_online,get_folder_online,get_folder_offline,get_subscribed_folde rs,folder_hash,get_folders) * evolution-2.0.2/camel/providers/pop3/camel-pop3-store.c (get_folder) * evolution-2.0.2/camel/tests/lib/folders.c: (test_folder_message_ops) some strcasecmp() calls changed with g_ascii_strcasecmp() for Turkish character conversiton problems [ http://www.i18nguy.com/unicode/turkish-i18n.html ] svn path=/trunk/; revision=28019
* Merged notzed-eplugin-2-branch to head.Michael Zucci2004-09-201-1/+1
| | | | svn path=/trunk/; revision=27300
* moved the RECNET flag into the folder area (bit 17-30).Not Zed2004-02-251-7/+4
| | | | | | | | | | | | | | | | | | | | | 2004-02-25 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-summary.h (CAMEL_IMAP_MESSAGE_RECENT): moved the RECNET flag into the folder area (bit 17-30). 2004-02-24 Not Zed <NotZed@Ximian.com> ** See bug #53876. * providers/imap/camel-imap-command.c (camel_imap_command): ref the folder before unreffing store->current_folder, incase they're the same. Do a select anyway. * providers/imap/camel-imap-folder.c (imap_refresh_info): keep the connect_lock for longer, imap_rescan for one assumes its locked. Fixes a race selecting the folder for refresh. svn path=/trunk/; revision=24862
* ** See bug #44322Not Zed2003-06-171-6/+6
| | | | | | | | | | | | | | | | | 2003-06-16 Not Zed <NotZed@Ximian.com> ** See bug #44322 * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): If we are outputting a folder name, make sure we calculate buffer size based on the raw/utf7 version ** See bug #44121 * camel-multipart-signed.c (signed_get_part): If we can't parse the content, but we have a stream, just use that as the content. svn path=/trunk/; revision=21454
* Added a note to the comment block for this function noting that uids MUSTJeffrey Stedfast2003-05-151-3/+0
| | | | | | | | | | | | | | | | | | 2003-05-13 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Added a note to the comment block for this function noting that uids MUST be in sorted order. * providers/imap/camel-imap-folder.c (imap_expunge_uids_online): Sort the uids before splitting them into UID set chunks. The code that splits the uid array into sets expects the uids to be in sorted order. Fixes bug #42854. * providers/imap/camel-imap-command.c (imap_command_start): Re-enable camel_verbose_debug logging. svn path=/trunk/; revision=21173
* Disable debugging.Ettore Perazzoli2003-05-141-1/+1
| | | | | | | | | | * providers/imap/camel-imap-folder.c (d): Disable debugging. * providers/imap/camel-imap-command.c (d): Disable debugging. * providers/imap/camel-imap-search.c (d): Disable debugging. svn path=/trunk/; revision=21153
* camel-imap-command.c (imap_read_untagged) Integer overflow fix. If server  Timo Sirainen 2003-03-251-2/+3
| | | | | | | | | | | 2003-03-24  Timo Sirainen  <tss@iki.fi> * camel-imap-command.c (imap_read_untagged) Integer overflow fix. If server sent a huge literal length, only a few bytes of memory was allocated to it, but server could write as much data there as it wanted. svn path=/trunk/; revision=20484
* Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated.Jeffrey Stedfast2003-02-051-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-02-04 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_body): Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated. (imap_parse_body): Same. * providers/imap/camel-imap-folder.c (decode_internaldate): Use strncasecmp() here too. (parse_fetch_response): And here. (camel_imap_folder_selected): Here too. * providers/imap/camel-imap-utils.c (imap_namespace_decode): Use strncasecmp() instead of g_strncasecmp() because the latter is deprecated. * providers/imap/camel-imap-store.c (imap_get_capability): Again here. (hash_folder_name): Here too. (compare_folder_name): And here. (get_folder_online): Again. (get_folder_offline): And again. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Same as below again. * providers/imap/camel-imap-command.c (camel_imap_response_free): Same as below. * providers/smtp/camel-smtp-transport.c (smtp_data): Use strcasecmp() because g_strcasecmp() is deprecated. * camel-url.c (camel_url_new_with_base): Use g_ascii_strdown() instead of g_strdown, since g_strdown is deprecated. 2003-01-28 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-gssapi.c (gssapi_challenge): Pass in some default flags to gss_init_sec_context() (these default flags are defined as a MUST in rfc1964). svn path=/trunk/; revision=19748
* Use g_strerror when setting an exception string (we need it to be inJeffrey Stedfast2002-11-111-2/+4
| | | | | | | | | | | | | | | | | | | 2002-11-11 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (get_message_simple): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/pop3/camel-pop3-store.c (pop3_try_authenticate): Use g_strerror when setting an exception string (we need it to be in UTF-8). * providers/pop3/camel-pop3-folder.c (pop3_refresh_info): Use g_strerror when setting an exception string (we need it to be in UTF-8). (pop3_get_message): Same. svn path=/trunk/; revision=18690
* If the response from the IMAP server is "No", don't set theJeffrey Stedfast2002-10-101-1/+1
| | | | | | | | | | | | | 2002-10-08 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_read_response): If the response from the IMAP server is "No", don't set the SERVICE_UNAVAILABLE exception, this makes error reporting in the UI for deleting IMAP folders that cannot be deleted inaccurate (ie, it reports "Cannot delete in offline mode" which is not the problem). svn path=/trunk/; revision=18356
* If we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496.Not Zed2002-09-191-0/+10
| | | | | | | | | | 2002-09-18 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_response): If we get an ALERT, pass it to the user. An rfc2060 MUST, and bug #22496. svn path=/trunk/; revision=18107
* Lots of changes, too numerous to list. Changed to useNot Zed2002-09-031-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-09-04 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c, providers/imap/camel-imap-folder.c: Lots of changes, too numerous to list. Changed to use camel-imap-store-summary to cache list requests. Changed to use a canonicalised url path with / instead of per-store directory separator. Indirects folder name so invalid folder names can still be accessed. Summary now stored in a new expandable format in .ev-store-summary. 2002-08-28 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (construct): Load store summary if it exists. (can_work_offline): Just see if we have any folders to say whether we can work offline or not. Should probably always just return true. 2002-08-27 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store-summary.[ch]: New files to handle offline definition of folders, etc. * camel-url.h: Define CamelURL to be struct _CamelURL rather than anonymous struct. * camel-store-summary.[ch]: a few api tweaks. Also, the summary header is versioned separately at each level, so that version upgrades can be handled separately. Renamed FolderInfo -> StoreInfo to avoid namespace with current FolderInfo code. This should be reversed when the FolderInfo code is rationalised to this new base. 2002-08-23 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command): domt encode folder name. * providers/imap/camel-imap-folder.c (do_copy): dont encode folder name. (do_append): dont encode folder name. * providers/imap/camel-imap-store.c (get_folder_status): don encode folder name in imap request. (get_folder_online): here too for creating folder. (rename_folder): Assume the incoming 'new name' is a utf8 path, whereas the 'old name' is as from get folder info (raw). (create_folder): Dont encode parent_name, assume its the raw thing. 2002-08-22 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (get_folder_online): Select based on unconverted name. (imap_build_folder_info): New function to create a folderinfo properly based on raw name. (subscribe_folder): Use above helper. (imap_folder_effectively_unsubscribed): Same here. (imap_forget_folder): Same here. (get_one_folder_offline): " 2002-08-21 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-store.c (parse_list_response_as_folder_info): Setup path properly, as decoded path with / separator. Setup full_name as non-decoded raw name. Keep url as decoded path but with server separator ... (ick). (create_folder): Dont call build_path anymore, get_folders() does it for us. (subscribe_folder): Build the path ourself. (imap_folder_effectively_unsubscribed): Same here. (get_subscribed_folders): list using %S not %F, we're using the raw server provided name directly. (subscribe_folder): As above, for SUBSCRIBE. (unsubscribe_folder): Same here. (delete_folder): Same. (rename_folder_info): Same here for source name. (rename_folder): And here? (get_folders_online): Amd here. * providers/imap/camel-imap-utils.c: (imap_parse_list_response): Dont decode the mailbox. * camel-utf8.[ch]: some new utf8 & utf7 utilities. * providers/imap/camel-imap-utils.c (imap_mailbox_encode): (imap_mailbox_decode): use camel_utf7/8* functions instead. : Add config.h and alloca.h headers. svn path=/trunk/; revision=17943
* If the response is NULL, just return. (now works the same way asJeffrey Stedfast2002-08-271-0/+3
| | | | | | | | | | | 2002-08-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_response_free_without_processing): If the response is NULL, just return. (now works the same way as imap_response_free which allowed a NULL response argument). Fixes bug #25491. svn path=/trunk/; revision=17863
* Lock the CamelService->priv->connect_lock instead of using our ownJeffrey Stedfast2002-08-271-15/+16
| | | | | | | | | | | | | | 2002-08-26 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c: * providers/imap/camel-imap-folder.c: * providers/imap/camel-imap-command.c: Lock the CamelService->priv->connect_lock instead of using our own command_lock. This fixes bug #28177. svn path=/trunk/; revision=17861
* Fixes bug #26237.Jeffrey Stedfast2002-08-031-39/+19
| | | | | | | | | | | | | | | 2002-08-02 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #26237. * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Don't prepend any namespace shit in the %F case. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Don't strip off the namespace. svn path=/trunk/; revision=17693
* If we fail to read a literal, free the temporary string buffer.Jeffrey Stedfast2002-06-011-6/+5
| | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_read_untagged): If we fail to read a literal, free the temporary string buffer. svn path=/trunk/; revision=17063
* Revert my fix from the other day since camel_imap_command_response()Jeffrey Stedfast2002-06-011-3/+6
| | | | | | | | | | | | | | | 2002-05-31 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Revert my fix from the other day since camel_imap_command_response() doesn't guarentee that resp will be set to NULL on error. * providers/imap/camel-imap-command.c (camel_imap_command_response): Use a different variable to get the return of imap_parse_untagged so that we don't lose the pointer to the original malloc'd respbuf buffer. svn path=/trunk/; revision=17061
* Use the new readline function.Jeffrey Stedfast2002-05-251-6/+2
| | | | | | | | | | | | | | | | | 2002-05-24 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_read_untagged): Use the new readline function. * providers/imap/camel-imap-store.c (connect_to_server): Use the new camel_imap_store_readline() function which doesn't suck quite as bad as the original camel_remote_store_recv_line() function. (camel_imap_store_readline): New function to replace camel_remote_store_recv_line(). This function is at least safe with embedded nul chars. Not that any of our callers use it *sigh*. svn path=/trunk/; revision=17012
* Removed from the build. Glory glory hallelujah.Jeffrey Stedfast2002-05-231-18/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-22 Jeffrey Stedfast <fejj@ximian.com> * camel-remote-store.c: Removed from the build. Glory glory hallelujah. * camel-disco-store.c: Updated to inherit from CamelStore rather than CamelRemoteStore. * providers/imap/camel-imap-command.c (imap_command_start): Don't use the camel-remote-store shit to send a string. Just use camel_stream_printf for chrissakes. * providers/imap/camel-imap-store.c: Updated to not depend on CamelRemoteStore and to handle STARTTLS. (imap_disconnect_online): Unref the streams. (imap_keepalive): Removed. (camel_imap_store_connected): New function to replace camel_remote_store_connected(). (camel_imap_store_finalize): Unref the streams. (camel_imap_store_recv_line): New function to replace camel_remote_store_recv_line(). (imap_get_capability): Renamed from connect_to_server (connect_to_server): New function to try and connect to the server. (connect_to_server_wrapper): New wrapper function around connect_to_server that takes the ssl modes into consideration. (query_auth_types): Don't bother calling our parent's implementation of query_auth_types() since CamelDiscoStore doesn't have any anyway. (imap_get_name): New method to implement CamelService::get_name svn path=/trunk/; revision=16975
* Check for LOGIN xxxx as well if debug is on, so we dont print passwords toNot Zed2002-05-071-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2002-05-07 Not Zed <NotZed@Ximian.com> * camel-remote-store.c (remote_send_string): Check for LOGIN xxxx as well if debug is on, so we dont print passwords to evolution logs. * providers/imap/camel-imap-utils.c (imap_is_atom_char): This was really broken. 1. isprint() is locale dependent, and 2. it looked up an 8 bit value in a 7 bit table without truncating it. I've removed the isprint() stuff and just put it directly into the special table, which i've expanded to the right size too. * providers/imap/*: Applied patch from Preston Elder <prez@magick.tm> to make camel only use literals if it needs to for simple strings. Changed slightly to use imap_is_atom() and more consistent formatting. providers/imap/camel-imap-utils.c (imap_is_atom): Chagned from imap_needs_quoting(). ** Merged in camel-object2 branch. Simpler camelobject implementation + object args interface. * camel.c (camel_init): Call camel_object_get_type() to make sure camel_object_type is initialised. * camel-object.h (CAMEL_OBJECT_TYPE): Changed to return global camel_object_type pointer, not call camel_object_get_type. svn path=/trunk/; revision=16701
* As a temporary solution, just printf ("\a"); to make a beep :-)Jeffrey Stedfast2002-01-221-3/+11
| | | | | | | | | | | | | | | | | 2002-01-21 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (do_beep): As a temporary solution, just printf ("\a"); to make a beep :-) * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Encode the mailbox to UTF-7 here. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Decode the mailbox name as we parse the list response. (imap_mailbox_decode): It's only an illegal mailbox name if it didn't switch back to US-ASCII mode. svn path=/trunk/; revision=15421
* If we get a BYE response, call camel_service_disconnect() and set anJeffrey Stedfast2001-11-171-13/+20
| | | | | | | | | | | | | 2001-11-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_response): If we get a BYE response, call camel_service_disconnect() and set an exception. Also do the check for "* BYE" first instead of passing it off imap_read_untagged() since we'll just waste time in there mallocing left and right only to arrive at the single response line "* BYE" again :-) svn path=/trunk/; revision=14735
* Now takes a command-length argument so we can 1) avoid duping the commandJeffrey Stedfast2001-11-091-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | 2001-11-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (camel_imap_command_continuation): Now takes a command-length argument so we can 1) avoid duping the command string yet again, yay. 2) we now don't have to worry about embedded nul-chars screwing us over (we still need to avoid allowing them into the string but at least now it won't mess us up). * providers/imap/camel-imap-folder.c (do_append): Instead of appending a nul char to the end of the byte array and then passing that off as if it were a string to camel_imap_command_continuation, instead pass the byte-array length since that function now takes a length argument. Yay. Also encode any 8bit parts to avoid the possibility of sending embedded nul chars to the imap server. * providers/imap/camel-imap-store.c (try_auth): Updated to pass a command-length argument to camel_imap_command_continuation(). svn path=/trunk/; revision=14637
* More fixing of the license texts.Ettore Perazzoli2001-10-281-11/+11
| | | | svn path=/trunk/; revision=14216
* Implement.92001-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-10-09 <NotZed@Ximian.com> * providers/local/camel-spool-folder.c (spool_search_by_uids): Implement. * providers/imap/camel-imap-search.c (imap_body_contains): If searching a sub-set of the total message count, then use a UID range to search only specific messages. * camel-vee-folder.c (vee_folder_change_match): Removed. (folder_changed_add_uid): Helper func for changed code. (folder_changed_remove_uid): " (folder_changed_change_uid): " (folder_changed): Rewritten. Supports proper auto-updating of changes, but not removals till a sync occurs. (vee_search_by_uids): Implement. (folder_changed): Changed to call an async threaded function to do the actual folder updating. * camel-folder-summary.c (camel_flag_list_copy): New func to copy a whole list of flags. (camel_tag_list_copy): New func to copy a whole list of flags. * providers/imap/camel-imap-folder.c (imap_search_by_uids): Implement. * providers/local/camel-local-folder.c (local_search_by_uids): Implement. * camel-folder.c (camel_folder_search_by_uids): New function, search a subset of uid's. (search_by_uids): Default impl, return error. svn path=/trunk/; revision=13532
* Fix a leak.Peter Williams2001-08-141-2/+8
| | | | | | | | | | | | | | 2001-08-13 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-store.c (delete_folder): Fix a leak. * providers/imap/camel-imap-utils.c (imap_namespace_concat): Bleah, handle when namespace = NULL (can happen upon initial open of mailbox.) * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Don't crash when %F'ing with an empty folder name and NULL namespace. svn path=/trunk/; revision=11971
* Added an assert - at this point a backtrace would be more useful than aJeffrey Stedfast2001-08-111-0/+1
| | | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_quote_string): Added an assert - at this point a backtrace would be more useful than a transaction log for debugging. svn path=/trunk/; revision=11902
* Return FALSE here, not NULL.Jeffrey Stedfast2001-08-111-1/+1
| | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-command.c (imap_command_start): Return FALSE here, not NULL. svn path=/trunk/; revision=11893
* A quoted string cannot contain \n's so check for those as well.Jeffrey Stedfast2001-08-101-64/+64
| | | | | | | | | | 2001-08-09 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_string_generic): A quoted string cannot contain \n's so check for those as well. (imap_atom_specials): Update this to fix bug #6553. svn path=/trunk/; revision=11845
* Completely hide the namespace from everything external to the IMAP code,Peter Williams2001-08-071-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-06 Peter Williams <peterw@ximian.com> Completely hide the namespace from everything external to the IMAP code, which Dan W says is the way it should be. * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Add a new %F argument, which is like %S but will add the namespace (for folder names). (camel_imap_command): Use %F here. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Changed to strip out the namespec when returning *folder. In order to do this we need to be passed the CamelImapStore. (imap_concat): Move to here from camel-imap-store.c, un-static (imap_namespace_concat): New function, adds the namespace to the folder name, unless it's INBOX. * providers/imap/camel-imap-utils.h: Prototypes. * providers/imap/camel-imap-store.c (imap_connect_online): Extra arg to imap_parse_list_response. (imap_connect_offline): Here too. (get_folder_status): Use %F. (get_folder_online): Here too. (delete_folder): Here too. (create_folder): Here too, and arg to imap_parse_list_response. (parse_list_response_as_folder_info): Arg to i_p_l_r. (get_subscribed_folders_by_hand): Use %F. (get_folders_online): Here too. (get_folder_info_online): Instead of checking for NULL @name, check for name = NULL or "", and set to "" instead of namespace. Pass "" instead of namespace to camel_folder_info_build. (subscribe_folder): Use %F. (unsubscribe_folder): Here too. * providers/imap/camel-imap-folder.c (imap_get_full_name): This now just returns folder->full_name. (do_append): Use %F (do_copy): Here too. svn path=/trunk/; revision=11705
* Send an IMAP command, but don't wait for responses.Dan Winship2001-07-271-112/+199
| | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command_start): Send an IMAP command, but don't wait for responses. (camel_imap_command_response): Read a single line of response from the server. (camel_imap_command, etc): Reimplement in terms of the new code. * providers/imap/camel-imap-folder.c (imap_rescan): Use camel_imap_command_start and camel_imap_command_response, and call camel_operation_progress after each line read from the server. (imap_update_summary): Likewise, although with more fudging on the precentages... Also, fix this so that if none of the new messages are cached, it only does a single FETCH, and if some of them are cached, it does two FETCHes (one to get the UIDs, FLAGS, and SIZEs, and another to get the bodies of all of the messages that aren't cached now that it knows the relevant UIDs). This should speed up startup a bunch (especially if you have high bandwidth but also high latency to the IMAP server). svn path=/trunk/; revision=11430
* Clean up some exception misusage.Peter Williams2001-07-181-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-17 Peter Williams <peterw@ximian.com> Clean up some exception misusage. * providers/imap/camel-imap-command.c (camel_imap_command): Use our own internal exception for sending the string and transfer it to @ex if anything goes wrong. (imap_read_response): Use our own internal exception for reading the untagged responses and blah blah blah. * camel-session.c (get_service): Use our own internal exception when constructing the service and transfer it to @ex if anything goes wrong. * camel-remote-store.c (remote_recv_line): Instead of having gboolean exception, use our own internal exception and copy it to @ex if anything goes wrong. * camel-store.c (store_sync): Create an internal exception because sync_folder() checks it for validity. Transfer it to @ex when done. * camel-exception.c (camel_exception_get_description): If @ex is NULL, complain - passing NULL exceptions to Camel is okay, but there should be no circumstances under which they're then examined. (camel_exception_get_id): Same here, (camel_exception_xfer): NULL-protect and warn if transferring from a NULL exception. svn path=/trunk/; revision=11177
* Given: 4 EXISTS 1 EXPUNGE We have to pass 3, not 4 toDan Winship2001-07-171-0/+7
| | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_response_free): Given: * 4 EXISTS * 1 EXPUNGE We have to pass 3, not 4 to camel_imap_folder_changed for the exists count. Fixes ximian bug #2112 (finally!). svn path=/trunk/; revision=11133
* Set the pipe fd's to nonblocking.Jeffrey Stedfast2001-07-071-2/+2
| | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's to nonblocking. svn path=/trunk/; revision=10847
* Added an assert to make sure that `mi' isn't NULL.Jeffrey Stedfast2001-07-061-2/+6
| | | | | | | | | | | | | | 2001-07-05 Jeffrey Stedfast <fejj@ximian.com> * camel-folder-summary.c (camel_message_info_string): Added an assert to make sure that `mi' isn't NULL. (camel_message_info_set_string): Same. * providers/imap/camel-imap-command.c (camel_imap_response_free): Create and use a temporary CamelException for use with camel_imap_folder_changed. svn path=/trunk/; revision=10834
* Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid aDan Winship2001-06-251-2/+2
| | | | | | | | | | | | | * providers/imap/camel-imap-store.c (try_auth): Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a useless round trip like some other SASL bindings do. * providers/imap/camel-imap-command.c (imap_read_response): Deal with IMAP servers that (incorrectly) return "+\r\n" rather than "+ \r\n" for an empty continuation response. (camel_imap_response_extract_continuation): Likewise. svn path=/trunk/; revision=10480
* Create a CamelDiscoDiary. (imap_disconnect_offline): And free it.Dan Winship2001-05-301-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (imap_connect_online, imap_connect_offline): Create a CamelDiscoDiary. (imap_disconnect_offline): And free it. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): If RESYNCING, don't do any sort of checking that the remote folder matches the summary, beyond making sure that the UIDVALIDITY is correct. (imap_rescan): Add a missing camel_folder_summary_info_free when removing a UID from the summary. (imap_expunge_uids_offline): Implement. Fairly simple. (imap_expunge_uids_resyncing): Implement. If the store supports UIDPLUS, we can just use imap_expunge_uids_online. If not, we need to temporarily undelete any messages marked deleted on the server that aren't supposed to get expunged. (imap_append_offline): Implement, using cache and summary operations, and triggering the folder_changed event by hand. (imap_append_resyncing): Implement. Redo imap_append_online a bit in the process to make them able to share more code. (imap_copy_offline): Implement. (imap_copy_online): Move parts of this out into a helper. (imap_copy_resyncing): Implement. In most cases this is just like imap_copy_online, but if you are copying a message that was itself copied or appended into the folder, and the server doesn't do UIDPLUS, it will be necessary to replace at least part of the copy operation with one or more appends. * providers/imap/camel-imap-command.c (imap_read_response): Don't record the current folder in the response when in RESYNCING mode. (This means that EXISTS and EXPUNGE responses won't be processed, which is needed because the summary may not match the folder at this point.) (imap_read_response): On error, call camel_imap_response_free_without_processing, not camel_imap_response_free. * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Make this work better when operating on UIDs that aren't in the summary. * providers/imap/camel-imap-summary.c (camel_imap_summary_add_offline): New routine used by imap_append_offline and imap_copy_offline to create new summary entries. svn path=/trunk/; revision=10041
* Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" intoDan Winship2001-05-031-2/+2
| | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.h: Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" into capabilities. * providers/imap/camel-imap-store.c (camel_imap_store_init): Initialize the tag_prefix, based on a static variable. * providers/imap/camel-imap-command.c (camel_imap_command): Use the store's tag_prefix character rather than "A" at the start of the tag. Makes the verbose debug output easier to parse when connected to multiple IMAP servers. (Well, unless you're connected to more than 26 servers...) svn path=/trunk/; revision=9649
* Redo command locking. Since command_lock is recursive, we can just get aDan Winship2001-05-021-31/+65
| | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command): Redo command locking. Since command_lock is recursive, we can just get a lock here, and release it either on error, or when the caller frees the response data. (This simplifies a lot of stuff, and fixes some problems with camel_imap_folder_changed being called without the command_lock locked because of the 2001-03-22 change.) (camel_imap_response_free): (camel_imap_response_free_without_processing): (camel_imap_response_extract): (camel_imap_response_extract_continuation): These all take a CamelImapStore now as well, to deal with locking. * providers/imap/camel-imap-private.h: Add CAMEL_IMAP_STORE_ASSERT_LOCKED, which defaults to a noop, but can be made to call e_mutex_assert_locked. * providers/imap/camel-imap-folder.c, camel-imap-search.c, camel-imap-store.c: Simplify using new locking stuff. Add a few CAMEL_IMAP_STORE_ASSERT_LOCKED checks. svn path=/trunk/; revision=9639
* Big header cleanups and nntp compile fixKjartan Maraas2001-03-301-1/+2
| | | | svn path=/trunk/; revision=9024
* keep a reference on the store's current_folder.Dan Winship2001-03-271-1/+5
| | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command): keep a reference on the store's current_folder. * providers/imap/camel-imap-store.c (camel_imap_store_finalize): (imap_disconnect): unref the current_folder before clearing it. svn path=/trunk/; revision=8945
* Don't look at untagged responses other than "* BYE"...Dan Winship2001-03-231-52/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (imap_read_response): Don't look at untagged responses other than "* BYE"... (camel_imap_response_free): ...do it here instead... (camel_imap_response_free_without_processing): ...but not here. * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): Remove the "EXISTS" line from the response so camel_imap_response_free won't try to process it. (camel_imap_folder_selected): If we get an EXISTS response mixed in with the FETCH responses, record the new EXISTS value. Use camel_imap_response_free_without_processing so that an EXISTS response won't cause a loop. (imap_rescan): Use camel_imap_response_free_without_processing. (imap_update_summary): Use camel_imap_response_free_without_processing. If an EXISTS response shows up, call imap_update_summary again to get the new messages. (imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't deal with RFC822.HEADER responses. * providers/imap/camel-imap-store.c (get_folder_info): Fix an uninitialized variable svn path=/trunk/; revision=8905
* Function to check if the store is online and set an exception if not.Dan Winship2001-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (camel_imap_store_check_online): Function to check if the store is online and set an exception if not. Currently controlled by an environment variable, but eventually there will be both a global (session-level) setting and a per-store setting. (construct): Set up storage_path and base_url here rather than at connect-time. (imap_auth_loop): Split out from imap_connect. (imap_setup_online): Split out from imap_connect. Do the post-authentication connection setup, and cache the results to disk. (imap_setup_offline): Set up a CamelImapStore with information saved from a previous imap_setup_online. (imap_connect): If online, do connect_to_server(), imap_auth_loop(), and imap_setup_online(). Otherwise, do imap_setup_offline(). (get_folder, get_folder_info): Add offline support. (create_folder, subscribe_folder, unsubscribe_folder): Disable these when offline (for now). * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Remove the sync'ing-with-server stuff... it's done by camel_imap_folder_selected now, which only gets called if the store is online. (camel_imap_folder_selected): add the code removed from camel_imap_folder_new. Besides simplifying the folder_new and summary_new code, this also means now that we'll DTRT if a folder's UIDVALIDITY changes while we're connected. Also, when that happens, clear the message cache explicitly. (imap_refresh_info, imap_sync): These are no-ops when offline. (imap_expunge, imap_append_message, imap_copy_message_to, imap_search_by_expression): These don't yet work offline. (imap_get_message, camel_imap_folder_fetch_data): Return an error when trying to fetch a non-cached body part when we're offline. * providers/imap/camel-imap-summary.c (camel_imap_summary_new): Rewrite to not check the validity here. (We'll do it from camel_imap_folder_selected instead.) * providers/imap/camel-imap-command.c (camel_imap_command): Call camel_imap_folder_selected even when the selection is all we're doing, to match the changes in camel-imap-folder.c. * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_clear): New function to clear out a message cache. svn path=/trunk/; revision=8851
* Include the terminating NUL in the calculated string length. This hitNot Zed2001-01-291-1/+1
| | | | | | | | | | 2001-01-29 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-command.c (imap_command_strdup_vprintf): Include the terminating NUL in the calculated string length. This hit memcheck. svn path=/trunk/; revision=7884
* Chganged len back to be unsigned. And do a simple range check on theNot Zed2001-01-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-01-16 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_decode_string): Chganged len back to be unsigned. And do a simple range check on the string value to try and detect corrupted summary files. * providers/imap/camel-imap-command.c (imap_read_untagged): Handle cancelled stream reads with an appropriate exception. * providers/imap/camel-imap-private.h: Fix the include-once macro. Doh, confliced with camel-private.h. * providers/imap/camel-imap-store.c (imap_store_refresh_folders): A copy of camel_remote_store_refresh_folders. We avoid locking each folder when we call it though. This should be removed when i can work out how to remove the folder lock from this function easily. * camel-stream-fs.c (stream_write): Fix n' argument of select. (stream_read): Likewise. * camel-remote-store.c (socket_connect): Bump the connect timeout upto 4 minutes. (socket_connect): Oops, fix the 'n' argument of select. * camel-session.c (camel_cancel_cancel): If we are given no cancellation node, then do it for all active ones. svn path=/trunk/; revision=7526
* New function to check for added/deleted messages when re-selecting aDan Winship2001-01-121-0/+1
| | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (camel_imap_folder_selected): New function to check for added/deleted messages when re-selecting a folder. (imap_refresh_info, imap_rescan, imap_update_summary): Various locking tweaks that turn out to be irrelevant since command_lock is recursive, but whatever. * providers/imap/camel-imap-command.c (camel_imap_command): When selecting a new folder, call camel_imap_folder_selected on it. svn path=/trunk/; revision=7410
* New header to prevent recursive #include problemsDan Winship2001-01-111-0/+1
| | | | | | | | | | | | | | | | | * providers/imap/camel-imap-types.h: New header to prevent recursive #include problems * providers/imap/*.h: Replace some #includes with #include "camel-imap-types.h", remove typedefs that were moved to camel-imap-types.h * providers/imap/*.c: Add #includes to make up for #includes removed from .h files * providers/imap/Makefile.am (libcamelimapinclude_HEADERS): Add camel-imap-types.h svn path=/trunk/; revision=7367
* Lock the command channel while searching. (imap_body_contains): IfNot Zed2000-12-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-12-24 Not Zed <NotZed@HelixCode.com> * providers/imap/camel-imap-search.c (imap_body_contains): Lock the command channel while searching. (imap_body_contains): If performing a whole uid search, then add references to our own summary items, dont look it up in the folder. This way they can't vanish unexpectedly. * providers/imap/camel-imap-folder.h (CamelImapFolder): Added a private field. * providers/imap/camel-imap-private.h: Added lock for imap searches. * Merge from camel-mt-branch. * providers/imap/camel-imap-folder.c (imap_update_summary): Merge fix, use the folder->summary. (imap_get_message_flags, imap_set_message_flags, imap_get_message_user_flag, imap_set_message_user_flag): Removed again. (camel_imap_folder_init): Setup private data/lock. (imap_finalize): Free private data/search lock. (imap_search_free): Lock the search_lock. (imap_search_by_expression): Lock the search lock when using the search object. Also copy/ref hte summary, rather than getting it directly. (imap_refresh_info): Free any info lookups. Use folder->summary not imap_folder->summary. And lock around commands. svn path=/trunk/; revision=7150
* Change the semantics of fmt: Now %S (capital S) means an IMAP "string",Dan Winship2000-12-191-4/+119
| | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-command.c (camel_imap_command): Change the semantics of fmt: Now %S (capital S) means an IMAP "string", (which can be sent as either a quoted string or a literal). If the server supports LITERAL+, these will be sent as extended literals (which don't require any special escaping). Otherwise they'll be sent as quoted strings (and it now properly deals with " or \ in the string). (imap_command_strdup_vprintf): Utility routine that does the real work for the functionality mentioned above. * providers/imap/camel-imap-utils.c (imap_quote_string): Turns a string into a proper IMAP "quoted string". * providers/imap/camel-imap-store.c: * providers/imap/camel-imap-folder.c: Use %S instead of "%s" where appropriate. svn path=/trunk/; revision=7070
* Fix some off-by-one-ness.Dan Winship2000-11-301-3/+3
| | | | | | | | | | * providers/imap/camel-imap-command.c (imap_read_untagged): Fix some off-by-one-ness. * camel-stream-buffer.c (stream_read): Fix another bug found in previously-unused code here. svn path=/trunk/; revision=6718
* Make this gratuitously more complicated. No wait, I mean, fix bugs. NowDan Winship2000-11-281-48/+89
| | | | | | | | | | | | | * providers/imap/camel-imap-command.c (imap_read_untagged): Make this gratuitously more complicated. No wait, I mean, fix bugs. Now fully handles NULs in the data stream (which "can't happen" but do) and also handles responses containing multiple literals. Also does less copying than the original code. * camel-stream-buffer.c (stream_read): Fix a bug that could make it lose sync and/or overrun buffers. svn path=/trunk/; revision=6688
* Fixed to return the correct bytecount in all cases which is the real fixJeffrey Stedfast2000-11-211-3/+3
| | | | | | | | | | | | | | | | 2000-11-20 Jeffrey Stedfast <fejj@helixcode.com> * camel-remote-store.c (remote_recv_line): Fixed to return the correct bytecount in all cases which is the real fix to imap_parse_nstring. * providers/imap/camel-imap-command.c (imap_read_untagged): Again, don't use strlen for the post-data, use 'n'. * providers/imap/camel-imap-utils.c (imap_parse_nstring): Undo my previous temp-fix. svn path=/trunk/; revision=6621
* Use the byte-read count to decrement the number of bytes left to readJeffrey Stedfast2000-11-171-5/+5
| | | | | | | | | | | | | | | | | 2000-11-17 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-command.c (imap_read_untagged): Use the byte-read count to decrement the number of bytes left to read rather than using strlen. Not only does this protect against a DoS (embedded NUL chars in the literal string would make strlen inaccurate) but it also improves performace a little. * camel-remote-store.c (remote_recv_line): *Sigh* Return the number of bytes read on success rather than 0. Also don't use camel_stream_buffer_read_line since we can't get an accurate octet count. svn path=/trunk/; revision=6599
* Improved IMAP namespace handling: leave the namespace in theDan Winship2000-10-301-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | folder names rather than constantly prepending it and stripping it off. Also some subscription fixes. * camel-store.c (camel_folder_info_build): Fix for the case where @top isn't in @folders. * providers/imap/camel-imap-folder.c (camel_imap_folder_new): Add a "short_name" argument rather than figuring it out ourselves. (imap_get_full_name): Implementation of CamelFolder::get_full_name that strips off namespace so the user doesn't have to see it. (imap_append_message, imap_copy_message_to, imap_move_message_to): Use folder->full_name rather than calling camel_imap_store_get_folder_path. * providers/imap/camel-imap-utils.c (imap_parse_list_response): Update this: make @flags a bitmask and @sep a char rather than a string. Make all of the out arguments optional. Handle literals in the server response. * providers/imap/camel-imap-store.c (imap_connect): Do a better job of getting the correct dir_sep for the namespace we're using. Construct a base_url here that will be used by get_folder_info. (camel_imap_store_folder_path): Removed (imap_folder_exists): Add an argument to return the short name of the folder (parsed out of the LIST response). Update for imap_parse_list_response change. (get_folder): Update for the various other changes. (get_folder_info): Update for the various other changes. Be more consistent about the returned layout: put everything underneath the "namespace" directory, including INBOX, even if it doesn't belong there. Don't destroy the list of subscribed folders until we've actually gotten the new list. (folder_subscribed, subscribe_folder, unsubscribe_folder): Use folder_name directly rather than camel_imap_store_folder_Path. * providers/imap/camel-imap-command.c (camel_imap_command): Update for folder name changes. svn path=/trunk/; revision=6256
* lots of i18n fixesDan Winship2000-10-241-7/+7
| | | | svn path=/trunk/; revision=6143
* Fix a "how could this have been working before" memory overrun bug foundDan Winship2000-10-241-0/+3
| | | | | | | | * providers/imap/camel-imap-command.c (imap_read_untagged): Fix a "how could this have been working before" memory overrun bug found by Vlad. svn path=/trunk/; revision=6129
* Don't imap_next_word(respbuf + 2), instead use imap_next_word(respbuf) orJeffrey Stedfast2000-10-171-1/+1
| | | | | | | | | | | 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-command.c (imap_read_response): Don't imap_next_word(respbuf + 2), instead use imap_next_word(respbuf) or else we'll skip over the second token. svn path=/trunk/; revision=5961
* Don't free 'resp' as it doesn't point to the beginning of the allocatedJeffrey Stedfast2000-10-171-10/+11
| | | | | | | | | | | | | | | | | 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-command.c (camel_imap_response_extract): Don't free 'resp' as it doesn't point to the beginning of the allocated data, instead free response->untagged->pdata[i]. Also, if '*resp' is equal to a space character, then set resp = imap_next_word (resp) rather than expecting resp++ to work (there's a list broken IMAP daemons that like to put extra spaces between tokens). (imap_read_response): Don't expect 'respbuf+2' to be where the untagged number response to start (see above fix for an explanation). svn path=/trunk/; revision=5960
* Only send the LOGOUT command if the store is connected. (imap_connect):Jeffrey Stedfast2000-10-171-1/+10
| | | | | | | | | | | | | | | | | | | 2000-10-16 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-store.c (imap_disconnect): Only send the LOGOUT command if the store is connected. (imap_connect): Set the 'connected' state to TRUE when we successfully connect. (get_folder_info): if (!topfi), 'topfi' was allocated but then 'fi' was set. I think Dan meant to set topfi since fi is an uninitialized value at this point. * providers/imap/camel-imap-command.c (imap_read_response): Check for the untagged BYE response and set the 'connected' state to FALSE if we receive the BYE response. Return NULL if we get a BYE response. svn path=/trunk/; revision=5944
* Simple subclass of CamelFolderSummary that also keeps a UIDVALIDITY valueDan Winship2000-10-131-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-summary.c: Simple subclass of CamelFolderSummary that also keeps a UIDVALIDITY value (and doesn't, for the moment, build content info). * providers/imap/camel-imap-folder.c: (various): Use a CamelImapSummary to store/fetch summary info. (camel_imap_folder_new): Take a path to a file to use for the summary. Set the folder's permanent_flags correctly according to the server response. Read in the summary (checking the UIDVALIDITY) and update it if it's out of date. (imap_refresh_info): Just fetch UIDs and flags. If the UIDs all match, update the flags as needed and be done with it. Otherwise, delete messages that have been expunged from the server and fetch full summary info for any new messages. (imap_sync): Save the summary to disk. (imap_update_summary): Renamed from imap_get_summary_internal. Can now be told to get summary for only a subset of messages. Use camel-mime-utils functions rather than rolling our own header parsing. (imap_get_message_info_internal): Merged into imap_update_summary. (imap_set_message_flags): Don't marked the message FOLDER_FLAGGED if we're not actually changing the value of any of the flags. (camel_imap_folder_changed): Deal with EXISTS rather than RECENT. * providers/imap/camel-imap-store.c (imap_connect): Call camel_session_get_storage_path and save the value. (get_folder): Create a local directory to store summary information and pass a summary file name to camel_imap_folder_new. Don't call camel_folder_refresh_info from here any more since camel_imap_folder_new does it again. * providers/imap/camel-imap-command.c (camel_imap_command): Add a special case to this to make it possible to get the repsonses from a SELECT and still have store->current_folder be updated correctly. (imap_read_response): parse EXISTS rather than RECENT * camel-session.c (camel_session_get_storage_path): Use e_mkdir_hier. * camel-folder-summary.c (camel_folder_summary_remove_index): New function. * camel-mime-utils.c (header_raw_append_parse): fix this. (camel-mime-parser.c doesn't use this code because of the MEMPOOL optimization, so nothing was ever actually calling it before.) svn path=/trunk/; revision=5891
* Quote the mailbox name when sending a SELECT request otherwise mailboxesJeffrey Stedfast2000-10-041-1/+1
| | | | | | | | | | | | | | 2000-10-03 Jeffrey Stedfast <fejj@helixcode.com> * providers/imap/camel-imap-command.c (camel_imap_command): Quote the mailbox name when sending a SELECT request otherwise mailboxes with spaces in their names will cause problems. * camel-mime-message.c (camel_mime_message_set_reply_to): encode before setting. (camel_mime_message_set_from): Same. svn path=/trunk/; revision=5697
* New file containing camel_imap_command and friends. MajorDan Winship2000-10-041-0/+391
* providers/imap/camel-imap-command.c: New file containing camel_imap_command and friends. Major camel_imap_command rewrite to remove duplicated code, make the parsing of literals be more safe/correct, deal with RECENT/EXPUNGE responses more consistently, and make it possible to implement the AUTHENTICATE command. * providers/imap/camel-imap-utils.c (imap_parse_nstring): New function, to parse an IMAP "nstring". * providers/imap/camel-imap-store.c: Move command stuff to camel-imap-command.c. Update for camel_imap_command changes. * providers/imap/camel-imap-folder.c: Update for camel_imap_command changes. (imap_append_message): CRLF filter the message before sending it. * providers/imap/Makefile.am: Add camel-imap-command.[ch], remove camel-imap-stream.[ch] for now. svn path=/trunk/; revision=5693