aboutsummaryrefslogtreecommitdiffstats
path: root/camel
Commit message (Collapse)AuthorAgeFilesLines
* We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-143-14/+18
| | | | | | | | | | | | | 2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? (camel_store_get_folder): Nevermind, reverted the fix. (camel_store_get_folder): No, I wasn't on crack before after all...if we don't ref here, then we're open to a race condition later. svn path=/trunk/; revision=11973
* Fix a leak.Peter Williams2001-08-144-5/+34
| | | | | | | | | | | | | | 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
* We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-142-1/+1
| | | | | | | | | | 2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? (camel_store_get_folder): Nevermind, reverted the fix. svn path=/trunk/; revision=11969
* We need to be ref'ing the folder if/when we add it to the hash. This mayJeffrey Stedfast2001-08-146-42/+50
| | | | | | | | | 2001-08-13 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_get_folder): We need to be ref'ing the folder if/when we add it to the hash. This may fix bug #6089? svn path=/trunk/; revision=11968
* s/summarising/summarizing/. (summary_rebuild): Likewise.Ettore Perazzoli2001-08-123-7/+19
| | | | | | | | | | | | | | * providers/local/camel-spool-summary.c (summary_rebuild): s/summarising/summarizing/. (summary_rebuild): Likewise. * providers/local/camel-mbox-summary.c (mbox_summary_sync_full): s/summarise/summarize/. (mbox_summary_sync_quick): Likewise. (summary_rebuild): Likewise. (mbox_summary_check): Likewise. svn path=/trunk/; revision=11919
* Added an assert - at this point a backtrace would be more useful than aJeffrey Stedfast2001-08-113-7/+24
| | | | | | | | | | 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-112-1/+4
| | | | | | | | | 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
* tedfast <fejj@ximian.com>Jeffrey Stedfast2001-08-111-4/+4
| | | | | | | | | tedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Don't g_strdup() the uid into the trigger_event call. svn path=/trunk/; revision=11892
* Don't g_strdup() the uid into the trigger_event call.Jeffrey Stedfast2001-08-112-17/+20
| | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_rescan): Don't g_strdup() the uid into the trigger_event call. svn path=/trunk/; revision=11891
* Set the total bytes expected to 0 if the response is empty too.Jeffrey Stedfast2001-08-112-3/+6
| | | | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set the total bytes expected to 0 if the response is empty too. (pop3_refresh_info): Return of there was an error generating pop3 uids. svn path=/trunk/; revision=11886
* Set the total bytes expected to 0 if the response is empty too.Jeffrey Stedfast2001-08-113-8/+11
| | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Set the total bytes expected to 0 if the response is empty too. svn path=/trunk/; revision=11885
* regfree the pattern before continue'ing. This was showing up quite a bitJeffrey Stedfast2001-08-103-9/+16
| | | | | | | | | | 2001-08-10 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_raw_check_mailing_list): regfree the pattern before continue'ing. This was showing up quite a bit under purify. svn path=/trunk/; revision=11867
* A quoted string cannot contain \n's so check for those as well.Jeffrey Stedfast2001-08-107-204/+207
| | | | | | | | | | 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
* Remove trailing stuff from URLs before returning. (Done in an evil way,Jon Trowbridge2001-08-092-2/+20
| | | | | | | | | | 2001-08-08 Jon Trowbridge <trow@ximian.com> * camel-filter-search.c (get_source): Remove trailing stuff from URLs before returning. (Done in an evil way, not in the good way suggested by fejj. :)) (Bug #4876) svn path=/trunk/; revision=11808
* check for NULL name and addr (fixes a bug i was about to report)jacob berkman2001-08-082-2/+7
| | | | | | | | | 2001-08-08 jacob berkman <jacob@ximian.com> * camel-search-private.c (camel_search_header_match): check for NULL name and addr (fixes a bug i was about to report) svn path=/trunk/; revision=11786
* Properly determine match type to pass to header_match.Not Zed2001-08-087-83/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-08 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (check_header): Properly determine match type to pass to header_match. (address_matches_exactly): Removed, effectively added to camel_search_header_match. * camel-folder-search.c (check_header): Properly determine the match type to pass to header_match. * camel-search-private.c (camel_search_header_match): Add a new parameter 'type' which is the type of header we're matching against. ASIS means utf8 format, ADDRESS means an internet address ('formatted'), ADDRESS_ENCODED means a raw address header, ENCODED means rfc 2047 encoded text. (header_match): Move original logic here, have search_header_match call it as appropriate for the 'type' of match. 2001-08-07 Not Zed <NotZed@Ximian.com> * camel-session.c (camel_session_class_init): Only init the vee provider struct once (if we're subclassed this will get called multiple times). * camel-object.c (obj_finalize): Removed a bit of a debug that crept in with jacob's poolv patch (?). svn path=/trunk/; revision=11772
* New function to do danw's address "is" comparison (as specified in bugJeffrey Stedfast2001-08-083-113/+167
| | | | | | | | | | | 2001-08-07 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-search.c (address_matches_exactly): New function to do danw's address "is" comparison (as specified in bug #5886. (check_header): Special-case address-type headers when we are doing an exact match to use the address_matches_exactly function. svn path=/trunk/; revision=11738
* Modify to take a headers_only argument which will then only fetch messageJeffrey Stedfast2001-08-072-9/+19
| | | | | | | | | | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): Modify to take a headers_only argument which will then only fetch message headers. (pop3_generate_uids): Pass in TRUE for headers_only. (pop3_get_message): Pass in FALSE for headers_only and move the camel_operation() stuff out of get_message_stream and in to here instead. (pop3_generate_uids): We also need to be using i+ 1 as the id since we are starting at 0. svn path=/trunk/; revision=11722
* New internal function to get a message stream by message sequence id (soJeffrey Stedfast2001-08-072-68/+129
| | | | | | | | | | | | | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-folder.c (pop3_get_message_stream): New internal function to get a message stream by message sequence id (so that we can share code between pop3_get_message and pop3_generate_uids). (pop3_get_message): Use pop3_get_message_stream. (pop3_generate_uids): New function to generate UIDs based on the message - this fixes bug #1256. (pop3_refresh_info): If the server doesn't support UIDL, call pop3_generate_uids to get our list of UIDs. * providers/imap/camel-imap-store.c (get_folder_info_online): Don't strstr for noselect=yes, that's just plain broken. svn path=/trunk/; revision=11721
* Don't strstr for noselect=yes, that's just plain broken.Jeffrey Stedfast2001-08-073-33/+51
| | | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Don't strstr for noselect=yes, that's just plain broken. svn path=/trunk/; revision=11714
* Fix off-by-one error in cleaning up deleted messages at the end of theDan Winship2001-08-072-1/+5
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Fix off-by-one error in cleaning up deleted messages at the end of the folder. Fixes bug #5585 and maybe others. svn path=/trunk/; revision=11712
* Do a refresh_info on the selected folder before looking at its unreadDan Winship2001-08-072-7/+12
| | | | | | | | * providers/imap/camel-imap-store.c (get_folder_info_online): Do a refresh_info on the selected folder before looking at its unread count. Should fix bug #4944. svn path=/trunk/; revision=11710
* Completely hide the namespace from everything external to the IMAP code,Peter Williams2001-08-076-66/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Always do --no-auto-key-retrieve.Jeffrey Stedfast2001-08-072-2/+7
| | | | | | | | 2001-08-06 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Always do --no-auto-key-retrieve. svn path=/trunk/; revision=11703
* Minor changes to the iconv code so that it does the check in the returnJeffrey Stedfast2001-08-042-1/+14
| | | | | | | | | | | 2001-08-03 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Minor changes to the iconv code so that it does the check in the return value of iconv() just like the code in camel-mime-utils.c in case this fixes Bo Rosen's gpg bugs (but I doubt this will change anything?). svn path=/trunk/; revision=11622
* First check to make sure that service->url->authmech is non-NULL beforeJeffrey Stedfast2001-08-042-14/+18
| | | | | | | | | | 2001-08-03 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): First check to make sure that service->url->authmech is non-NULL before passing it into strcmp to avoid a segfault. svn path=/trunk/; revision=11618
* Sigh, if gpg returns '1' it means that the key is bad but it did succeedeJeffrey Stedfast2001-08-042-1/+10
| | | | | | | | | | | | 2001-08-03 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_decrypt): Sigh, if gpg returns '1' it means that the key is bad but it did succeede in decrypting the block so to make users happy (even though I find this a questionable action) we are going to ignore the error and show it to the user anyway. This fixes bug #6136. svn path=/trunk/; revision=11617
* special case popb4smtp auth before we try and connect, and do the magicNot Zed2001-08-037-12/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-03 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): special case popb4smtp auth before we try and connect, and do the magic here first. 2001-08-02 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Check for POPB4SMTP separate to the esmtp auth list. (smtp_auth): If creating the sasl object means it is already authenticated, then exit early. Sort of 'clean hack' to help popb4smtp work. (smtp_auth): Unref the sasl object, clean up a memleak i think. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): Added POPB4SMTP auth type. * camel-sasl.c (camel_sasl_authtype): Added POPB4SMTP type. * camel-sasl-popb4smtp.c: New file for pop before smtp 'authentication'. * Makefile.am (libcamel_la_SOURCES, HEADERS): Add camel-sasl-popb4smtp.[ch]. svn path=/trunk/; revision=11615
* If we fail to get the lock, make sure we close our locking fd, and resetNot Zed2001-08-012-1/+11
| | | | | | | | | | 2001-08-01 Not Zed <NotZed@Ximian.com> * providers/local/camel-mbox-folder.c (mbox_lock): If we fail to get the lock, make sure we close our locking fd, and reset it. Fixes the crash part of 5095. svn path=/trunk/; revision=11538
* Slightly re-arranged filter/change notification logic. If we;re filtering,Not Zed2001-08-014-42/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-08-01 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Slightly re-arranged filter/change notification logic. If we;re filtering, freeze the folder till we're finished to smooth the ui for new mail. 2001-07-31 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_init): Chagned mutexes to e_mutexes, folder lock recursive. This fixes the imap filtering bug, or at least some cases of it. (camel_folder_finalize): Free mutexes. * camel-private.h (CamelFolderPrivate): Changed mutexes to e_mutexes. 2001-07-25 Not Zed <NotZed@Ximian.com> * camel-folder.c (camel_folder_change_info_*): Change the return if fail's into asserts. (camel_folder_change_info_free): Don't let it accept a NULL argument. This isn't g_lib so we dont have to. svn path=/trunk/; revision=11537
* Fix the fix that fixes broken mailer behavior. We want to make sure thatJeffrey Stedfast2001-07-282-2/+10
| | | | | | | | | | | 2001-07-27 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_param): Fix the fix that fixes broken mailer behavior. We want to make sure that the user's locale charset is non-NULL before we pass it off to iconv_open(). If it *is* NULL, we want to use iso-8859-1. svn path=/trunk/; revision=11448
* Allow the url to be NULL just like the libc free convention.Jeffrey Stedfast2001-07-273-14/+23
| | | | | | | | | 2001-07-26 Jeffrey Stedfast <fejj@ximian.com> * camel-url.c (camel_url_free): Allow the url to be NULL just like the libc free convention. svn path=/trunk/; revision=11437
* Send an IMAP command, but don't wait for responses.Dan Winship2001-07-275-233/+504
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Add another Sender pattern.Dan Winship2001-07-252-0/+6
| | | | | | | * camel-mime-utils.c (mail_mlist_magic): Add another Sender pattern. svn path=/trunk/; revision=11399
* Change the break into a continue, we should process as many as we canNot Zed2001-07-253-5/+17
| | | | | | | | | | | | | | | | 2001-07-24 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Change the break into a continue, we should process as many as we can find. * camel-folder.c (camel_folder_move_messages_to): If we have no uid's to copy, exit here before going any further. Some code internally [imap] assumes there are uids to copy otherwise it can segfault. (camel_folder_copy_messages_to): Same. svn path=/trunk/; revision=11392
* oops, and just in case value is NULL...Jeffrey Stedfast2001-07-251-1/+1
| | | | svn path=/trunk/; revision=11363
* Handle broken mailers that send unencoded 8bit header params. And thereJeffrey Stedfast2001-07-252-0/+41
| | | | | | | | | | 2001-07-24 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_param): Handle broken mailers that send unencoded 8bit header params. And there was much rejoicing. Rah. svn path=/trunk/; revision=11362
* New #define, and there was much rejoicing. Rah.Jeffrey Stedfast2001-07-252-0/+7
| | | | | | | | | 2001-07-24 Jeffrey Stedfast <fejj@ximian.com> * camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was much rejoicing. Rah. svn path=/trunk/; revision=11351
* Somehow this missed the commit.Not Zed2001-07-241-2/+2
| | | | | | | | | 2001-07-24 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_register, unregister): Added some warnings for bad cases. svn path=/trunk/; revision=11333
* Added some warnings for bad cases.Not Zed2001-07-242-4/+26
| | | | | | | | | | | | | | | | 2001-07-24 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_register, unregister): Added some warnings for bad cases. 2001-07-23 Not Zed <NotZed@Ximian.com> * camel-operation.c (camel_operation_register): Only insert a hash entry if we haven't already. (camel_operation_unregister): Only remove the has entry if the id is a real thread. svn path=/trunk/; revision=11329
* Slight fix for when source == destination (we don't want to do this actionJeffrey Stedfast2001-07-242-0/+9
| | | | | | | | | | 2001-07-23 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (do_move): Slight fix for when source == destination (we don't want to do this action because on-demand filtering would then delete the messages it supposedly "moved"). svn path=/trunk/; revision=11304
* Added some operation progress reporting. Actual data transfer is 'tricky'Not Zed2001-07-234-12/+44
| | | | | | | | | | | | | | | | | | | | 2001-07-23 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_auth, smtp_helo, send_to): Added some operation progress reporting. Actual data transfer is 'tricky' because of the layers used. (smtp_auth): Instead of checking exception_is_set, use challenge==NULL to test if sasl_challenge_base64 failed. * providers/local/camel-mbox-summary.c (mbox_summary_sync): Remove peters changes below and put in a better fix. These functions already return -1 on error, just use that, and not worry about building our own exception redundantly. * camel-service.c (camel_get_host_byname): Turn the progress into a transient event. svn path=/trunk/; revision=11301
* More usage fixes for CamelException. Check our own exception forPeter Williams2001-07-212-2/+12
| | | | | | | | | | 2001-07-20 Peter Williams <peterw@ximian.com> * providers/local/camel-mbox-summary.c (mbox_summary_sync): More usage fixes for CamelException. Check our own exception for summary_update and xfer it out if an error occurred. svn path=/trunk/; revision=11273
* Pull up test fixes to get them building againJP Rosevear2001-07-2110-12/+18
| | | | | | | | 2001-07-20 JP Rosevear <jpr@ximian.com> * Pull up test fixes to get them building again svn path=/trunk/; revision=11270
* renamed to camel_charset_to_iconv() to make it just a little moreNot Zed2001-07-206-9/+15
| | | | | | | | | 2001-07-20 Not Zed <NotZed@Ximian.com> * camel-charset-map.c (camel_charset_get_iconv_friendly_name): renamed to camel_charset_to_iconv() to make it just a little more svn path=/trunk/; revision=11254
* Convert to the iconv-friendly charset names.Jeffrey Stedfast2001-07-209-116/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-19 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-filter-charset.c (camel_mime_filter_charset_new_convert): Convert to the iconv-friendly charset names. * providers/imap/camel-imap-store.c (create_folder): Fixed a compiler warning about returning without a value in a non-void function. Blah. * camel-mime-part.c (process_header): Pass the locale charset as the default_charset to header_decode_string(). * camel-folder-summary.c (camel_folder_summary_format_string): Pass the locale charset as the default_charset to header_decode_string(). (content_info_new): Same. * camel-mime-message.c (process_header): Pass the locale charset as the default_charset to header_decode_string(). * camel-mime-utils.c (append_8bit): New helper function who's purpose is similar to append_latin1() but for 8bit text that we are assuming is not latin1. (header_decode_text): Now takes a default_charset parameter and calls append_8bit when appropriate. (header_decode_string): Also takes a default_charset parameter now. (header_decode_mailbox): Pass NULL as the default_charset to header_decode_string(). svn path=/trunk/; revision=11250
* Fixed a compiler warning about returning without a value in a non-voidJeffrey Stedfast2001-07-201-1/+1
| | | | | | | | | | 2001-07-19 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (create_folder): Fixed a compiler warning about returning without a value in a non-void function. Blah. svn path=/trunk/; revision=11247
* Modified to treat the return value from camel_charset_locale_name() as aJeffrey Stedfast2001-07-205-62/+79
| | | | | | | | | | | | | | | | | | 2001-07-19 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Modified to treat the return value from camel_charset_locale_name() as a const char*. * camel-sasl-digest-md5.c (digest_response): Modified to treat the return value from camel_charset_locale_name() as a const char*. * camel-charset-map.c (camel_charset_locale_name): Modify to return const char* by returning the static locale_charset which is created inside of camel_charset_map_init(). (camel_charset_map_init): Find the locale charset here and set the static variable. svn path=/trunk/; revision=11245
* In camel:Peter Williams2001-07-203-29/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-19 Peter Williams <peterw@ximian.com> Policy change: NULL url's are no longer allowed in CamelFolderInfos. They used to signify that the folder was, in IMAP jargon, NoSelect; now the same effect is achieved by adding a "noselect=yes" parameter to the end of the URL. As far as I know, IMAP is the only affected provider. * providers/imap/camel-imap-store.c (delete_folder): New function. Implement folder deletion. (camel_imap_store_class_init): Set the delete_folder class function here. (get_folder_status): New function. Utility wrapper around the STATUS command. (create_folder): If the parent folder is NoSelect but is empty, delete it and recreate it as a a subfolder-containing folder. If it is NoSelect but contains messages, set an exception. (parse_list_response_as_folder_info): Always set the FolderInfo's URL, but add a NoSelect parameter if it isn't selectable. (get_folder_info_online): Change logic of removing the namespace to reflect URL change. Same for logic of checking unread counts. (get_folder_info_online): Use get_folder_status to simplify this. * camel-store.c (camel_folder_info_build): When creating dummy parents, copy the child's URL and set the NoSelect parameter. In mail: 2001-07-19 Peter Williams <peterw@ximian.com> Track the NoSelect changes in Camel. * mail-callbacks.c (create_folders): We don't need to check if the URL is NULL or not anymore. * component-factory.c (create_noselect_control): New function. Create a dummy control for folders that can't contain messages (ie \NoSelect) (create_view): If the URI says the folder is noselect, make a dummy control. FIXME: still should merge in the global UI elements. (xfer_folder): Don't allow the operation if the destination is NoSelect. (destination_folder_handle_motion): Ditto. (destination_folder_handle_drop): Ditto. svn path=/trunk/; revision=11237
* No need for `acharset' anymore. (check_html_charset): Return a const char*Jeffrey Stedfast2001-07-202-13/+17
| | | | | | | | | | | | 2001-07-19 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): No need for `acharset' anymore. (check_html_charset): Return a const char* and also use camel_charset_get_iconv_friendly_name() internally. svn path=/trunk/; revision=11236
* Remove my iso8859-1 -> iso-8859-1 hack and useJeffrey Stedfast2001-07-205-36/+156
| | | | | | | | | | | | | | | | | | | | 2001-07-19 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (rfc2047_decode_word): Remove my iso8859-1 -> iso-8859-1 hack and use camel_charset_get_iconv_friendly_name() instead. (rfc2184_decode): Use camel_charset_get_iconv_friendly_name() * camel.c (camel_init): Call camel_charset_map_init(). * camel-charset-map.c (camel_charset_map_init): New function to initialize the charset-equivalent lookup table. To be called by camel_init(). (camel_charset_get_iconv_friendly_name): New function to try and convert a charset into something that iconv is more likely to accept. svn path=/trunk/; revision=11235
* Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's request.Peter Williams2001-07-192-67/+17
| | | | | | | | | 2001-07-19 Peter Williams <peterw@ximian.com> * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's request. svn path=/trunk/; revision=11226
* Clean up some exception misusage.Peter Williams2001-07-186-20/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use CAMEL_VTRASH_NAME.Jeffrey Stedfast2001-07-184-8/+15
| | | | | | | | | | 2001-07-17 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (init_trash): Use CAMEL_VTRASH_NAME. * camel-vtrash-folder.h: #define CAMEL_VTRASH_NAME svn path=/trunk/; revision=11158
* Given: 4 EXISTS 1 EXPUNGE We have to pass 3, not 4 toDan Winship2001-07-172-0/+16
| | | | | | | | | | | * 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
* If the message info for an expunged message is NULL, then just break out -Jeffrey Stedfast2001-07-152-0/+13
| | | | | | | | | | | 2001-07-14 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): If the message info for an expunged message is NULL, then just break out - maybe a message was expunged that we were never notified even existed? svn path=/trunk/; revision=11106
* Added a hack to convert charsets in the format iso8859-1 to iso-8859-1Jeffrey Stedfast2001-07-142-25/+43
| | | | | | | | | | | | 2001-07-13 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (rfc2047_decode_word): Added a hack to convert charsets in the format iso8859-1 to iso-8859-1 because it seems to be more iconv friendly. It has been reported that on some systems, iconv doesn't know about iso8859-1 while it *does* know about iso-8859-1. See bug #4530. svn path=/trunk/; revision=11094
* Let people install as non-root, but give them a bigass warning so they'rePeter Williams2001-07-143-4/+48
| | | | | | | | | | | | | | | | 2001-07-13 Peter Williams <peterw@ximian.com> * Makefile.am (install-exec-local): Let people install as non-root, but give them a bigass warning so they're not allowed to complain when it doesn't work right. * camel-remote-store.c (sync_remote_folder): New function: hash table callback. (remote_disconnect): If cleanly disconnecting, sync our folders. Fixes deadlocks on exit (folders syncing after store disconnects) and also makes sense. svn path=/trunk/; revision=11090
* We now use a structure as the bucket data rather than just a cache levelJeffrey Stedfast2001-07-136-32/+106
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-13 Jeffrey Stedfast <fejj@ximian.com> * camel-uid-cache.c (camel_uid_cache_new): We now use a structure as the bucket data rather than just a cache level so set the save state to TRUE. (maybe_write_uid): We only save the uid if the cache levels are the same *and* if the save state is TRUE. (free_uid): Free the state value. (camel_uid_cache_get_new_uids): New uids that get added to the cache start with a save state of FALSE. (camel_uid_cache_save_uid): Set the save state of the uid to TRUE. What should we do if the uid isn't already in the cache? Currently I make it add the uid, but maybe it shouldn't? * providers/imap/camel-imap-folder.c (imap_filter_timeout): Update to reflect CamelFilterDriver API changes. * camel-filter-driver.c (camel_filter_driver_filter_folder): Take a cache argument so we can tell the cache whether or not the uid should be saved (meaning we have successfully filtered it). svn path=/trunk/; revision=11084
* Okay, I've decided that that user is just on crack. We don't want to allowJeffrey Stedfast2001-07-132-8/+12
| | | | | | | | | | | | | | 2001-07-12 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Okay, I've decided that that user is just on crack. We don't want to allow filtering of deleted messages or we could get some unexpected behavior. (do_move): Oops. My last fix needs to be after the if-statement, not inside it. (do_copy): And here too. svn path=/trunk/; revision=11068
* Okay, I've decided that that user is just on crack. We don't want to allowJeffrey Stedfast2001-07-132-4/+10
| | | | | | | | | | | 2001-07-12 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Okay, I've decided that that user is just on crack. We don't want to allow filtering of deleted messages or we could get some unexpected behavior. svn path=/trunk/; revision=11048
* Only set p->copied and p->deleted if the messages are copied without anJeffrey Stedfast2001-07-132-7/+25
| | | | | | | | | | | | | | | | | | 2001-07-12 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (do_move): Only set p->copied and p->deleted if the messages are copied without an exception. (do_copy): Same - but obviously we don't set the p->deleted here at all. (camel_filter_driver_filter_message): Since users complained that they couldn't filter deleted messages for "safe keeping" (WTF? safe keeping? why were they deleted in the first place then??), I have taken out the code that optimized filtering by not allowing deleted messages to be filtered. This fixes bug #4473. Note: Users have a warped sense of logic. svn path=/trunk/; revision=11047
* Removed. (check_html_charset): Replaced with this.Not Zed2001-07-128-942/+1017
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-12 Not Zed <NotZed@Ximian.com> * camel-mime-part-utils.c (extract_metatag_charset): Removed. (check_html_charset): Replaced with this. (simple_data_wrapper_construct_from_parser): Call check_html_charset if we dont have a charset on the content-type, and we have text/html data. (check_html_charset): We also need to do qp/base64 decoding ourselves, sigh. * camel-mime-utils.c (html_meta_param_list_decode): Removed. This was very wrong, the rules for mail headers vastly different from rules for decoding html elements. (rfc2184_decode): Move the malloc inside the iconv_open worked, otherwise we have a memleak. * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init, run, reset): Changed to use camelhtmlparser, and fixed a tiny memleak. * camel-html-parser.c: Made the html indexer tokeniser re-usable. ONLY TO BE USED INTERNAL TO CAMEL HOWEVER. (tokenise_step): Slight fix to non-quoted values. svn path=/trunk/; revision=11028
* Removed some code i wasn't supposed to commit.Not Zed2001-07-123-7/+25
| | | | | | | | | | | | | | | 2001-07-12 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): Removed some code i wasn't supposed to commit. * providers/local/camel-local-summary.c (local_summary_add): Only set info->size if it is not zero. (local_summary_add): If we dont get a size from the info passed in, calculate it using a null stream write. Should do #4392. svn path=/trunk/; revision=11025
* New function to extract a meta-tag charset value if it exists.Jeffrey Stedfast2001-07-124-26/+119
| | | | | | | | | | | | | | | | | | 2001-07-11 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part-utils.c (extract_metatag_charset): New function to extract a meta-tag charset value if it exists. (simple_data_wrapper_construct_from_parser): Along the same lines as the code I previously ripped out, but this time use the mime-parser's seek ability to help us along. Currently I read up to a 2k buffer size - this is probably overkill, 1k is probably plenty. * camel-mime-utils.c (html_meta_param_list_decode): When we get to an `=', we must skip past it before trying to grab the param value. duh. svn path=/trunk/; revision=11021
* Ripped out my code since it was never being used since the mime parser isJeffrey Stedfast2001-07-123-124/+77
| | | | | | | | | | | | 2001-07-11 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): Ripped out my code since it was never being used since the mime parser is not using a seekable stream (ever?) which pretty much means my code needs to be done someplace else. svn path=/trunk/; revision=11016
* Run the filter in its own thread to prevent locking issues.Peter Williams2001-07-122-12/+75
| | | | | | | | | | | 2001-07-11 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (camel_imap_folder_changed): Run the filter in its own thread to prevent locking issues. (imap_filter_timeout): New function that does the filtering called as a CamelSession timeout. svn path=/trunk/; revision=11011
* Create the messageinfo itself, so we can properly set the size.Not Zed2001-07-117-56/+129
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-11 Not Zed <NotZed@Ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): Create the messageinfo itself, so we can properly set the size. * camel-movemail.c (camel_movemail_solaris): Write out the from line between each message. 2001-07-10 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-summary.c (local_summary_add): Copy the size across from the source message info if supplied. * camel-stream-null.c: Added a 'written' member which keeps track of how much has been written to the stream. * camel-movemail.c (camel_movemail): If we have BROKEN_SPOOL defined, then use the solaris movemail to quote from lines that sendmail didn't. (camel_movemail_solaris): Compile this in if BROKEN_SPOOL defined. svn path=/trunk/; revision=10989
* New function to parse an HTML meta-tag.Jeffrey Stedfast2001-07-117-233/+365
| | | | | | | | | | | | | | | | | 2001-07-10 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (html_meta_param_list_decode): New function to parse an HTML meta-tag. * camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser): If the Content-Type did not contain a charset parameter and it's also a text/html part, we have 1 last place to look - in the META html tags. *sigh* * camel-mime-message.c (camel_mime_message_get_source): s/gint/unsigned since that's what it should be. svn path=/trunk/; revision=10976
* Forget the passphrase if the user has set that option. (pgp_clearsign):Jeffrey Stedfast2001-07-103-2/+27
| | | | | | | | | | | | | 2001-07-09 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_sign): Forget the passphrase if the user has set that option. (pgp_clearsign): Same. (pgp_encrypt): And here... (pgp_decrypt): And finally here. (camel_pgp_context_new): Take a `remember' argument. svn path=/trunk/; revision=10932
* Oops, e_poolv_set free's it for us, so dont double-free here.Not Zed2001-07-092-1/+5
| | | | | | | | | 2001-07-09 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-summary.c (maildir_summary_sync): Oops, e_poolv_set free's it for us, so dont double-free here. svn path=/trunk/; revision=10902
* Changed so we dont have the list changing under us, just going to the nextNot Zed2001-07-092-2/+11
| | | | | | | | | | | | 2001-07-06 Not Zed <NotZed@Ximian.com> * camel-vee-folder.c (camel_vee_folder_finalise): Changed so we dont have the list changing under us, just going to the next node before we call a function that might change the list is potentially dangerous (slight mod of peters fix). Hmm, i think it would've double-unref'd it too(?) svn path=/trunk/; revision=10900
* openssl_table is gone. we now store/get the stream from the SSL_CTX'sChris Toshok2001-07-092-46/+39
| | | | | | | | | | | | | | | | | | 2001-07-08 Chris Toshok <toshok@ximian.com> * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): openssl_table is gone. we now store/get the stream from the SSL_CTX's app_data. (stream_read): rework the non-blocking case to account for SSL possibly buffering data (in which case select will block even though data is ready to be read), and to account for FreeBSD's strange behavior of returning -1/EAGAIN even though select said the fd was ready to be read. (ssl_verify): openssl_table is gone. (open_ssl_connection): set the SSL_CTX's app_data to be the stream, remove the openssl_table code. svn path=/trunk/; revision=10894
* Don't allow in to be NULL, so instead of doing if (in == NULL) return;,Jeffrey Stedfast2001-07-072-3/+6
| | | | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_encode_param): Don't allow in to be NULL, so instead of doing if (in == NULL) return;, make it a g_return_val_if_fail and later we can make it an assert or something. svn path=/trunk/; revision=10868
* Fixes bug #1138.Jeffrey Stedfast2001-07-072-0/+12
| | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-maildir-store.c (get_inbox): Fixes bug #1138. svn path=/trunk/; revision=10860
* Make the `day-of-month' digit take up 2 chars by using "%2d". Fixes bugJeffrey Stedfast2001-07-072-1/+6
| | | | | | | | | | | 2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-summary.c (camel_mbox_summary_build_from): Make the `day-of-month' digit take up 2 chars by using "%2d". Fixes bug #3989 for lame mailers like Pine. svn path=/trunk/; revision=10858
* Set the pipe fd's to nonblocking.Jeffrey Stedfast2001-07-073-2/+11
| | | | | | | | | 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
* Make sure that after the finalization event has happened and thePeter Williams2001-07-062-0/+14
| | | | | | | | | | 2001-07-06 Peter Williams <peterw@ximian.com> * camel-object.c (camel_object_unref): Make sure that after the finalization event has happened and the finalization functions have been called that the object still has a zero refcount. svn path=/trunk/; revision=10844
* Add locking to camel_nntp_get_grouplist_from_server().Joe Shaw2001-07-065-2/+53
| | | | | | | | | | | | | | | | | | | | | | 2001-07-06 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-grouplist.c: Add locking to camel_nntp_get_grouplist_from_server(). * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_EXTENSIONS_SUPPORTED (202). * providers/nntp/camel-nntp-store.c (camel_nntp_store_get_extensions): Check for both NNTP_LIST_FOLLOWS and NNTP_EXTENSIONS_SUPPORTED from a LIST EXTENSIONS request. (Dunno if NNTP_LIST_FOLLOWS ever comes out of this, but that's what was already there...) Also, put some locking around it. (finalize): e_mutex_destroy() the command lock (camel_nntp_store_init): e_mutex_new() the command lock. * providers/nntp/camel-nntp-store.h: Add locking macros. svn path=/trunk/; revision=10838
* Added an assert to make sure that `mi' isn't NULL.Jeffrey Stedfast2001-07-063-9/+28
| | | | | | | | | | | | | | 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
* Send the --no-auto-key-retrieve argument to gpg if we are in offline modeJeffrey Stedfast2001-07-062-5/+8
| | | | | | | | | | | | 2001-07-05 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Send the --no-auto-key-retrieve argument to gpg if we are in offline mode so that we don't have to worry about gpg hanging if it can't connect to the key servers, because now it shouldn't even attempt to. svn path=/trunk/; revision=10831
* Send the --no-auto-key-retrieve argument to gpg so that we don't have toJeffrey Stedfast2001-07-062-0/+8
| | | | | | | | | | | 2001-07-05 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Send the --no-auto-key-retrieve argument to gpg so that we don't have to worry about gpg hanging if it can't connect to the key servers, because now it shouldn't even attempt to. svn path=/trunk/; revision=10827
* use X509_STORE_CTX_get_ex_data to get at the SSL* - don't use theChris Toshok2001-07-062-10/+36
| | | | | | | | | | | | | | | | | | 2001-07-05 Chris Toshok <toshok@ximian.com> * camel-tcp-stream-openssl.c (ssl_verify): use X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the X509_STORE_CTX to look up our stream, since it's not what we used to insert our stream into the hashtable. (open_ssl_connection): insert the stream into the hashtable before calling SSL_connect, as this can cause ssl_verify to be called, and we need to look up the stream there. remove the stream from the hashtable if there's an error connecting. (stream_connect): pass the CamelTcpStreamOpenSSL* to open_ssl_connection since it handles the hashtable stuff. remove hashtable stuff from here. svn path=/trunk/; revision=10819
* if source == dest, just no-op.Jeffrey Stedfast2001-07-062-1/+11
| | | | | | | | | 2001-07-05 Jeffrey Stedfast <fejj@ximian.com> * camel-folder.c (camel_folder_copy_messages_to): if source == dest, just no-op. svn path=/trunk/; revision=10817
* Move this before the camel_vee_folder_remove_folder because that functionPeter Williams2001-07-064-30/+32
| | | | | | | | | | | | | | | | | | | | 2001-07-05 Peter Williams <peterw@ximian.com> * camel-vee-folder.c (camel_vee_folder_finalise): Move this before the camel_vee_folder_remove_folder because that function modifies p->folders messing up our iteration. (camel_vee_folder_finalise): Don't unref our summary; camel-folder now does this. * camel-object.h (CamelObject): Add a 'destroying' flag to CamelObject. * camel-object.c (obj_init): Clear 'destroying'. (camel_object_unref): If 'destroying' then do not send the finalize event and do not call finalize functions. Otherwise, set destroying so just in case we get refed (eg event code) we don't get doubly finalized. svn path=/trunk/; revision=10811
* (camel_message_info_dup_to): Assign the to->strings from theMichael Zucci2001-07-052-1/+4
| | | | | | | e_poolv_cpy() call, since it may allocaote a new poolv if the lengths do not match. svn path=/trunk/; revision=10790
* Fix the assertion slightly, if we have a little bit of input the outputNot Zed2001-07-052-2/+6
| | | | | | | | | | 2001-07-05 Not Zed <NotZed@Ximian.com> * camel-mime-filter-basic.c (filter): Fix the assertion slightly, if we have a little bit of input the output size could be larger, since we store upto 3 chars in the state. svn path=/trunk/; revision=10786
* When indexing a new record, create a pseudo word 'ibexindexed' so we canNot Zed2001-07-054-22/+41
| | | | | | | | | | | | | | | | | | | | | | | 2001-07-05 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): When indexing a new record, create a pseudo word 'ibexindexed' so we can always tell that a message has already been idnexed, even if it contains no words of its own. Things like maildir use this check to see if its already been processed, and it matters if it is incorrect in this case (not just wasted cycles). (camel_folder_summary_info_new_from_parser): And same here. * providers/local/camel-maildir-summary.c (maildir_summary_sync): Changed the logicfor epoolv code to be different, we dont need to update hash references or any tricky stuff. (maildir_summary_check): Samehere. * camel-folder-summary.h: Removed include of e-memory.h. svn path=/trunk/; revision=10785
* Added NNTP_NO_PERMISSION (502) to the list of response codes.Joe Shaw2001-07-043-1/+16
| | | | | | | | | | | | | 2001-07-03 Joe Shaw <joe@ximian.com> * providers/nntp/camel-nntp-resp-codes.h: Added NNTP_NO_PERMISSION (502) to the list of response codes. * providers/nntp/camel-nntp-store.c (nntp_store_connect): If we receive a NNTP_NO_PERMISSION, don't get into an infinite loop trying to reconnect, get extensions, etc. Just give up and return FALSE. svn path=/trunk/; revision=10769
* Doh. Don't remove things from the hash table while foreach'ing it. (AndDan Winship2001-07-033-23/+63
| | | | | | | | | | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_clear): Doh. Don't remove things from the hash table while foreach'ing it. (And can't use foreach_remove either because we have to remove them in a weird order). Fixes #3618. * providers/imap/camel-imap-folder.c (imap_get_message): If the server returns OK from the FETCH BODY, but there's no parseable BODY response, it's probably because there's an UN-parseable BODY response, implying the message is badly formatted, MIMEwise. In that case, fall back to fetching the message as a single part. svn path=/trunk/; revision=10748
* Implemented nntp_folder_search_by_expression and nntp_folder_search_free.Sam Creasey2001-07-039-33/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-07-02 Sam Creasey <sammy@oh.verio.com> * providers/nntp/camel-nntp-folder.c: Implemented nntp_folder_search_by_expression and nntp_folder_search_free. Basic search functionality e.g. unread marking now works for NNTP folders. * camel_filter_search.c (get_size): Added get-size sexp directive to get the size of a message for filters. * providers/nntp/camel-nntp-folder.c (camel_nntp_folder_new): Always check with the NNTP server after summary load -- this function now always expires old summary entries and syncs with the news server. * providers/nntp/camel-nntp-utils.c (camel_nntp_get_headers): Only fetch headers for articles not already logged in the summary file. * providers/nntp/camel-nntp-grouplist.c (camel_nntp_get_grouplist_from_*): change from g_list_append() to g_list_prepend() + g_list_reverse. Traversing 40,000 element linked lists sucks. * providers/nntp/camel-nntp-store.c (camel_nntp_command): Should the NNTP connection die with CAMEL_EXCEPTION_SERVICE_NOT_CONNECTED, make a single retry attempt. Timing out the NNTP link is less painful this way. svn path=/trunk/; revision=10716
* Add comment noting that Camel actually exists now :-)Peter Williams2001-07-032-0/+11
| | | | | | | | | 2001-07-02 Peter Williams <peterw@ximian.com> * README (Introduction): Add comment noting that Camel actually exists now :-) svn path=/trunk/; revision=10696
* new method to get an application-initialized filter driver.Dan Winship2001-07-0211-38/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-session.c (camel_session_get_filter_driver): new method to get an application-initialized filter driver. * camel-filter-driver.c (camel_filter_driver_new): Remove the get_folder function and data args from here... (camel_filter_driver_set_folder_func): ...and add this function to set/change them. * providers/imap/camel-imap-folder.c (camel_imap_folder_new): If this folder is INBOX and we're filtering INBOX, set a flag on the folder for later. (imap_update_summary): Add another argument (GPtrArray *recents), and if it's non-NULL, add the uids of any \Recent new messages to it. (camel_imap_folder_changed): If doing filtering in this folder, create a recents array and pass it to imap_update_summary. Then get a filter driver and use it to filter the recent messages. * providers/imap/camel-imap-summary.h: * providers/imap/camel-imap-utils.c (imap_parse_flag_list): Add support for the \Recent flag. * providers/imap/camel-imap-provider.c (imap_conf_entries): enable the "filter" option. * camel-types.h: add CamelFilterDriver typedef here svn path=/trunk/; revision=10681
* properly return error if we can't create pipes.Not Zed2001-07-022-1/+4
| | | | | | | | | 2001-07-02 Not Zed <NotZed@Ximian.com> * camel-lock-client.c (camel_lock_helper_init): properly return error if we can't create pipes. svn path=/trunk/; revision=10677
* re-enable html indexing.Not Zed2001-07-023-172/+843
| | | | | | | | | | | | 2001-07-02 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (summary_build_content_info): re-enable html indexing. * camel-mime-filter-html.c: Completely re-implemented using a custom parser. svn path=/trunk/; revision=10676
* Change a camel_exception_clear to camel_exception_init to fix aDan Winship2001-07-022-1/+6
| | | | | | | * tests/misc/url.c (main): Change a camel_exception_clear to camel_exception_init to fix a sometimes-crash svn path=/trunk/; revision=10675
* Added Originator: header as a header to look for when looking for theJeffrey Stedfast2001-06-302-0/+4
| | | | | | | | | 2001-06-29 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Added Originator: header as a header to look for when looking for the mailing list. svn path=/trunk/; revision=10603
* Build the test-crlf test program.Jeffrey Stedfast2001-06-308-25/+255
| | | | | | | | | | | | | | 2001-06-29 Jeffrey Stedfast <fejj@ximian.com> * tests/mime-filter/Makefile.am: Build the test-crlf test program. * tests/mime-filter/test-crlf.c: New test suite for the crlf filter. * camel-mime-filter-crlf.c (filter): Fixed to correctly encode and decode dots. svn path=/trunk/; revision=10602
* sshJose Maria Celorio2001-06-291-0/+6
| | | | svn path=/trunk/; revision=10592
* Add a CamelMimeFilterStripHeader that removes a header from mime output. UsedPeter Williams2001-06-2922-3/+524
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by sendmail to strip the BCC from the email while still sending to the BCC recipients. camel: 2001-06-28 Peter Williams <peterw@ximian.com> * camel-mime-filter-stripheader.c: New file. Filter that strips a header from mime output. * camel-mime-filter-stripheader.h: New file. Header for the above. * providers/smtp/camel-smtp-transport.c (smtp_data): Use the stripheader filter to remove the "Bcc" header. * Makefile.am: Add the stripheader files. * tests/lib/Makefile.am (INCLUDES): Get this to compile again. * tests/mime-filter/test-stripheader.c: New file. Test suite for the CamelMimeFilterStripHeader. * tests/mime-filter/Makefile.am: New test section: mime filters. mail: 2001-06-28 Peter Williams <peterw@ximian.com> * mail-ops.c (mail_send_message): Revert fejj's Bcc header removal; this unsets the BCC recipients and so doesn't send to the Bcc'd people at all. svn path=/trunk/; revision=10576
* Fix a memory leak. Also if the decoded value is NULL, that means it wasn'tJeffrey Stedfast2001-06-292-32/+114
| | | | | | | | | | | | 2001-06-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_param_list): Fix a memory leak. Also if the decoded value is NULL, that means it wasn't encoded so we don't want to toss the old value. (header_param_list_format_append): Correctly wrap long parameter values according to rfc2184. svn path=/trunk/; revision=10566
* If the folder is frozen, don't refresh, just record that we need to do itDan Winship2001-06-295-7/+84
| | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (imap_refresh_info): If the folder is frozen, don't refresh, just record that we need to do it later. (imap_append_online): If the APPEND doesn't trigger an immediate EXISTS response (because the folder isn't the selected folder, or because the server doesn't do that until the next command), call imap_refresh_info on the folder. (imap_copy_online): Likewise. (Replacing the unconditional NOOP that was there before, which absolutely killed filter performance by forcing the IMAP provider to switch back and forth between folders after every copy or move.) (imap_thaw): If the folder needs a refresh, do it. * camel-folder.c (camel_folder_is_frozen): New method svn path=/trunk/; revision=10565
* Initialize the private send_lock. (camel_transport_finalize): Free theJeffrey Stedfast2001-06-284-4/+70
| | | | | | | | | | | | | | | 2001-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-transport.c (camel_transport_init): Initialize the private send_lock. (camel_transport_finalize): Free the private send_lock. (camel_transport_get_type): Set the init and finalize functions. (camel_transport_send): Lock the transport. (camel_transport_send_to): Same. * camel-private.h: Add CAMEL_TRANSPORT_(UN)LOCK macros. svn path=/trunk/; revision=10547
* Updated to match the current API.Jeffrey Stedfast2001-06-283-3/+10
| | | | | | | | | | | 2001-06-27 Jeffrey Stedfast <fejj@ximian.com> * tests/folder/test9.c (main): Updated to match the current API. * tests/folder/test3.c: #include <gtk/gtk.h> since we use gtk_init(). svn path=/trunk/; revision=10546
* Use the new header_address_fold.Jeffrey Stedfast2001-06-284-83/+53
| | | | | | | | | | | | | | | | | | 2001-06-27 Jeffrey Stedfast <fejj@ximian.com> * camel-internet-address.c (camel_internet_address_encode_address): Use the new header_address_fold. * camel-mime-utils.c: Removed some old #if 0'd code of mine. (rfc2047_encode_word): If enclen is 0, don't write an encoded word token (=?iso-8859-7?Q??= would be an invalid token). (header_address_fold): New function to wrap address headers - header_fold() was force-wrapping rfc2047 encoded words which was making the test suite fail. The *real* solution, however, is to not create rfc2047 encoded words longer than 72 chars. svn path=/trunk/; revision=10545
* Since we want an error opening a folder to result in the message beingJeffrey Stedfast2001-06-272-5/+15
| | | | | | | | | | | 2001-06-26 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (open_folder): Since we want an error opening a folder to result in the message being copied to Inbox (assuming no other filters get a chance to `move` it), don't record any exceptions that may occur in this function. svn path=/trunk/; revision=10515
* lock the cache around accessesDan Winship2001-06-273-6/+25
| | | | | | | | | | | | | * providers/imap/camel-imap-folder.c (camel_imap_folder_selected, imap_append_offline, imap_append_online, camel_imap_folder_changed): lock the cache around accesses * providers/imap/camel-imap-store.c (get_folder_online): ref the newly-created folder (as current_folder) before calling camel_imap_folder_selected, in case that needs to do something that causes another folder to become current... svn path=/trunk/; revision=10509
* D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/Dan Winship2001-06-271-1/+1
| | | | | | | * camel-service.c (camel_service_get_url): D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/ svn path=/trunk/; revision=10505
* constify argsDan Winship2001-06-271-1/+2
| | | | | | * camel-url.c (camel_url_encode): constify args svn path=/trunk/; revision=10503
* constify argsDan Winship2001-06-272-1/+6
| | | | | | * camel-url.c (camel_url_encode): constify args svn path=/trunk/; revision=10501
* g_strdup() the message source here or we will have problems later when weJeffrey Stedfast2001-06-264-50/+58
| | | | | | | | | | 2001-06-25 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-search.c (get_source): g_strdup() the message source here or we will have problems later when we go to free the result ;-) svn path=/trunk/; revision=10498
* Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid aDan Winship2001-06-253-10/+17
| | | | | | | | | | | | | * 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
* Update the copyrights, replacing Helix Code with Ximian andEttore Perazzoli2001-06-23184-325/+325
| | | | | | helixcode.com with ximian.com all over the place. svn path=/trunk/; revision=10440
* New function that decides if 2 word types are mergeable. An atom and aJeffrey Stedfast2001-06-223-30/+59
| | | | | | | | | | | | | | | | | | | | 2001-06-21 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (word_types_compatable): New function that decides if 2 word types are mergeable. An atom and a qstring are mergeable; 2 qstrings are mergeable; and 2 encoded words are mergeable. (header_encode_phrase_merge_words): If 2 words are merged, the new word type is the MAX of the combined types. This means that if we merge a qstring and an atom, the resulting word type is a qstring. * camel-internet-address.c (internet_format): s/g_string_sprintfa/g_string_append since this makes more sense in this particular case. (internet_encode): Same here. svn path=/trunk/; revision=10377
* Use camel_address_length() rather than casting and accessing data members.Jeffrey Stedfast2001-06-222-3/+9
| | | | | | | | | | 2001-06-21 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_send): Use camel_address_length() rather than casting and accessing data members. svn path=/trunk/; revision=10365
* If the first char of the mailing-list name is '<', chop it off to makeJeffrey Stedfast2001-06-212-6/+19
| | | | | | | | | | 2001-06-20 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_raw_check_mailing_list): If the first char of the mailing-list name is '<', chop it off to make Ettore happy. Fixes bug #2153. svn path=/trunk/; revision=10347
* updated .cvsignore to ignore camel-lock-helperJeffrey Stedfast2001-06-201-0/+1
| | | | svn path=/trunk/; revision=10297
* Fixed a bug when not running setuid it wouldn't unlock.Not Zed2001-06-194-127/+40
| | | | | | | | | | | | 2001-06-19 Not Zed <NotZed@Ximian.com> * camel-lock-helper.c (unlock_id): Fixed a bug when not running setuid it wouldn't unlock. * camel-movemail.c (camel_movemail): use new locking daemon, also return an error code. svn path=/trunk/; revision=10287
* Note: Except for the info_free(), the NULL checks are g_return's. I feltJeffrey Stedfast2001-06-193-23/+84
| | | | | | | | | | | | | | | | | | | | | | | 2001-06-18 Jeffrey Stedfast <fejj@ximian.com> Note: Except for the info_free(), the NULL checks are g_return's. I felt that since g_free() handles NULL that our _free() functions should also. * camel-folder.c (camel_folder_change_info_free): Check to make sure that the info pointer isn't NULL. (camel_folder_change_info_change_uid): Same. (camel_folder_change_info_changed): Same. (camel_folder_change_info_remove_uid): Same. (camel_folder_change_info_add_uid): Same. (camel_folder_change_info_build_diff): Same. (camel_folder_change_info_cat): Same. (camel_folder_change_info_add_source): Same. (camel_folder_change_info_add_source_list): Same. (camel_folder_change_info_add_update): Same. (camel_folder_change_info_add_update_list): Same. svn path=/trunk/; revision=10280
* Remove DB3_LDADDDan Winship2001-06-196-6/+6
| | | | | | | | | | * tests/stream/Makefile.am (LDADD): * tests/smime/Makefile.am (LDADD): * tests/misc/Makefile.am (LDADD): * tests/message/Makefile.am (LDADD): * tests/folder/Makefile.am (LDADD): Remove DB3_LDADD svn path=/trunk/; revision=10272
* Set camel-lock-help setgid or setuid as neededDan Winship2001-06-192-2/+15
| | | | | | | * Makefile.am (install-exec-local): Set camel-lock-help setgid or setuid as needed svn path=/trunk/; revision=10267
* Only create a missing uid if we have indexing turned on.Not Zed2001-06-1815-53/+1145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-18 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_parser): Only create a missing uid if we have indexing turned on. * camel-lock-helper.c (setup_process): Function to setup process/sanity/security checks. Change to the real uid as soon as we can. (lock_path): First try to lock as the real uid, if that fails, try the root uid. (unlock_id): Unlock as the uid we created the lock as. * Makefile.am (INCLUDES): Added -DCAMEL_SBINDIR for lock helper location. * providers/local/camel-spool-folder.c (spool_lock): Implemented, using lock helper locking. Need to work out if the locking requires a root created lock? (spool_unlock): Likewise. 2001-06-15 Not Zed <NotZed@Ximian.com> * camel-lock-helper.c: Setuid Lock helper process. Creates and manages .locks, keeping them active, removing them, etc. What real perms it needs is a little system dependent. 2001-06-14 Not Zed <NotZed@Ximian.com> * providers/local/camel-maildir-store.c (get_folder_info): Implement. (scan_dir): Does the work of scanning for maildir directories. 2001-06-13 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-store.c (get_folder_info): Implemented, just returns a hardcoded INBOX folder. (free_folder_info): implemented, free's the 1 possible level of folder info. * providers/local/camel-spool-folder.c (camel_spool_folder_construct): Set the real unread message count on the folder_created thing. svn path=/trunk/; revision=10261
* Return the largest real UID in the cache (as an integer). Eventually to beDan Winship2001-06-163-0/+27
| | | | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_max_uid): Return the largest real UID in the cache (as an integer). Eventually to be used for an optimization in the new-message fetch code. (cache_put): Keep track of max_uid. svn path=/trunk/; revision=10254
* Added Mailing-List header regex so that we can do mlist magic on thatJeffrey Stedfast2001-06-152-0/+6
| | | | | | | | | 2001-06-14 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c: Added Mailing-List header regex so that we can do mlist magic on that header. svn path=/trunk/; revision=10242
* Properly handle correct and incorrect (for the common case, ie Outlook andJeffrey Stedfast2001-06-151-0/+17
| | | | | | | | | | | | | | | | | | | | | | | 2001-05-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_decode_param): Properly handle correct and incorrect (for the common case, ie Outlook and Netscape/Mozilla) rfc2184 values. (header_decode_rfc2184_param): Get the param name and see if we should expect a rfc2184 parameter value. (rfc2184_decode): Decode a rfc2184 value. (hex_decode): hex decode a string. (header_decode_param_list): Handle rfc2184 encoded parameters (ie parameters that have been split and perhaps encoded). (header_param_list_format_append): Encode the value before seeing if it will fit on the line. If the value does get encoded, be sure to put a '*' before the equal-sign. (header_encode_param): New function to rfc2184 encode a parameter value (maybe it should be renamed?) apparently with my last commit, I had also commit'd this but didn't realise it. svn path=/trunk/; revision=10241
* Don't try to format the Reply-To header - we don't want to wrap theJeffrey Stedfast2001-06-152-0/+6
| | | | | | | | | 2001-06-14 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (init_header_name_table): Don't try to format the Reply-To header - we don't want to wrap the reply-to address. svn path=/trunk/; revision=10231
* A new provider, for spool mailboxes. Mostly a cut and paste of the mboxNot Zed2001-06-1222-51/+2468
| | | | | | | | | | | | | | | | | | | | | | | | | 2001-06-12 Not Zed <NotZed@Ximian.com> * providers/local/camel-spool-*.[ch]: A new provider, for spool mailboxes. Mostly a cut and paste of the mbox code, but not a subclass CamelLocal*. Not tested a lot, doesn't lock yet, use with extreme caution. * tests/lib/folders.c (test_folder_message_ops): Added spool arg, spool folders can't be deleted, renamed, etc. (test_folder_basic): Same. * tests/folder/test2.c (main): Added checks for spool type. * tests/[message|stream|folder|misc|smime]/Makefile.am (LDADD): Added db3 flags, so make check compiles, doesn't run though. 2001-05-24 Not Zed <NotZed@Ximian.com> * providers/local/camel-local-provider.c (camel_provider_module_init): Added spool provider. svn path=/trunk/; revision=10198
* Add a separator between the service url and the folder name, if needed.Jon Trowbridge2001-06-082-1/+16
| | | | | | | | | 2001-06-07 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_folder): Add a separator between the service url and the folder name, if needed. svn path=/trunk/; revision=10153
* Added an argument, so that the original source URI of the mbox can beJon Trowbridge2001-06-083-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | 2001-06-07 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_mbox): Added an argument, so that the original source URI of the mbox can be passed in. This is needed because this function is called post-movemail, so we are never reading from the original mbox anymore. Without the original mbox URI, the X-Evolution-Source tag gets set incorrectly and filter-on-source will fail to work. (camel_filter_driver_filter_message): Also take an extra arg for the original source URI. It is the original URI, not the source URI, that is used for filtering and for setting the X-Evolution-Source tag. 2001-06-07 Jon Trowbridge <trow@ximian.com> * mail-ops.c (fetch_mail_fetch): Pass the original source URI to camel_filter_driver_filter_mbox. (mail_send_message): Pass NULL as the orginal source URI to camel_filter_driver_filter_message. svn path=/trunk/; revision=10152
* Don't fetch the UID and FLAGS of messages we don't know about yet, sinceDan Winship2001-06-062-30/+40
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_rescan): Don't fetch the UID and FLAGS of messages we don't know about yet, since they'll just get discarded. svn path=/trunk/; revision=10132
* Fix to not get into a recursive loop in get_type().Jeffrey Stedfast2001-06-034-41/+49
| | | | | | | | | | | 2001-06-01 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/pgp.c: Fix to not get into a recursive loop in get_type(). * tests/smime/pgp-mime.c: Same. svn path=/trunk/; revision=10102
* Numerous fixes to get it to compile.Jeffrey Stedfast2001-06-014-62/+383
| | | | | | | | 2001-05-31 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c: Numerous fixes to get it to compile. svn path=/trunk/; revision=10073
* Added camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,Jeffrey Stedfast2001-06-012-0/+7
| | | | | | | | | 2001-05-31 Jeffrey Stedfast <fejj@ximian.com> * camel.h: Added camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h, and camel-smime-utils.h svn path=/trunk/; revision=10067
* New virtual class for manipulating cryptographic message syntax messagesJeffrey Stedfast2001-06-019-939/+1291
| | | | | | | | | | | | | | | | | | 2001-05-31 Jeffrey Stedfast <fejj@ximian.com> * camel-cms-context.[c,h]: New virtual class for manipulating cryptographic message syntax messages (like S/MIME). * camel-smime-context.[c,h]: Modified to inherit from the CamelCMSContext class rather than the CamelCipherContext class. * camel-smime.[c,h]: Removed - just use camel-smime-context directly. * camel-smime-utils.[c,h]: New source files. Moved the 2 useful functions from camel-smime.[c,h] into here. svn path=/trunk/; revision=10065
* Redo the BUILD_MAP code to not depend on libunicode. Now it only generatesDan Winship2001-05-314-4091/+274
| | | | | | | | | | | | | | | | | | | * camel-charset-map.c: Redo the BUILD_MAP code to not depend on libunicode. Now it only generates a map of "popular" 8bit encodings. (It's not worthwhile to support obscure encodings, because any mailer that supports them will support UTF8 too. And Chinese and Japanese use mostly the same UTF8 characters so you need to decide between those encodings based on the locale or the charset of the message you're replying to or the input method you used. So this is sufficient for camel_charset_best's use.) * camel-charset-map-private.h: Regenerated. * camel.c (camel_shutdown): Move #ifdefs around to prevent a warning. svn path=/trunk/; revision=10055
* Fix an obvious typoDan Winship2001-05-301-1/+1
| | | | svn path=/trunk/; revision=10045
* Remove this evolutionary dead endDan Winship2001-05-3010-1689/+0
| | | | svn path=/trunk/; revision=10042
* Create a CamelDiscoDiary. (imap_disconnect_offline): And free it.Dan Winship2001-05-307-72/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Code for logging and replaying offline operations.Dan Winship2001-05-3010-75/+706
| | | | | | | | | | | | | | | | | | | | | | | | * camel-disco-diary.c: Code for logging and replaying offline operations. * camel-disco-store.c (disco_construct): Set disco->status here (where we can base it on the session's offline status) rather than at init time. (disco_connect): If we connect online and have a non-empty diary, switch to RESYNCING mode and replay the diary to the server. (disco_get_folder, disco_get_folder_info): Add _resyncing variants. * camel-disco-folder.c (disco_sync, disco_expunge_uids, disco_append_message, disco_copy_messages_to, disco_move_messages_to): Add _resyncing variants to switches. (disco_expunge_uids, disco_append_message, disco_copy_messages_to, disco_move_messages_to): Remove #ifdef'ed out diary code: let the provider do it. (disco_append_message): Redo the append methods to no longer return the UID, since we're no longer doing the logging from here. svn path=/trunk/; revision=10040
* Use g_strcasecmp() because some systems don't have strcasecmp(). Also,Jeffrey Stedfast2001-05-293-3/+10
| | | | | | | | | | 2001-05-28 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_set_param): Use g_strcasecmp() because some systems don't have strcasecmp(). Also, when removing a param, make sure to free the param->name too. svn path=/trunk/; revision=10030
* changelog entries for tests/ fixes committed yesterdayDan Winship2001-05-291-0/+20
| | | | svn path=/trunk/; revision=10029
* Fix an fd leakDan Winship2001-05-2819-646/+118
| | | | | | | | | | | | | | | | | | | | | | * tests/lib/messages.c (test_message_read_file): Fix an fd leak * tests/lib/session.c, tests/lib/session.h: a CamelSession subclass for the test programs. * tests/lib/Makefile.am: include session.[ch] * tests/folder/test*.c: Use a CamelTestSession from libcameltest instead of cut+pasting everywhere. * tests/misc/url.c (main): Update for a camel_url_new change at some point. * tests/*/.cvsignore: Add stuff. * camel-mime-utils.c (rfc2047_encode_word): Fix a silly ==/!= mixup. svn path=/trunk/; revision=10023
* Add a "need_rescan" flag saying if we want to rescan the entire folder forDan Winship2001-05-274-24/+66
| | | | | | | | | | | | | | | | | | | | | | * providers/imap/camel-imap-folder.c: Add a "need_rescan" flag saying if we want to rescan the entire folder for flag changes next time it's selected. (camel_imap_folder_init): Set need_rescan TRUE. (camel_imap_folder_selected): If need_rescan is TRUE, call imap_rescan. (imap_refresh_info): Only do a full rescan if need_rescan is TRUE. Otherwise just do a NOOP, making this a MUCH more lightweight operation. Also, don't call imap_rescan directly if the folder isn't selected, since that could end up causing the folder to be scanned *twice* (imap_rescan -> camel_imap_command -> camel_imap_folder_selected -> imap_rescan). (imap_rescan): Set need_rescan FALSE. (imap_sync_online): Don't NOOP if no changes were pushed: the caller will call refresh_info if it wants to poll for changes. Fixes evolution-mail doing lots of unnecessary extra work at quit time. svn path=/trunk/; revision=10010
* Oops. Use a strNcmp to make sure the response begins with a 334 code, notJeffrey Stedfast2001-05-262-1/+5
| | | | | | | | | | 2001-05-25 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_auth): Oops. Use a strNcmp to make sure the response begins with a 334 code, not a strcmp. Duh. svn path=/trunk/; revision=10004
* remove the summary info so we are not out-of-sync with the maildir folder.Jeffrey Stedfast2001-05-264-71/+100
| | | | | | | | | | | | | | | | 2001-05-25 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-maildir-folder.c (maildir_append_message): remove the summary info so we are not out-of-sync with the maildir folder. * providers/local/camel-mh-folder.c (mh_append_message): remove the summary info so we are not out-of-sync with the mh folder. * providers/local/camel-mbox-folder.c (mbox_append_message): remove the summary info so we are not out-of-sync with the mbox. svn path=/trunk/; revision=9996
* Oops, I spelled the get-default-db function name wrong.Jeffrey Stedfast2001-05-252-1/+7
| | | | | | | | | 2001-05-24 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c (camel_smime_context_new): Oops, I spelled the get-default-db function name wrong. svn path=/trunk/; revision=9980
* s/folder_deleted/folder_created - result of a bad copy/paste.Jeffrey Stedfast2001-05-242-1/+5
| | | | | | | | | | 2001-05-23 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-local-folder.c (camel_local_folder_construct): s/folder_deleted/folder_created - result of a bad copy/paste. svn path=/trunk/; revision=9957
* Optimize the match "" case.Jeffrey Stedfast2001-05-242-17/+35
| | | | | | | | | 2001-05-23 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-search.c (imap_body_contains): Optimize the match "" case. svn path=/trunk/; revision=9955
* Store the CamelFolderInfo tree that was returned fromJeffrey Stedfast2001-05-223-5/+17
| | | | | | | | | | | | | | 2001-05-21 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info_online): Store the CamelFolderInfo tree that was returned from camel_folder_info_build() in a new variable, 'tree', rather than 'fi' since we later use 'fi' when syncing folders. Not only does this fix a memory leak, but it also fixes the bug where the user would only see the last folder in the folder list and/or it's subfolders. svn path=/trunk/; revision=9911
* The service can be NULL here too, thanks to Wayne Davis for pointing thisJeffrey Stedfast2001-05-172-1/+3
| | | | | | | | | 2001-05-16 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (camel_session_forget_password): The service can be NULL here too, thanks to Wayne Davis for pointing this out. svn path=/trunk/; revision=9863
* We don't need to be passed the certdb path anymore.Jeffrey Stedfast2001-05-173-4/+8
| | | | | | | | | 2001-05-16 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c (camel_smime_context_new): We don't need to be passed the certdb path anymore. svn path=/trunk/; revision=9855
* New function to return an array of all headers.Dan Winship2001-05-174-2/+108
| | | | | | | | | | | * camel-medium.c (camel_medium_get_headers): New function to return an array of all headers. (camel_medium_free_headers): And free them. * camel-mime-part.c (get_headers, free_headers): Implement this for CamelMimePart. (Works for CamelMimeMessage too.) svn path=/trunk/; revision=9849
* Don't close or free (it wasn't allocated) the certdb.Jeffrey Stedfast2001-05-162-13/+11
| | | | | | | | | | | | 2001-05-15 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c (camel_smime_context_finalise): Don't close or free (it wasn't allocated) the certdb. (camel_smime_context_new): If we get a NULL certdb handle, then don't bother trying to create a new certdb handle since NSS_Init* should have done that. svn path=/trunk/; revision=9830
* Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link inJeffrey Stedfast2001-05-163-4/+7
| | | | | | | | | | 2001-05-15 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Don't use EXTRA_GNOME_*, use the new CAMEL_* variables so we don't link in tons of extra cruft that we don't need. svn path=/trunk/; revision=9821
* Added t the test suite - tests the S/MIME pkcs7 functions.Jeffrey Stedfast2001-05-163-2/+186
| | | | | | | | | 2001-05-15 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/pkcs7.c: Added t the test suite - tests the S/MIME pkcs7 functions. svn path=/trunk/; revision=9818
* Lots of fixes to get this to compile.Jeffrey Stedfast2001-05-152-4/+2
| | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c: Lots of fixes to get this to compile. svn path=/trunk/; revision=9806
* bah, just mod the pgp-context macro for camel_pgp_verify so that we don't ↵Jeffrey Stedfast2001-05-152-2/+2
| | | | | | have to pass in a useless value. svn path=/trunk/; revision=9805
* Lots of fixes to get this to almost compile. Still struggling with theJeffrey Stedfast2001-05-159-39/+95
| | | | | | | | | | | | | | | | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c: Lots of fixes to get this to almost compile. Still struggling with the fact that CERTCertDBHandle is an "incomplete type". *sigh*. * camel-smime.c (camel_smime_part_verify): Updated to pass in a hash argument to camel_smime_verify(). * camel-pgp-mime.c (camel_pgp_mime_part_verify): Update according to the changes in the context API. * camel-pgp-context.c (pgp_verify): Updated to take a CamelCipherHash argument. * camel-cipher-context.c (camel_cipher_verify): Now takes a hash argument since the S/MIME code needs this. svn path=/trunk/; revision=9804
* Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build.Jeffrey Stedfast2001-05-156-14/+568
| | | | | | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Add camel-smime-context.[c,h] and camel-smime.[c,h] to the build. * camel-smime.[c,h]: New source files for manipulating S/MIME message parts. svn path=/trunk/; revision=9799
* Replicate the semantics of the libunicode utf8 functions by returning NULLJon Trowbridge2001-05-155-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | 2001-05-14 Jon Trowbridge <trow@ximian.com> * camel-search-private.c (utf8_get): Replicate the semantics of the libunicode utf8 functions by returning NULL in the arg on invalid utf8. * camel-pgp-context.c (pgp_verify): Check for valid utf8, terminate loop if something looks wrong. * camel-mime-utils.c (header_encode_phrase_get_words): Properly check for invalid utf8. (header_encode_string): Properly check for invalid utf8. * camel-charset-map.c (camel_charset_step): Properly check for invalid utf8. 2001-05-14 Jon Trowbridge <trow@ximian.com> * e-html-utils.c (is_citation): Check for bad utf8. svn path=/trunk/; revision=9798
* Subclass CamelSession since we can no longer specify the passwd callbackJeffrey Stedfast2001-05-1512-89/+727
| | | | | | | | | | | | | | | | | | | | 2001-05-14 Jeffrey Stedfast <fejj@ximian.com> * tests/folder/test9.c: * tests/folder/test8.c: * tests/folder/test7.c: * tests/folder/test6.c: * tests/folder/test5.c: * tests/folder/test4.c: * tests/folder/test3.c: * tests/folder/test2.c: * tests/folder/test1.c: * tests/smime/pgp-mime.c: * tests/smime/pgp.c: Subclass CamelSession since we can no longer specify the passwd callback any other way and update code accordingly. svn path=/trunk/; revision=9796
* er, OptionSetJeffrey Stedfast2001-05-131-1/+1
| | | | svn path=/trunk/; revision=9785
* s/SSL_Enable/SSL_SetOptionJeffrey Stedfast2001-05-131-1/+1
| | | | svn path=/trunk/; revision=9784
* Decode Content-Location, either correctly or Netscape-generated-brokenly.Dan Winship2001-05-125-0/+64
| | | | | | | | | | | * camel-mime-utils.c (header_location_decode): Decode Content-Location, either correctly or Netscape-generated-brokenly. * camel-mime-part.c (camel_mime_part_set_content_location, camel_mime_part_get_content_location, etc): Deal with Content-Location header. svn path=/trunk/; revision=9772
* Don't check the initial auth response until we get into the while-loopJeffrey Stedfast2001-05-122-9/+20
| | | | | | | | | | | 2001-05-11 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_auth): Don't check the initial auth response until we get into the while-loop otherwise we have problems if the SASL mechanism supported a client initiated challenge (like PLAIN and LOGIN do). svn path=/trunk/; revision=9771
* Make this return CamelStream * (like the other stream new functions)Dan Winship2001-05-123-5/+10
| | | | | | | | * camel-stream-null.c (camel_stream_null_new): Make this return CamelStream * (like the other stream new functions) instead of CamelStreamNull * svn path=/trunk/; revision=9760
* call SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise,Chris Toshok2001-05-112-1/+8
| | | | | | | | | | 2001-05-10 Chris Toshok <toshok@ximian.com> * camel-tcp-stream-ssl.c (stream_connect): call SSL_Enable after the SSL_ImportFD and before PR_Connect. Otherwise, NSS aborts during the connect. svn path=/trunk/; revision=9751
* Don't abort if the Service is NULL, this is perfectly valid for cipherJeffrey Stedfast2001-05-112-1/+5
| | | | | | | | | 2001-05-10 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (camel_session_get_password): Don't abort if the Service is NULL, this is perfectly valid for cipher contexts. svn path=/trunk/; revision=9748
* Pass appropriate parameters to CF_CLASS and add comment explaining why myPeter Williams2001-05-102-1/+9
| | | | | | | | | | 2001-05-09 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-folder.c (imap_move_messages_to): Pass appropriate parameters to CF_CLASS and add comment explaining why my initial attempt at a solution didn't work. svn path=/trunk/; revision=9742
* Set the disconnected status. (camel_disco_store_can_work_offline): ReturnDan Winship2001-05-1010-10/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-disco-store.c (camel_disco_set_status): Set the disconnected status. (camel_disco_store_can_work_offline): Return whether or not a given CamelDiscoStore can work offline or not. * camel-disco-folder.c (camel_disco_folder_cache_message): Explicitly tell a folder to cache a message. (Better than using get_message, because for IMAP that doesn't guarantee you'll get all the message parts.) (camel_disco_folder_prepare_for_offline): Prepare a folder for offline use by caching all messages meeting given search criteria (and doing anything else the particular folder implementation needs). * camel-session.c (camel_session_set_online, camel_session_is_online): A session-wide online/offline toggle. (camel_session_init): Set online to TRUE. * providers/imap/camel-imap-store.c (can_work_offline): Implementation of CamelDiscoStore::can_work_offline. (Checks that the store has been used online at least once.) (imap_get_folder_online, imap_get_folder_offline): Deal with request for "inbox" properly. ("Don't you mean... 'INBOX'?"). * providers/imap/camel-imap-folder.c (imap_cache_message): Implementation of CamelDiscoFolder::cache_message. * camel.h: Add camel-disco-store.h and camel-disco-folder.h svn path=/trunk/; revision=9738
* remove something jeff didn't mean to commitDan Winship2001-05-101-1/+1
| | | | svn path=/trunk/; revision=9737
* Wrap the content-id with <>'s.Jeffrey Stedfast2001-05-103-3/+17
| | | | | | | | | 2001-05-09 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-part.c (camel_mime_part_set_content_id): Wrap the content-id with <>'s. svn path=/trunk/; revision=9734
* Add support for using OpenSSL.Jeffrey Stedfast2001-05-087-30/+109
| | | | | | | | | | | | | | | | | | | | | | 2001-05-04 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server): Add support for using OpenSSL. * camel-remote-store.c (remote_connect): Add support for using the OpenSSL implementation. * camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a NULL as the last argument to alert_user - prototype doesn't take that argument anymore? * camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize): (ssl_verify): Use a global hash table to try and lookup the CamelTcpStreamOpenSSL object given the ssl context since OpenSSL doesn't think one needs to pass data around, we should all be living in a world of global variables, duh! svn path=/trunk/; revision=9697
* Fix another build problem. (Um, anyone else could have done this...)Dan Winship2001-05-062-1/+5
| | | | | | | * Makefile.am (libcamelinclude_HEADERS): Fix another build problem. (Um, anyone else could have done this...) svn path=/trunk/; revision=9687
* Fix up refcounting on current_folder.Dan Winship2001-05-044-4/+14
| | | | | | | | | | * providers/imap/camel-imap-store.c (get_folder_online): Fix up refcounting on current_folder. * camel-disco-folder.c, camel-disco-store.h: Remove CamelDiscoDiary refs that weren't supposed to escape yet. svn path=/trunk/; revision=9667
* new abstract class for disconnectable remote storesDan Winship2001-05-0414-536/+1174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-disco-store.c: new abstract class for disconnectable remote stores * camel-disco-folder.c: new abstract class for folders on disconnectable stores. * Makefile.am: Add camel-disco-folder.[ch] and camel-disco-store.[ch]. * providers/imap/camel-imap-store.c: Make this a subclass of CamelDiscoStore, and fix up the offline interfaces for the changes since they were first written (particularly the fact that some IMAP stores don't just use subscribed folders). * providers/imap/camel-imap-folder.c: Make this a subclass of CamelDiscoFolder, although most ops still fail in disconnected mode. * camel-store.c (camel_store_get_folder_info): Change gboolean, gboolean, gboolean to guint32 in the prototype for this function. * providers/local/camel-local-store.c (get_folder_info): Update for prototype change. svn path=/trunk/; revision=9659
* Clean this up a bit. Add a "tag_prefix" member. Move "useful_lsub" intoDan Winship2001-05-034-18/+31
| | | | | | | | | | | | | | | | * 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
* Fix this up... it was losing count in some cases and giving a more verboseDan Winship2001-05-032-14/+12
| | | | | | | | * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): Fix this up... it was losing count in some cases and giving a more verbose answer than it needed to. svn path=/trunk/; revision=9644
* Rescue the KPOP code from bit rot.Dan Winship2001-05-022-23/+21
| | | | | | | * providers/pop3/camel-pop3-store.c: Rescue the KPOP code from bit rot. svn path=/trunk/; revision=9643
* Remove the last argument from camel_session_alert_user.Anders Carlsson2001-05-021-1/+1
| | | | | | | | | 2001-05-01 Anders Carlsson <andersca@codefactory.se> * camel-tcp-stream-ssl.c (ssl_bad_cert): Remove the last argument from camel_session_alert_user. svn path=/trunk/; revision=9640
* Redo command locking. Since command_lock is recursive, we can just get aDan Winship2001-05-027-197/+234
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* remove unused assignment that calls non-existent function.Dan Winship2001-05-011-2/+0
| | | | svn path=/trunk/; revision=9636
* Support the IMAP UIDPLUS extension (RFC 2359), which lets youDan Winship2001-05-016-73/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resync after disconnected operation more efficiently, but also makes it possible to do appends and moves/copies more efficiently now. * providers/imap/camel-imap-folder.c (imap_append_message): If the server supports UIDPLUS, grab the APPENDUID response and cache the message into the folder's message cache. (imap_copy_messages_to): Likewise, for COPYUID, copy any message parts we have cached between the source and destination folder caches. (imap_get_message): If the entire message is already in the cache, just return that rather than building it from parts. (imap_update_summary): Fetch just the "UID FLAGS RFC822.SIZE" of the new messages first, then only fetch the headers for messages where we don't already have the headers cached. * providers/imap/camel-imap-message-cache.c: Add gtk-doc comments. (cache_put): Fix refcounting stuff here. (camel_imap_message_cache_insert_stream, camel_imap_message_cache_insert_wrapper): New. (camel_imap_message_cache_get): Fix a bug here so the memory caching actually works. (camel_imap_message_cache_copy): New routine, used by imap_copy_messages_to. * providers/imap/camel-imap-utils.c (imap_uid_set_to_array): Inverse operation of imap_uid_array_to_set. Used to parse COPYUID response. svn path=/trunk/; revision=9635
* New-and-improved version of get_uid_set() from camel-imap-folder.c. LooksDan Winship2001-05-014-38/+89
| | | | | | | | | | | | | | * providers/imap/camel-imap-utils.c (imap_uid_array_to_set): New-and-improved version of get_uid_set() from camel-imap-folder.c. Looks at the summary as it goes so that if you ask for messages 5, 6, 8, and 9, and there is no message 7, then you get "5:9" instead of "5:6,8:9" * providers/imap/camel-imap-folder.c (imap_copy_messages_to): Use imap_uid_array_to_set() rather than get_uid_set(). (get_uid_set): Gone svn path=/trunk/; revision=9632
* Redo this a lot so that instead of having a class full of callbacks, weDan Winship2001-04-2810-244/+361
| | | | | | | | | | | | | | | | | | | | | | * camel-session.c: Redo this a lot so that instead of having a class full of callbacks, we have a subclassable class. Also, replace the increasingly horrifying camel_session_query_authenticator with three new routines, camel_session_get_password, camel_session_forget_password, and camel_session_alert_user. * camel-pgp-context.c: * camel-pkcs7-context.c: * camel-smime-context.c: * providers/imap/camel-imap-store.c: * providers/pop3/camel-pop3-store.c: * providers/smtp/camel-smtp-transport.c: Use camel_session_get_password / camel_session_forget_password. * camel-tcp-stream-ssl.c (ssl_bad_cert): Use camel_session_alert_user. svn path=/trunk/; revision=9617
* Automagically call camel_shutdown() atexit() ;-) (camel_init): AlsoJeffrey Stedfast2001-04-273-16/+25
| | | | | | | | | | | | | | 2001-04-26 Jeffrey Stedfast <fejj@ximian.com> * camel.c (camel_init): Automagically call camel_shutdown() atexit() ;-) (camel_init): Also initialize NSS databases as read/write for S/MIME and if NSS fails to init, try initializing with volatile databases. * camel-file-utils.h: #include <sys/types.h> for off_t. svn path=/trunk/; revision=9609
* #include <sys/types.h> for off_t.Jeffrey Stedfast2001-04-272-0/+5
| | | | | | | | 2001-04-26 Jeffrey Stedfast <fejj@ximian.com> * camel-file-utils.h: #include <sys/types.h> for off_t. svn path=/trunk/; revision=9593
* #include "nss.h" rather than <nss.h> due to the non-mozilla nss.h file ↵Jeffrey Stedfast2001-04-271-2/+3
| | | | | | living in /usr/include svn path=/trunk/; revision=9592
* New file, with the int, string, time_t, and off_t encode/decode routinesDan Winship2001-04-279-363/+447
| | | | | | | | | | | | | | | | | | | | | | | | | * camel-file-utils.c: New file, with the int, string, time_t, and off_t encode/decode routines from camel-folder-summary.c moved here and renamed, for the enjoyment of non-CamelFolderSummary subclasses. * Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c (libcamelinclude_HEADERS): and camel-file-utils.h * camel-folder-summary.c: Remove functions that were moved to camel-file-utils.c, update uses of them for the new names. (camel_folder_summary_{en,de}code_token are still here.) * providers/local/camel-mbox-summary.c: Use camel_file_util_* names * providers/imap/camel-imap-summary.c: Use camel_file_util_* names * providers/imap/camel-imap-store.c (imap_store_setup_online, imap_store_setup_offline): Use camel_file_util_* names, which makes much more sense since this isn't folder summary stuff. svn path=/trunk/; revision=9590
* Remove UNICODE_CFLAGS (and some other stuff that's redundant withDan Winship2001-04-2713-103/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other stuff that's redundant with EXTRA_GNOME_CFLAGS) (libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS. * camel-search-private.c: * camel-pgp-context.c: * camel-mime-utils.c: Use gunicode interfaces rather than libunicode. * camel-charset-map.c: Use gunicode rather than libunicode. (The charmap-regen code still depends on libunicode though.) * camel-mime-filter-charset.h: * tests/message/test2.c (convert): Use iconv rather than unicode_iconv. * providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD): * providers/pop3/Makefile.am (libcamelpop3_la_LIBADD): * providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove UNICODE_LIBS. * camel.c (camel_init): Remove call to unicode_init. * camel-mime-parser.c: Remove unused unicode.h include. svn path=/trunk/; revision=9585
* Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.Dan Winship2001-04-272-9/+8
| | | | | | | * camel-service.c (get_host): Use e_gethostbyname_r. (camel_service_gethost): Remove unused var. svn path=/trunk/; revision=9583
* Applied jacob's patches for e-poolv stuff.Not Zed2001-04-267-67/+122
| | | | | | | | 2001-04-26 Not Zed <NotZed@Ximian.com> * Applied jacob's patches for e-poolv stuff. svn path=/trunk/; revision=9571
* Add camel-vee-folder.h and camel-digest-folder.hJeffrey Stedfast2001-04-242-0/+4
| | | | | | | | | | | 2001-04-23 Jeffrey Stedfast <fejj@ximian.com> * camel.h: Add camel-vee-folder.h and camel-digest-folder.h * camel-digest-folder.[c,h]: New class that can be used to browse a multipart/digest message as if it were a CamelFolder. svn path=/trunk/; revision=9531
* New class that can be used to browse a multipart/digest message as if itJeffrey Stedfast2001-04-245-1/+366
| | | | | | | | | 2001-04-23 Jeffrey Stedfast <fejj@ximian.com> * camel-digest-folder.[c,h]: New class that can be used to browse a multipart/digest message as if it were a CamelFolder. svn path=/trunk/; revision=9530
* Oops, don't use the return value of iconv() as a string length, it onlyJeffrey Stedfast2001-04-233-3/+10
| | | | | | | | | | | 2001-04-22 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Oops, don't use the return value of iconv() as a string length, it only tells us the number of non-reversable character conversions. This fixes it so we actually see the gpg output in the message viewer. svn path=/trunk/; revision=9495
* Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS.Mikael Hallendal2001-04-232-1/+6
| | | | | | | | | 2001-04-23 Mikael Hallendal <micke@codefactory.se> * providers/nntp/Makefile.am (INCLUDES): Changed GTK_INCLUDEDIR to EXTRA_GNOME_CFLAGS. svn path=/trunk/; revision=9494
* Implemented using the secmime.h convenience functions. (smime_clearsign):Jeffrey Stedfast2001-04-214-15/+754
| | | | | | | | | | | | | | | | 2001-04-20 Jeffrey Stedfast <fejj@ximian.com> * camel-smime-context.c (smime_sign): Implemented using the secmime.h convenience functions. (smime_clearsign): We just error our here, there is no clearsign for smime. (smime_verify): Copied code over from the pkcs7 verify - same state, ugly and unknown :-) (smime_encrypt): Implemented using the secmime.h convenience functions. (smime_decrypt): Same as the code in pkcs7-context. svn path=/trunk/; revision=9480
* Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):Jeffrey Stedfast2001-04-202-5/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-19 Jeffrey Stedfast <fejj@ximian.com> * camel-pkcs7-context.c (pkcs7_sign): Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd): Convenience function to try a 0-length key on the certificate db - if this works then there is no need to prompt the user. (get_password): Callback to get the password. (camel_cipher_hash_to_nss): Convenience function to convert a CamelCipherHash to an NSS HASH_HashType. (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag. (pkcs7_digest): Digest function for use with pkcs7_sign(). (sign_encode_cb): Callback to write the signed data to the output stream. (pkcs7_verify): Hacked on a bit more but am still a bit on the confused side. This might work but I wouldn't hold my breath. The sign/clearsign should be close if not correct, but this one...god only knows. (pkcs7_decrypt): Implemented. (pkcs7_encrypt): Implemented (mostly, still need to handle when 'sign' is TRUE). svn path=/trunk/; revision=9461
* Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd):Jeffrey Stedfast2001-04-202-7/+307
| | | | | | | | | | | | | | | | | | | | | | | 2001-04-19 Jeffrey Stedfast <fejj@ximian.com> * camel-pkcs7-context.c (pkcs7_sign): Implemented. (pkcs7_clearsign): Implemented. (get_zero_len_passwd): Convenience function to try a 0-length key on the certificate db - if this works then there is no need to prompt the user. (get_password): Callback to get the password. (camel_cipher_hash_to_nss): Convenience function to convert a CamelCipherHash to an NSS HASH_HashType. (nss_hash_to_sec_oid): Converts a HASH_HashType to a SecOidTag. (pkcs7_digest): Digest function for use with pkcs7_sign(). (sign_encode_cb): Callback to write the signed data to the output stream. (pkcs7_verify): Hacked on a bit more but am still a bit on the confused side. This might work but I wouldn't hold my breath. The sign/clearsign should be close if not correct, but this one...god only knows. svn path=/trunk/; revision=9460
* missed this with the last commit (pop3 and imap memory leaks)Dan Winship2001-04-191-0/+14
| | | | svn path=/trunk/; revision=9453
* Free base_url and storage_path.Dan Winship2001-04-193-5/+33
| | | | | | | | | | | | | | | | * providers/imap/camel-imap-store.c (camel_imap_store_finalize): Free base_url and storage_path. * providers/pop3/camel-pop3-store.c (finalize): Free the implementation string. (camel_pop3_command): Clarify documentation to mention that @ex isn't set (and *@ret is) on CAMEL_POP3_ERR. (connect_to_server): Set @ex properly on CAMEL_POP3_ERR. * providers/pop3/camel-pop3-folder.c (pop3_refresh_info, pop3_get_message): Set @ex properly on CAMEL_POP3_ERR. svn path=/trunk/; revision=9450
* New source files to handle Pkcs7 encryption, decryption, signing, andJeffrey Stedfast2001-04-184-0/+330
| | | | | | | | | | | 2001-04-17 Jeffrey Stedfast <fejj@ximian.com> * camel-pkcs7-context.[c,h]: New source files to handle Pkcs7 encryption, decryption, signing, and verifying. Not yet complete. I'm sensing this is going to take a while seeing as how NSS is just so well documented. svn path=/trunk/; revision=9435
* more memory leaksDan Winship2001-04-182-0/+7
| | | | svn path=/trunk/; revision=9431
* don't use g_return'sJeffrey Stedfast2001-04-171-2/+3
| | | | svn path=/trunk/; revision=9396
* Don't we want to tell where we are by using the start of the message? IJeffrey Stedfast2001-04-172-5/+14
| | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we want to tell where we are by using the start of the message? I think this should be using camel_mime_parser_tell_start_from() instead. Also divide by the size *before* multiplying by 100 so that we don't overflow the int which was giving us negative values for our progress status (oops). svn path=/trunk/; revision=9394
* Added a prototype for stamp().Jeffrey Stedfast2001-04-174-1/+11
| | | | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-operation.c: Added a prototype for stamp(). * camel-charset-map.c (camel_charset_locale_name): #include string.h so we don't get a warning about strchr being undefined and also init charset to NULL. * camel-pgp-context.c (pgp_verify): Go back to doing the utf8 conversion by hand so that we don't depend on gal. svn path=/trunk/; revision=9388
* Go back to doing the utf8 conversion by hand so that we don't depend onJeffrey Stedfast2001-04-172-4/+46
| | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (pgp_verify): Go back to doing the utf8 conversion by hand so that we don't depend on gal. svn path=/trunk/; revision=9387
* oops, forgot to commit this with the last filesJeffrey Stedfast2001-04-171-1/+0
| | | | svn path=/trunk/; revision=9384
* Remove the EXTRA_GNOME_CFLAGS include.Jeffrey Stedfast2001-04-1711-21/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Remove the EXTRA_GNOME_CFLAGS include. * camel-store.c (camel_mkdir_hier): Convenience function that it seems a number of camel-store implementations used gal for. * providers/nntp/camel-nntp-store.c (ensure_news_dir_exists): Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * providers/nntp/camel-imap-store.c: Lets not depend on gal for just e_mkdir_hier() - use camel_mkdir_hier() instead. * camel-session.c (camel_session_get_storage_path): Don't depend on e_mkdir_heir() anymore, use the CamelStore version. * camel-folder-search.h: Removed gal dependency, why was this even there in the first place? * providers/imap/camel-imap-folder.c: Don't need gal/util/e-util.h here, so remove it. * string-utils.c (strstrcase): New function, well more like old function brought back to life so we don't have to depend on gal. * providers/imap/camel-imap-store.c (imap_store_setup_online): Use strstrcase rather than e_strstrcase so we don't depend on gal. (get_unread_online): Same here. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use strstrcase. svn path=/trunk/; revision=9383
* eh?Jeffrey Stedfast2001-04-171-2/+0
| | | | svn path=/trunk/; revision=9377
* oops, &patternJeffrey Stedfast2001-04-161-2/+2
| | | | svn path=/trunk/; revision=9334
* regex doesn't set errno and regcomp returns 0 on success and any otherJeffrey Stedfast2001-04-162-5/+21
| | | | | | | | | | 2001-04-15 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_raw_check_mailing_list): regex doesn't set errno and regcomp returns 0 on success and any other value for an error (so don't *just* check for -1). svn path=/trunk/; revision=9333
* Check to make sure the context is a valid context in all the userJeffrey Stedfast2001-04-152-0/+15
| | | | | | | | | 2001-04-14 Jeffrey Stedfast <fejj@ximian.com> * camel-cipher-context.c: Check to make sure the context is a valid context in all the user functions. svn path=/trunk/; revision=9314
* s/imap_store/store/, fixing a typo that was causing the build to fail.Jon Trowbridge2001-04-142-5/+9
| | | | | | | | | | 2001-04-13 Jon Trowbridge <trow@ximian.com> * providers/imap/camel-imap-store.c (imap_disconnect): s/imap_store/store/, fixing a typo that was causing the build to fail. svn path=/trunk/; revision=9306
* Make the (previously unused) get-source command actually do the rightJon Trowbridge2001-04-143-4/+22
| | | | | | | | | | | | | | | | | | | | | | 2001-04-13 Jon Trowbridge <trow@gnu.org> * camel-filter-search.c (get_source): Make the (previously unused) get-source command actually do the right thing, properly shrouding any passed-in source and falling back to use the source attached to the mime message. 2001-04-13 Jon Trowbridge <trow@gnu.org> * filtertypes.xml: Add XML specs for source account filtering. * filter-element.c (filter_element_new_type_name): Recognize type "source", construct a FilterSource. * filter-source.c: Added. A FilterElement for the account e-mail comes from. svn path=/trunk/; revision=9304
* Plug leaks.Dan Winship2001-04-146-10/+41
| | | | | | | | | | | | | | | | * camel-object.c (camel_object_hook_event): * camel-uid-cache.c (camel_uid_cache_get_new_uids): * camel-url.c (camel_url_new_with_base): Plug leaks. * camel-remote-store.c (camel_remote_store_init): Don't re-initialize the folders hash table. * providers/imap/camel-imap-store.c (imap_disconnect): Free authtypes since they'll be re-read on re-connect. (get_folder_info): Free folderinfos that we're discarding from the list. svn path=/trunk/; revision=9302
* Oops, lets not get into a recursive call here ;-)Jeffrey Stedfast2001-04-135-15/+24
| | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_context_get_type): Oops, lets not get into a recursive call here ;-) * tests/smime/pgp.c: Updated to reflect changes to the PGP code. * tests/smime/pgp-mime.c: Same. svn path=/trunk/; revision=9287
* Updated to reflect the few changes made to the CamelPgpContext class.Jeffrey Stedfast2001-04-138-313/+662
| | | | | | | | | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-mime.c: Updated to reflect the few changes made to the CamelPgpContext class. * camel-pgp-context.c: Updated to subclass of CamelCipherContext. * camel-cipher-context.[c,h]: New base class for CamelPgpContext. Also contains the replacement for CamelPgpValidity, CamelCipherValidity. svn path=/trunk/; revision=9283
* Fix a pair of array bounds reads noted by purifyDan Winship2001-04-132-2/+7
| | | | | | | * camel-mime-filter-crlf.c (filter): Fix a pair of array bounds reads noted by purify svn path=/trunk/; revision=9282
* oh, and the tcp-stream headers.Jeffrey Stedfast2001-04-131-0/+3
| | | | svn path=/trunk/; revision=9281
* #include the pgp stuff.Jeffrey Stedfast2001-04-132-0/+6
| | | | | | | | 2001-04-12 Jeffrey Stedfast <fejj@ximian.com> * camel.h: #include the pgp stuff. svn path=/trunk/; revision=9280
* Plug memory leaks.Dan Winship2001-04-133-0/+8
| | | | | | | | * providers/imap/camel-imap-message-cache.c (camel_imap_message_cache_remove): * camel-url.c (camel_url_to_string): Plug memory leaks. svn path=/trunk/; revision=9271
* s/IMAP/SMTPJeffrey Stedfast2001-04-121-1/+1
| | | | svn path=/trunk/; revision=9265
* Simplify peterw's imap_is_atom_char fix.Dan Winship2001-04-122-2/+7
| | | | | | | * providers/imap/camel-imap-utils.c (imap_parse_string_generic): Simplify peterw's imap_is_atom_char fix. svn path=/trunk/; revision=9250
* Added pgp-mime.c to the tests.Jeffrey Stedfast2001-04-127-26/+155
| | | | | | | | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * tests/smime/Makefile.am: Added pgp-mime.c to the tests. * tests/smime/pgp-mime.c: Test suite for camel-pgp-mime.c functions. * Makefile.am: Add camel-pgp-mime.[c,h] to the build. * camel-pgp-mime.c: Made a number of fixes to get it to compile and also fixed a few logic errors (mostly forgetting to reset streams) so that it worked (thanks to the pgp-mime test program). svn path=/trunk/; revision=9247
* Check if gethostbyname_r take five paramsJP Rosevear2001-04-128-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-11 JP Rosevear <jpr@ximian.com> * configure.in: Check if gethostbyname_r take five params * acconfig.h: add GETHOSTBYNAME_R_FIVE_ARGS 2001-04-11 JP Rosevear <jpr@ximian.com> * providers/imap/Makefile.am: user GNOME_INCLUDEDIR since gnome files are included in the top level camel headers and the gtk include dir is now versioned and such * providers/local/Makefile.am: ditto * providers/pop3/Makefile.am: ditto * providers/smtp/Makefile.am: ditto * providers/sendmail/Makefile.am: ditto * camel-service.c: use five arg version of gethostbyname_r if appropriate (camel_get_host_byname): check if msg->herr is non-zero instead of checking if msg->hp is null since we may not always have msg->hp svn path=/trunk/; revision=9239
* add camel-charset-map.h to the list of includesJeffrey Stedfast2001-04-111-0/+1
| | | | svn path=/trunk/; revision=9238
* Use camel_charset_locale_name() to get the locale charset rather thanJeffrey Stedfast2001-04-114-3/+58
| | | | | | | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-digest-md5.c (digest_response): Use camel_charset_locale_name() to get the locale charset rather than checking the CHARSET environment variable. This is a much less ugly hack. Also: If we fail to be able to convert to UTF8, then disavow all knowledge of the charset parameter. * camel-charset-map.c (camel_charset_locale_name): New function to return the locale charset (or NULL if US-ASCII). svn path=/trunk/; revision=9237
* Use e_utf8_from_locale_string() rather than trying to do it manually sinceJeffrey Stedfast2001-04-112-26/+10
| | | | | | | | | | 2001-04-11 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_verify): Use e_utf8_from_locale_string() rather than trying to do it manually since Lauris's version works much better. svn path=/trunk/; revision=9236
* Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.cJeffrey Stedfast2001-04-1010-28/+182
| | | | | | | | | | | | | 2001-04-06 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also added tests/smime/pgp.c and Makefile.am * tests/smime/pgp.c: New test suite for PGP functions. * camel-pgp-context.c: Various fixes to get it to build. svn path=/trunk/; revision=9213
* It would be a good idea to recognize '\0'. Before, this code was runningPeter Williams2001-04-082-1/+8
| | | | | | | | | | | 001-04-07 Peter Williams <peterw@ximian.com> * providers/imap/camel-imap-utils.c (imap_parse_string_generic): It would be a good idea to recognize '\0'. Before, this code was running off the ends of strings and intermittently coredumping (if it didn't hit an imap_atom_char first) -- whoops! svn path=/trunk/; revision=9202
* merge from evolution-0-10-branch to evolution-0-10-merge-0Not Zed2001-04-059-26/+257
| | | | | | | | 2001-04-05 Not Zed <NotZed@Ximian.com> * merge from evolution-0-10-branch to evolution-0-10-merge-0 svn path=/trunk/; revision=9194
* Added tests/ back inJeffrey Stedfast2001-04-043-131/+219
| | | | | | | | | | | | | | | 2001-04-03 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added tests/ back in * camel-mime-utils.c (header_decode_text): Ignore whitespace between encoded words (there were a few cases where it didn't before). (header_encode_string): Preserve whitespace between words that are to be encoded by encoding them too. (header_encode_phrase): Same here but with phrases. svn path=/trunk/; revision=9158
* (imap_update_summary): When reading message flags, set theDan Winship2001-04-042-2/+13
| | | | | | | | server_flags field as well, and don't overwrite any flags set by camel_folder_summary_info_new_from_message. Might help with some of the flag problems... svn path=/trunk/; revision=9149
* (imap_get_message): If the server_level < IMAP4rev1, always fetchDan Winship2001-04-042-3/+9
| | | | | | | messages all-at-once, since they don't support the [#.MIME] syntax. svn path=/trunk/; revision=9145
* If we don't change any flags or expunge, send a NOOP to give the server aDan Winship2001-04-042-1/+17
| | | | | | | | * providers/imap/camel-imap-folder.c (imap_sync): If we don't change any flags or expunge, send a NOOP to give the server a chance to send EXISTS, etc, messages. svn path=/trunk/; revision=9142
* Remove the "quick_login" member, which is unnecessary.Dan Winship2001-04-0312-44/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * camel-service.h: Remove the "quick_login" member, which is unnecessary. * providers/smtp/camel-smtp-transport.c (smtp_auth): Remove the references to quick_login and fix this to use the CamelSasl interfaces correctly to do the same thing. (connect_to_server): Split this out of smtp_connect (smtp_connect): Use connect_to_server. When re-EHLO'ing after auth, ignore errors. (query_auth_types): Use connect_to_server rather than smtp_connect, so it doesn't try to authenticate. Add LOGIN authtype to the list of authtypes to check for. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): Add LOGIN authtype to the authtypes list explicitly. * camel-sasl.c (camel_sasl_authtype_list): Don't list LOGIN here: it's not a real SASL authtype and is only used for SMTP. * camel-sasl-plain.c: * camel-sasl-login.c: * camel-sasl-kerberos4.c: * camel-sasl-cram-md5.c: * camel-sasl-anonymous.c: * providers/pop3/camel-pop3-provider.c: Remove "quick_login" argument from authtypes. svn path=/trunk/; revision=9100
* marked report status strings for tanslation, fixes #1973Gediminas Paulauskas2001-04-032-7/+11
| | | | svn path=/trunk/; revision=9099
* mutex lock & unlock the context. (camel_pgp_clearsign): Same.Jeffrey Stedfast2001-04-022-0/+55
| | | | | | | | | | | | 2001-04-02 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.c (camel_pgp_sign): mutex lock & unlock the context. (camel_pgp_clearsign): Same. (camel_pgp_verify): Same. (camel_pgp_encrypt): Same. (camel_pgp_decrypt): And finally here... svn path=/trunk/; revision=9096
* Update the function prototypes to match those found inJeffrey Stedfast2001-04-025-8/+585
| | | | | | | | | | | | | | | | 2001-04-02 Jeffrey Stedfast <fejj@ximian.com> * camel-pgp-context.h: Update the function prototypes to match those found in camel-pgp-context.c. * camel-pgp-context.c: Updated. * camel-pgp-mime.c (camel_pgp_mime_part_sign): Implemented. (camel_pgp_mime_part_verify): Implemented. (camel_pgp_mime_part_encrypt): Implemented. (camel_pgp_mime_part_decrypt): Implemented. svn path=/trunk/; revision=9095
* New files to handle the LOGIN SASL mechanism.Jeffrey Stedfast2001-04-028-23/+241
| | | | | | | | | | | | | | | | | | | 2001-04-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-login.[c,h]: New files to handle the LOGIN SASL mechanism. * camel-sasl-plain.c: Removed the definition of camel_sasl_login_authtype. * camel-sasl.c (camel_sasl_new): Oops. I thought LOGIN was an alias to PLAIN. I was wrong. These two SASL objects have to be separate. * providers/smtp/camel-smtp-transport.c (smtp_auth): Updated to check for and use authmech->quick_login when available. svn path=/trunk/; revision=9088
* Updated the authtypes here too.Jeffrey Stedfast2001-04-023-4/+13
| | | | | | | | | 2001-04-01 Jeffrey Stedfast <fejj@ximian.com> * providers/pop3/camel-pop3-provider.c: Updated the authtypes here too. svn path=/trunk/; revision=9087
* Updated the authtype values.Jeffrey Stedfast2001-04-0212-11/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | 2001-04-01 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-plain.c: * camel-sasl-anonymous.c: * camel-sasl-digest-md5.c: * camel-sasl-cram-md5.c: * camel-sasl-kerberos4.c: Updated the authtype values. * camel-service.h: Added another field to CamelServiceAuthType that specifies whether or not the mechanism supports "quick auth" which means that the client can send the initial challenge in the AUTH request. * camel-sasl.c (camel_sasl_new): Add support for LOGIN. (camel_sasl_authtype_list): Here too. (camel_sasl_authtype): And finally here. * camel-sasl-plain.c: Define camel_sasl_login_authtype. * providers/smtp/camel-smtp-transport.c (smtp_auth): Only unref the SASL object if it exists. svn path=/trunk/; revision=9086
* Move things around here to make this all work right again (so you don'tDan Winship2001-03-312-47/+35
| | | | | | | | | * providers/pop3/camel-pop3-store.c (connect_to_server, query_auth_types, pop3_connect): Move things around here to make this all work right again (so you don't get prompted for a password when checking the supported authtypes.) svn path=/trunk/; revision=9056
* Add support for converting e-mail addresses to links. (is_email_address):Jon Trowbridge2001-03-312-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-30 Jon Trowbridge <trow@ximian.com> * e-html-utils.c (e_text_to_html_full): Add support for converting e-mail addresses to links. (is_email_address): Added. Identifies e-mail addresses. (email_address_extract): Added. Extracts a copy of the e-mail address from the text. * e-html-utils.h (E_TEXT_TO_HTML_CONVERT_ADDRESSES): Added. * e-url.c (e_url_shroud): Added. Copy a url, replacing any plaintext passwords with a single *. (e_url_equal): Compare two urls, taking into account that they may or may not be shrouded. 2001-03-30 Jon Trowbridge <trow@ximian.com> * camel-mime-message.c (camel_mime_message_set_source): Shrould our source URL before putting it into X-Evolution-Source. 2001-03-30 Jon Trowbridge <trow@ximian.com> * mail-display.c (mail_text_write): Add (commented-out) E_TEXT_TO_HTML_CONVERT_ADDRESSES. * mail-config.c (mail_config_get_account_by_source_url): Call e_url_equal to compare URLs. svn path=/trunk/; revision=9050
* removed a g_warning for debuggingJeffrey Stedfast2001-03-301-2/+0
| | | | svn path=/trunk/; revision=9037
* Don't blindly append "/INBOX", construct a CamelURL and set the path thatJeffrey Stedfast2001-03-302-7/+44
| | | | | | | | | | | | | | 2001-03-29 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folder_info): Don't blindly append "/INBOX", construct a CamelURL and set the path that way. (parse_list_response_as_folder_info): Don't blindly append "/<foldername>", construct a CamelURL and set the path that way instead. (get_folders_offline): And again here. svn path=/trunk/; revision=9036
* Dont overwrite an exception if we got one already. Added camel_operationNot Zed2001-03-302-10/+25
| | | | | | | | | | 2001-03-30 Not Zed <NotZed@Ximian.com> * camel-service.c (camel_get_host_byname): Dont overwrite an exception if we got one already. Added camel_operation status to it, and comment out some debug. svn path=/trunk/; revision=9034
* Not quite finished but checking in for some local frobbing.Not Zed2001-03-309-17/+163
| | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Not Zed <NotZed@Ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_connect): Free host name info when done ... blah blah. * camel-sasl-kerberos4.c (krb4_challenge): Free host name info after we're done with it. * camel-sasl-digest-md5.c (digest_md5_challenge): Free host name info after we're done with it. * camel-remote-store.c (remote_connect): Free the host name info from get_host after we're finished with it. * camel-service.c (camel_get_host_byname): New function to lookup a name, and still be cancellable. (camel_free_host): And a function to free the structure returned. (camel_service_gethost): Call get_host_byname for this. svn path=/trunk/; revision=9033
* Added #include <libgnome/gnome-paper.h>Jon Trowbridge2001-03-304-4/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-29 Jon Trowbridge <trow@ximian.com> * printing/e-contact-print.c: Added #include <libgnome/gnome-paper.h> * printing/e-contact-print-envelope.c: Added #include <time.h> and #include <libgnome/gnome-paper.h> * gui/component/select-names/e-select-names-completion.c (match_email): Better handle matching of "nameless" contacts. * backend/ebook/e-destination.c (e_destination_get_string): Better handle the case of a "nameless" contact. 2001-03-29 Jon Trowbridge <trow@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_message): Save the source URL using camel_mime_message_set_source. * camel-mime-message.c (camel_mime_message_set_source): Renamed camel_mime_message_set_identity to this. Sets the X-Evolution-Source header. (camel_mime_message_get_source): Returns the X-Evolution-Source header. 2001-03-29 Jon Trowbridge <trow@ximian.com> * mail-callbacks.c: Added #include <time.h> to get things to compile. * mail-callbacks.c (mail_generate_reply): Look at the X-Evolution-Source header, and try to find a corresponding account. If this works, send the mail from this account. If not, use the default account. * mail-ops.c (send_queue_send): Strip out the X-Evolution-Source header before sending. * mail-config.c (mail_config_get_account_by_source_url): Added. Look up accounts by source URL. svn path=/trunk/; revision=9032