platform/upstream/evolution-data-server.git
23 years agoIf we aren't going to even check the resp/free buffer that gets returned
Jeffrey Stedfast [Tue, 27 Mar 2001 23:12:46 +0000 (23:12 +0000)]
If we aren't going to even check the resp/free buffer that gets returned

2001-03-27  Jeffrey Stedfast  <fejj@ximian.com>

* providers/pop3/camel-pop3-folder.c (pop3_sync): If we aren't
going to even check the resp/free buffer that gets returned from
camel_pop3_command, don't even bother using it. Send in NULL
instead.
(pop3_get_message): Check to make sure that the `result' string is
non-NULL. It's possible that some POP servers may return with
"+OK\r\n<message>..." rather than the expected
"+OK ### octets\r\n<message>..."

23 years agoUnref the html filter when done. (summary_build_content_info): Disable
Not Zed [Tue, 27 Mar 2001 12:48:13 +0000 (12:48 +0000)]
Unref the html filter when done. (summary_build_content_info): Disable

2001-03-27  Not Zed  <NotZed@Ximian.com>

        * camel-folder-summary.c (camel_folder_summary_finalize): Unref
        the html filter when done.
        (summary_build_content_info): Disable using the html parser to
        help index html mails until it gets sorted out.

23 years agoFix a cut n paste bug, we want uid_removed not uid_changed deref, fixes
Not Zed [Tue, 27 Mar 2001 10:10:16 +0000 (10:10 +0000)]
Fix a cut n paste bug, we want uid_removed not uid_changed deref, fixes

2001-03-27  Not Zed  <NotZed@Ximian.com>

* camel-vee-folder.c (folder_changed): Fix a cut n paste bug, we
want uid_removed not uid_changed deref, fixes bug #1999.

23 years agoadd an argument to say whether or not you want "PLAIN" in the list (so you
Dan Winship [Tue, 27 Mar 2001 05:30:41 +0000 (05:30 +0000)]
add an argument to say whether or not you want "PLAIN" in the list (so you

* camel-sasl.c (camel_sasl_authtype_list): add an argument to say
whether or not you want "PLAIN" in the list (so you don't end up
with "Password" twice in the config dialog).

* providers/imap/camel-imap-provider.c (camel_provider_module_init):
* providers/imap/camel-imap-store.c (query_auth_types): We don't
want PLAIN.

* providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
* providers/smtp/camel-smtp-transport.c (query_auth_types): But we
do.

23 years agoAdd an "extra_conf" field to CamelProvider with structures and defines and
Dan Winship [Tue, 27 Mar 2001 05:22:44 +0000 (05:22 +0000)]
Add an "extra_conf" field to CamelProvider with structures and defines and

* camel-provider.h: Add an "extra_conf" field to CamelProvider
with structures and defines and stuff, for providers to specify
additional configuration options that they want. Also add a
"supports ssl" flag to the provider flags.

* camel-remote-store.c: add a "default_ssl_port" field.
(remote_construct): If the URL has the "use_ssl" parameter, set
the store's use_ssl flag.
(remote_connect): If using SSL and no port specified, use the
default_ssl_port rather than the default_port.

* providers/smtp/camel-smtp-provider.c (smtp_provider): add
CAMEL_PROVIDER_SUPPORTS_SSL and CAMEL_URL_ALLOW_USER. (The config
gui code knows that the ALLOW_USER and ALLOW_AUTH go together.)
(ssmtp_provider): gone

* providers/smtp/camel-smtp-transport.c (smtp_construct): Set a
flag if "use_ssl" param is set.
(smtp_connect): Check the CamelSmtpTransport use_ssl flag rather
than checking if this is smtp or ssmtp.

* providers/imap/camel-imap-provider.c (imap_conf_entries): Add a
bunch of IMAP-specific configuration options, like "check for new
mail in all folders" (default TRUE), "show only subscribed
folders" (default TRUE), "ignore server-supplied namespace", and
"apply filters to INBOX" (not yet implemented).
(imap_provider): We support SSL and we no longer allow a path in
the URL. (namespace is handled via extra_conf)
(simap_provider): Gone

* providers/imap/camel-imap-store.c (camel_imap_store_init): Set
default_ssl_port, don't set CAMEL_STORE_SUBSCRIPTIONS here
(construct): remove simap stuff, deal with "use_lsub",
"namespace", "check_all", and "filter" parameters. Set base_url
to not include params.
(imap_store_setup_online): Don't ask for the namespace if it was
set explicitly. Don't get subscribed folders if !use_lsub.
(imap_concat): Fix a bug.
(get_folder_info): Support for not checking all folders.

* providers/pop3/camel-pop3-provider.c (pop3_conf_entries): "keep
on server" (currently still implemented by the mailer code, not
here), "delete after N days" (not yet implemented).
(pop3_provider): we support SSL
(spop_provider): gone

* providers/pop3/camel-pop3-store.c (camel_pop3_store_init): Set
default_ssl_port
(pop3_connect): Remove spop code

23 years agoFix parsing of params. (output_param): And unparsing...
Dan Winship [Tue, 27 Mar 2001 05:22:08 +0000 (05:22 +0000)]
Fix parsing of params. (output_param): And unparsing...

* camel-url.c (camel_url_new_with_base): Fix parsing of params.
(output_param): And unparsing...

23 years agoRewrite to use imap_store->namespace, not service->url->path
Dan Winship [Tue, 27 Mar 2001 05:21:47 +0000 (05:21 +0000)]
Rewrite to use imap_store->namespace, not service->url->path

* providers/imap/camel-imap-folder.c (imap_get_full_name): Rewrite
to use imap_store->namespace, not service->url->path

23 years agoMove all of the camel_vee_folder_construct() internals here.
Jeffrey Stedfast [Tue, 27 Mar 2001 04:35:18 +0000 (04:35 +0000)]
Move all of the camel_vee_folder_construct() internals here.

2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel-vee-folder.c (vee_folder_construct): Move all of the
camel_vee_folder_construct() internals here.
(camel_vee_folder_construct): This function basically becomes a
wrapper for vee_folder_construct and also checks to make sure that
the UNMATCHED vfodler is constructed otherwise constructs it.
(camel_vee_folder_new): Call vee_folder_construct() instead so
that we don't get into a dead-lock.

23 years agoUse camel_vtrash_folder_new() to create the vtrash folder now.
Jeffrey Stedfast [Tue, 27 Mar 2001 01:41:21 +0000 (01:41 +0000)]
Use camel_vtrash_folder_new() to create the vtrash folder now.

2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel-store.c (init_trash): Use camel_vtrash_folder_new() to
create the vtrash folder now.

* camel-vtrash-folder.[c,h]: New subclass of CamelVeeFolder for
our vTrash folders.

* camel-folder.c (camel_folder_copy_messages_to): Don't watch for
vtrash folders anymore.
(camel_folder_move_messages_to): Same.

* camel-vee-folder.c (camel_vee_folder_class_init): Update.
(vee_move_messages_to): Rewrite to use the new move API.

* camel-filter-driver.c (do_copy): Updated to reflect
copy_message_to changes. Create a temporary uid array and use
that.
(do_move): Same.
(camel_filter_driver_filter_message): And again, here...

* providers/imap/camel-imap-folder.c (imap_copy_messages_to):
Update to the new API.
(imap_move_messages_to): Same.
(get_uid_set): New function to create a `set' string based on an
array of UIDs for use with imap_copy_messages_to.

* camel-folder.c (camel_folder_copy_messages_to): Replaces
camel_folder_copy_message_to
(camel_folder_move_message_to): Replaces
camel_folder_move_message_to.

23 years agoAdded folder_created event here.
Not Zed [Mon, 26 Mar 2001 23:10:40 +0000 (23:10 +0000)]
Added folder_created event here.

2001-03-27  Not Zed  <NotZed@Ximian.com>

        * camel-vee-store.c (vee_get_folder): Added folder_created event
        here.

        * camel-vee-folder.c (unmatched_finalise): Removed, moved into
        main finalise code.
        (message_changed): Just create a new change entry and promote it
        to a folder_changed thing.
        (vee_sync): Always rebuild folder on sync, even when not expunge.
        (folder_changed): If not autoupdating, make sure we remove any
        removed entries.
        (vee_folder_build_folder):
        (vee_folder_remove_folder): NOP if we're called on
        folder_unmatched.
        (vee_search_by_expression): Only search each folder once.  Should
        we also order the result in summary order?

2001-03-20  Not Zed  <NotZed@Ximian.com>

        * camel-store.c (init_trash): Fix calling for vee_folder_new().

        * camel-folder-summary.c (camel_folder_summary_remove_index):
        Optimise slightly, use ptr_array_remove_index rather than have to
        search for the index by using summary_remove.

        * camel-vee-folder.h: Removed local member from VeeFolder, since
        it was never used.

        * camel-vee-store.c (camel_vee_store_finalise): Setup finalise
        function.

        * camel-vee-folder.c (camel_vee_folder_set_expression): New
        function to set the query of an existing vfolder.
        (camel_vee_folder_construct): New function for
        convenience/subclasses.
        (camel_vee_folder_new): Removed exception parameter, no longer
        needed (since we dont search yet).
        (camel_vee_folder_new): Changed to use folder_construct, and no
        longer raise the folder created signal.
        (vee_folder_build_folder): Make it return error on exception, so
        we can work without exceptions.
        (vee_folder_remove_folder): Use remove index rather than
        remove_uid, this is ok since we have the summary locked for our
        own access.
        (camel_vee_folder_add_folder): Only add the folder to the
        unmatched private if it is not a private folder.
        (camel_vee_folder_remove_folder): Only remove the folder from
        unmatched if it is not private.
        (vee_expunge): Just call sync with expunge set.
        (vee_sync): If expunging, also refresh the search.
        (vee_folder_build_folder): We do our own locking now, removed from
        callers, also trigger changed events here too (within locks),
        fixed callers appropriately.
        (vee_folder_remove_folder): Do our own locking, and trigger
        changed events.
        (vee_folder_add_info): Renamed of vee_folder_add, we now take a
        hash of the folder name, rather than use the folders address.
        (hash_folder): Convert a folder name into an 8 character hash.
        (vee_get_message, vee_search_by_expression, vee_set_message_flags,
        vee_set_message_user_flag, vee_move_message_to): Changed the uid
        to be an 8 byte hash + original uid, with no ':' anymore.

23 years agoWhen writing the last token (if not rfc2047 encoded), don't use
Jeffrey Stedfast [Mon, 26 Mar 2001 20:11:27 +0000 (20:11 +0000)]
When writing the last token (if not rfc2047 encoded), don't use

2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_decode_text): When writing the last
token (if not rfc2047 encoded), don't use g_string_append_len, use
append_latin1.

23 years agoDon't spew a warning if the message-id wasn't set by the application, not
Jeffrey Stedfast [Mon, 26 Mar 2001 19:28:52 +0000 (19:28 +0000)]
Don't spew a warning if the message-id wasn't set by the application, not

2001-03-26  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-message.c (write_to_stream): Don't spew a warning if
the message-id wasn't set by the application, not a big deal since
we create one right here.

23 years agoRename this from "PLAIN" to "Password": there's no reason the user needs
Dan Winship [Mon, 26 Mar 2001 19:15:48 +0000 (19:15 +0000)]
Rename this from "PLAIN" to "Password": there's no reason the user needs

* camel-sasl-plain.c (camel_sasl_plain_authtype): Rename this from
"PLAIN" to "Password": there's no reason the user needs to see the
SASL mechanism name.

23 years agokeep a reference on the store's current_folder.
Dan Winship [Mon, 26 Mar 2001 16:01:33 +0000 (16:01 +0000)]
keep a reference on the store's current_folder.

* providers/imap/camel-imap-command.c (camel_imap_command): keep a
reference on the store's current_folder.

* providers/imap/camel-imap-store.c (camel_imap_store_finalize):
(imap_disconnect): unref the current_folder before clearing it.

23 years agoAdd missing accessor.
Dan Winship [Mon, 26 Mar 2001 14:05:44 +0000 (14:05 +0000)]
Add missing accessor.

* camel-url.c (camel_url_get_param): Add missing accessor.

23 years agoNew. Return the provider for a URL.
Dan Winship [Mon, 26 Mar 2001 14:01:33 +0000 (14:01 +0000)]
New. Return the provider for a URL.

* camel-session.c (camel_session_get_provider): New. Return
the provider for a URL.

23 years agoeh, changed my mind, put the exception back in camel_url_new()
Dan Winship [Sun, 25 Mar 2001 23:04:14 +0000 (23:04 +0000)]
eh, changed my mind, put the exception back in camel_url_new()

23 years agoNew URL parser with full RFC1808 relative URL support. Yum.
Dan Winship [Sun, 25 Mar 2001 22:55:27 +0000 (22:55 +0000)]
New URL parser with full RFC1808 relative URL support. Yum.

* camel-url.c (camel_url_new_with_base): New URL parser with full
RFC1808 relative URL support. Yum.
(camel_url_new): Wrapper around camel_url_new_with_base now.
Removed the CamelException since no one ever used it...

* tests/Makefile.am: add misc subdir

* tests/misc/url.c: relative URL test cases from RFC 1808

* camel-session.c (camel_session_get_service): Update
camel_url_new call.

23 years agoDon't use copy_to if the source folder doesn't support summary info's.
Jeffrey Stedfast [Sun, 25 Mar 2001 08:25:49 +0000 (08:25 +0000)]
Don't use copy_to if the source folder doesn't support summary info's.

2001-03-25  Jeffrey Stedfast  <fejj@ximian.com>

* camel-filter-driver.c (do_copy): Don't use copy_to if the source
folder doesn't support summary info's.
(do_move): Same.
(camel_filter_driver_filter_message): And again here.  I think
this will fix the problem of "colour" tags not staying with the
message when it's copied to a folder during the filter process.

23 years agoDo charset conversion on the username param here if needed.
Jeffrey Stedfast [Sun, 25 Mar 2001 00:27:34 +0000 (00:27 +0000)]
Do charset conversion on the username param here if needed.

2001-03-24  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl-digest-md5.c (digest_response): Do charset conversion
on the username param here if needed.
(parse_server_challenge): Protect against possibly empty-string
charset values.

23 years agoAdded. Call me old-fashioned, but I just prefer to have a real API rather
Jon Trowbridge [Fri, 23 Mar 2001 09:39:35 +0000 (09:39 +0000)]
Added. Call me old-fashioned, but I just prefer to have a real API rather

2001-03-23  Jon Trowbridge  <trow@ximian.com>

        * gui/widgets/e-minicard-widget.c (e_minicard_widget_set_card):
        Added.  Call me old-fashioned, but I just prefer to have a real
        API rather than doing everything via gtk_object_get/set-type
        calls.
        (e_minicard_widget_set_arg): Changed to call
        e_minicard_widget_set_card.

        * backend/ebook/e-book-util.c: Small changes to get rid of
        compiler warnings.  (Casting out const, removed unused variables,
        etc.)  Removed some debugging messages.

        * gui/component/addressbook-factory.c (main): Added call
        to e_address_popup_factory_init.

        * gui/component/e-address-popup.c: Added.  A popup gadget that is
        invoked (as a bonobo control) when an address is left-clicked in
        the mailer.  The addressbook is queries, and the address is either
        displayed as a minicard (if it already exists) or in a "generic
        format".  A button is provided for editting/adding the contact.
        Some of the semantics of this widget are a bit... non-standard,
        because of bonobo issues.  I can't really seem to replicate
        popup-menu behavior because of how bonobo propogates events, etc.
        so I've tried to produce something that I think is non-annoying.
        YMMV.

2001-03-23  Jon Trowbridge  <trow@ximian.com>

        * mail-display.c (handle_embedded_address_object): #ifdef away
        some code I don't quite want to delete yet.
        (html_button_press_event): Remove some of Radek's placeholder
        code, replace it with code to create my AddressPopup bonobo
        control.

        * mail-format.c: Remove some obsolete code that if #ifdef-ed out
        a while ago.

        * mail-ops.c (send_queue_send): Strip out the X-Evolution-Identity
        header when sending.

2001-03-23  Jon Trowbridge  <trow@ximian.com>

        * camel-filter-driver.c (camel_filter_driver_filter_message):
        Don't call camel_mime_message_set_identity.  (The call is
        commented out, left over from some earlier experimentation that I
        want to be able to remember later...)

        * camel-mime-message.c (camel_mime_message_set_identity): Added.
        A function to set the X-Evolution-Identity header.

23 years agoDon't look at untagged responses other than "* BYE"...
Dan Winship [Thu, 22 Mar 2001 22:31:55 +0000 (22:31 +0000)]
Don't look at untagged responses other than "* BYE"...

* providers/imap/camel-imap-command.c (imap_read_response): Don't
look at untagged responses other than "* BYE"...
(camel_imap_response_free): ...do it here instead...
(camel_imap_response_free_without_processing): ...but not here.

* providers/imap/camel-imap-folder.c (camel_imap_folder_selected):
Remove the "EXISTS" line from the response so
camel_imap_response_free won't try to process it.
(camel_imap_folder_selected): If we get an EXISTS response mixed
in with the FETCH responses, record the new EXISTS value.
Use camel_imap_response_free_without_processing so that an EXISTS
response won't cause a loop.
(imap_rescan): Use camel_imap_response_free_without_processing.
(imap_update_summary): Use
camel_imap_response_free_without_processing. If an EXISTS response
shows up, call imap_update_summary again to get the new messages.
(imap_protocol_get_summary_specifier): Use BODY.PEEK[0], not
RFC822.HEADER for prev IMAP4rev1, since the FETCH parser won't
deal with RFC822.HEADER responses.

* providers/imap/camel-imap-store.c (get_folder_info): Fix an
uninitialized variable

23 years agoadd a "GList *authtypes", so you can get the list of authtypes used by a
Dan Winship [Wed, 21 Mar 2001 22:20:29 +0000 (22:20 +0000)]
add a "GList *authtypes", so you can get the list of authtypes used by a

* camel-provider.h: (CamelProvider) add a "GList *authtypes", so
you can get the list of authtypes used by a provider without
needing to have an actual CamelService object handy. (Will be
needed by the new config druid.)
(CAMEL_PROVIDER_ALLOWS, CAMEL_PROVIDER_NEEDS): New macros to test
the URL part stuff, since the way it works is too complicated and
everyone always does it wrong.

* camel-service.c (camel_service_query_auth_types): Remove the
@connected arg again: if you don't want to connect, you can just
get the list of authtypes off the provider.
(camel_service_free_auth_types): Remove this. All existing
implementations do authtypes the same way, so just say the caller
should "g_list_free" the list. (Oh, look, removing this function
doesn't actually cause the mailer to not build. How 'bout that.)
(construct, get_path): Use the new URL part macros.

* camel-remote-store.c (remote_query_auth_types): Update
(remote_free_auth_types): Nuke
(camel_remote_store_authtype_list): New function for use by
subclasses.

* providers/imap/camel-imap-provider.c:
* providers/pop3/camel-pop3-provider.c:
* providers/smtp/camel-smtp-provider.c: Update CamelProvider
structures.
(camel_provider_module_init): Put all the SSL parts together so
there's only 1 #ifdef. Set up the provider authtypes field using
the SASL, CamelRemoteStore, and standard authtypes, as
appropriate. Copy that from the normal provider to the SSL
provider.

* providers/local/camel-local-provider.c:
* providers/sendmail/camel-sendmail-provider.c:
* camel-session.c: Update CamelProvider structures.

* providers/imap/camel-imap-store.c (query_auth_types):
* providers/pop3/camel-pop3-store.c (query_auth_types): Update

* providers/smtp/camel-smtp-store.c (query_auth_types): Update.
Remove the no_authtype, because that's what "ALLOW_AUTH" rather
than "NEED_AUTH" means.
(free_auth_types): Nuke.

23 years agoReturn -1 on fail. (camel_filter_driver_filter_folder): Same.
Jeffrey Stedfast [Wed, 21 Mar 2001 21:45:26 +0000 (21:45 +0000)]
Return -1 on fail. (camel_filter_driver_filter_folder): Same.

2001-03-21  Jeffrey Stedfast  <fejj@ximian.com>

* camel-filter-driver.c (camel_filter_driver_filter_message):
Return -1 on fail.
(camel_filter_driver_filter_folder): Same.
(camel_filter_driver_filter_mbox): Same.
(camel_filter_driver_filter_folder): Return -1 if an exception was
set as well.

2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
Free the expected host.
(camel_tcp_stream_openssl_new): Now takes a Service and an
expected_host. Set them.

23 years agoFunction to check if the store is online and set an exception if not.
Dan Winship [Tue, 20 Mar 2001 17:38:46 +0000 (17:38 +0000)]
Function to check if the store is online and set an exception if not.

* providers/imap/camel-imap-store.c
(camel_imap_store_check_online): Function to check if the store is
online and set an exception if not. Currently controlled by an
environment variable, but eventually there will be both a global
(session-level) setting and a per-store setting.
(construct): Set up storage_path and base_url here rather than at
connect-time.
(imap_auth_loop): Split out from imap_connect.
(imap_setup_online): Split out from imap_connect. Do the
post-authentication connection setup, and cache the results to
disk.
(imap_setup_offline): Set up a CamelImapStore with information
saved from a previous imap_setup_online.
(imap_connect): If online, do connect_to_server(),
imap_auth_loop(), and imap_setup_online(). Otherwise, do
imap_setup_offline().
(get_folder, get_folder_info): Add offline support.
(create_folder, subscribe_folder, unsubscribe_folder): Disable
these when offline (for now).

* providers/imap/camel-imap-folder.c (camel_imap_folder_new):
Remove the sync'ing-with-server stuff... it's done by
camel_imap_folder_selected now, which only gets called if the
store is online.
(camel_imap_folder_selected): add the code removed from
camel_imap_folder_new. Besides simplifying the folder_new and
summary_new code, this also means now that we'll DTRT if a
folder's UIDVALIDITY changes while we're connected. Also, when
that happens, clear the message cache explicitly.
(imap_refresh_info, imap_sync): These are no-ops when offline.
(imap_expunge, imap_append_message, imap_copy_message_to,
imap_search_by_expression): These don't yet work offline.
(imap_get_message, camel_imap_folder_fetch_data): Return an error
when trying to fetch a non-cached body part when we're offline.

* providers/imap/camel-imap-summary.c (camel_imap_summary_new):
Rewrite to not check the validity here. (We'll do it from
camel_imap_folder_selected instead.)

* providers/imap/camel-imap-command.c (camel_imap_command): Call
camel_imap_folder_selected even when the selection is all we're
doing, to match the changes in camel-imap-folder.c.

* providers/imap/camel-imap-message-cache.c
(camel_imap_message_cache_clear): New function to clear out a
message cache.

23 years agoAdded $(EXTRA_GNOME_CFLAGS)
Christopher James Lahey [Tue, 20 Mar 2001 04:45:39 +0000 (04:45 +0000)]
Added $(EXTRA_GNOME_CFLAGS)

2001-03-19  Christopher James Lahey  <clahey@ximian.com>

* Makefile.am (INCLUDES): Added $(EXTRA_GNOME_CFLAGS)

23 years agoSet the errbuf to NULL after freeing it? I don't think this should fix bug
Jeffrey Stedfast [Mon, 19 Mar 2001 06:46:11 +0000 (06:46 +0000)]
Set the errbuf to NULL after freeing it? I don't think this should fix bug

2001-03-19  Jeffrey Stedfast  <fejj@ximian.com>

* providers/pop3/camel-pop3-store.c (pop3_connect): Set the errbuf
to NULL after freeing it? I don't think this should fix bug #1801
but I guess it can't hurt.

23 years agoProtect against a possibly NULL exception.
Jeffrey Stedfast [Mon, 19 Mar 2001 02:21:44 +0000 (02:21 +0000)]
Protect against a possibly NULL exception.

2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>

* camel-remote-store.c (remote_recv_line): Protect against a
possibly NULL exception.

23 years agoDocument and modify to return a boolean value denoting whether or not
Jeffrey Stedfast [Mon, 19 Mar 2001 01:34:50 +0000 (01:34 +0000)]
Document and modify to return a boolean value denoting whether or not

2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>

* camel-filter-driver.c (camel_filter_driver_filter_message):
Document and modify to return a boolean value denoting whether or
not errors occured during processing.
(camel_filter_driver_filter_mbox): Same as above and also modified
to check return codes of filter_message rather than relying only
on whether or not the exception was set (as it's possible to pass
in NULL for the exception).
(camel_filter_driver_filter_folder): Same as above.

* camel-mime-utils.c (header_param_list_format_append): Quote the
param value if it contains whitespace as well.

23 years agoQuote the param value if it contains whitespace as well.
Jeffrey Stedfast [Mon, 19 Mar 2001 00:22:29 +0000 (00:22 +0000)]
Quote the param value if it contains whitespace as well.

2001-03-18  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_param_list_format_append): Quote the
param value if it contains whitespace as well.

23 years agoDon't include system include dir.
Jeffrey Stedfast [Sat, 17 Mar 2001 22:13:19 +0000 (22:13 +0000)]
Don't include system include dir.

2001-03-17  Jeffrey Stedfast <fejj@ximian.com>

* Makefile.am: Don't include system include dir.

* camel.c: Use quotes around the nss.h include so it doesn't try
to use the systen nss.h file.

* camel-tcp-stream-ssl.c: Same here.

23 years agoModified patch from Dan Berger <dberger@ix.netcom.com> to re-check the
Not Zed [Sat, 17 Mar 2001 09:25:29 +0000 (09:25 +0000)]
Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check the

2001-03-17  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-maildir-summary.c (maildir_summary_sync):
        Modified patch from Dan Berger <dberger@ix.netcom.com> to re-check
        the maildir directory for new/updated messages at sync time.

23 years agoImplemented. (ref_message_info): And default implementation.
Not Zed [Sat, 17 Mar 2001 04:51:21 +0000 (04:51 +0000)]
Implemented. (ref_message_info): And default implementation.

2001-03-17  Not Zed  <NotZed@Ximian.com>

        * camel-folder.c (camel_folder_ref_message_info): Implemented.
        (ref_message_info): And default implementation.

        * camel-folder.h: Added ref_message_info virtual method.

2001-03-16  Not Zed  <NotZed@Ximian.com>

        * camel-folder-thread.c
        (camel_folder_thread_messages_new_summary): New function to create
        a thread tree from a supplied summary array.
        (camel_folder_thread_messages_destroy): Handle thread trees
        generated by the above function properly.

23 years agoSame.
Jeffrey Stedfast [Sat, 17 Mar 2001 00:52:11 +0000 (00:52 +0000)]
Same.

2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>

* camel-private.h: Same.

* camel-remote-store.h: Fixed #include to use <>'s instead of ""'s

23 years agoremoved camel-stream-ssl.c and camel-stream-ssl.h
Jeffrey Stedfast [Fri, 16 Mar 2001 23:06:49 +0000 (23:06 +0000)]
removed camel-stream-ssl.c and camel-stream-ssl.h

23 years agoPrint info about the issuer of the certificate.
Jeffrey Stedfast [Fri, 16 Mar 2001 23:02:04 +0000 (23:02 +0000)]
Print info about the issuer of the certificate.

2001-03-16  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.c (ssl_bad_cert): Print info about the
issuer of the certificate.

* providers/smtp/camel-smtp-transport.c (smtp_connect): Use
camel_tcp_stream_get_socket().

* camel-tcp-stream-openssl.c (stream_get_socket): Implemented.

* camel-tcp-stream-ssl.c (stream_get_socket): Implemented.

* camel-tcp-stream-raw.c (stream_get_socket): Implemented.

* camel-tcp-stream.c (camel_tcp_stream_get_socket): New function.

23 years agoAdded #include <config.h>
Kjartan Maraas [Fri, 16 Mar 2001 19:55:17 +0000 (19:55 +0000)]
Added #include <config.h>

2001-03-16  Kjartan Maraas  <kmaraas@gnome.org>

* providers/pop3/camel-pop3-folder.c: Added #include <config.h>

23 years agoDon't use getdomainname: it's NIS crap, not DNS.
Dan Winship [Fri, 16 Mar 2001 17:17:30 +0000 (17:17 +0000)]
Don't use getdomainname: it's NIS crap, not DNS.

* camel-mime-utils.c (header_msgid_generate): Don't use
getdomainname: it's NIS crap, not DNS.

23 years agoDon't use the hardcoded cert db directory, use the one passed in.
Jeffrey Stedfast [Fri, 16 Mar 2001 04:41:49 +0000 (04:41 +0000)]
Don't use the hardcoded cert db directory, use the one passed in.

2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>

* camel.c (camel_init): Don't use the hardcoded cert db directory,
use the one passed in.

* camel-tcp-stream-ssl.c (ssl_get_client_auth): Wrote the default
implementation. Not that we'll use this though, since this is the
default implementation provided by NSS anyway. This more or less
serves as a reference in case we want to change anything.
(ssl_auth_cert): Same.
(ssl_bad_cert): Changed the prompt string and free it when we're
done.

23 years agotranslate NIL to "" in fetch body part response
Dan Winship [Thu, 15 Mar 2001 21:09:54 +0000 (21:09 +0000)]
translate NIL to "" in fetch body part response

23 years ago First batch of disconnected IMAP-related stuff. This adds local
Dan Winship [Thu, 15 Mar 2001 20:50:59 +0000 (20:50 +0000)]
First batch of disconnected IMAP-related stuff. This adds local
caching of message parts, but NOT any actual disconnected support.
(But it should speed up IMAP use.)

* providers/imap/camel-imap-message-cache.c: New class for caching
message data to disk, and removing it when it's no longer
relevant. Will eventually also support merging message parts
together to save on files. Or maybe using a db instead of files?

* providers/imap/camel-imap-private.h: Add a cache_lock to
CamelImapFolderPrivate. This lock must be recursive, so make both
locks EMutexes rather than GMutex.

* providers/imap/camel-imap-folder.c (parse_fetch_response): "The
only FETCH response parser you need!" Replaces the various
almost-correct bits of code formerly scattered throughout this
file with a single fully-correct function that can handle any
FETCH response at any time, so we don't get confused by seeing a
flags update when we were only expecting a message body, etc.
(camel_imap_folder_fetch_data): FETCH a message body part either
from the cache or the server
(camel_imap_folder_changed): Remove expunged messages from the
message cache.
(camel_imap_folder_new): Change to take a directory instead of a
summary file name. Create a CamelImapMessageCache for the folder.
(imap_finalize): Unref the message cache.
(camel_imap_folder_selected, imap_rescan, get_content,
get_message, imap_get_message, imap_update_summary): Redone a
bunch to use parse_fetch_data, CamelImapMessageCache, etc.

* providers/imap/camel-imap-store.c (get_folder): Pass directory
name to camel_imap_folder_new, not summary filename. Use
e_path_to_physical to generate a path with /subfolders/ inserted
between directory components.

* providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new):
Call camel_imap_folder_fetch_data (with cache_only TRUE) and if
the data is cached, return an online datawrapper rather than an
offline one.
(write_to_stream): Use camel_imap_folder_fetch_data (with
cache_only FALSE) here too

* providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from
skip_list and made non-static.

23 years agoUninclude prnetdb.h since it's not needed here.
Jeffrey Stedfast [Thu, 15 Mar 2001 17:50:46 +0000 (17:50 +0000)]
Uninclude prnetdb.h since it's not needed here.

2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.h: Uninclude prnetdb.h since it's not
needed here.

* providers/smtp/camel-smtp-transport.c: #include prnetdb.h here
instead of making camel-tcp-stream-ssl.h include it. Prevents some
header bloat.

* providers/smtp/Makefile.am: Include the NSPR_CFLAGS and
NSS_CFLAGS.

23 years agoUpdate for using CamelTcpStreams and also for using SSL.
Jeffrey Stedfast [Thu, 15 Mar 2001 04:21:24 +0000 (04:21 +0000)]
Update for using CamelTcpStreams and also for using SSL.

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (smtp_connect): Update for
using CamelTcpStreams and also for using SSL.

* providers/smtp/libcamelsmtp.urls: defined "ssmtp"

* providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
provider.
(camel_provider_module_init): Register the Secure SMTP provider.

23 years agodefined "ssmtp"
Jeffrey Stedfast [Thu, 15 Mar 2001 03:32:50 +0000 (03:32 +0000)]
defined "ssmtp"

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/libcamelsmtp.urls: defined "ssmtp"

* providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP
provider.
(camel_provider_module_init): Register the Secure SMTP provider.

23 years agoalso change the protocol name in the providers
Jeffrey Stedfast [Thu, 15 Mar 2001 03:26:31 +0000 (03:26 +0000)]
also change the protocol name in the providers

23 years agoCheck for "simap" instead of "imaps".
Jeffrey Stedfast [Thu, 15 Mar 2001 03:25:22 +0000 (03:25 +0000)]
Check for "simap" instead of "imaps".

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-store.c (imap_connect): Check for
"simap" instead of "imaps".

* providers/pop3/camel-pop3-store.c (pop3_connect): Change the
port to be 995 for spop.

* providers/pop3/libcamelpop3.urls: Change to "spop".

* providers/imap/libcamelimap.urls: Change "imaps" to "simap" to
correspond to /etc/services.

23 years agoCheck to see if we are using "pops" and then set the appropriate SSL
Jeffrey Stedfast [Thu, 15 Mar 2001 03:08:47 +0000 (03:08 +0000)]
Check to see if we are using "pops" and then set the appropriate SSL

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* providers/pop3/camel-pop3-store.c (pop3_connect): Check to see
if we are using "pops" and then set the appropriate SSL settings.

* providers/pop3/libcamelpop3.urls: Add "pops"

* providers/pop3/camel-pop3-provider.c: Defined the pops provider.
(camel_provider_module_init): Register the pops provider.

23 years agoYa know what? Lets not ref the service because otherwise we'll start
Jeffrey Stedfast [Thu, 15 Mar 2001 02:56:06 +0000 (02:56 +0000)]
Ya know what? Lets not ref the service because otherwise we'll start

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_new): Ya know what?
Lets not ref the service because otherwise we'll start having the
same problems we had back with vtrash. Besides, since the store
owns the stream, it's not like the store is going anywhere without
the stream anyway.
(camel_tcp_stream_ssl_finalize): No need to unref the service.

23 years agoPass the service into the SSL stream, not the session.
Jeffrey Stedfast [Thu, 15 Mar 2001 02:33:34 +0000 (02:33 +0000)]
Pass the service into the SSL stream, not the session.

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-remote-store.c (remote_connect): Pass the service into the
SSL stream, not the session.

* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_init): Set the
service to NULL.
(camel_tcp_stream_ssl_finalize): Unref the service.
(camel_tcp_stream_ssl_new): Takes a CamelService arg now rather
than a CamelSession arg.

23 years agoSo it turns out that NSS_Init *isn't* idempotent, so we have to protect
Jeffrey Stedfast [Thu, 15 Mar 2001 01:59:00 +0000 (01:59 +0000)]
So it turns out that NSS_Init *isn't* idempotent, so we have to protect

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel.c (camel_init): So it turns out that NSS_Init *isn't*
idempotent, so we have to protect against initializing it more
than once(contrary to what their design specs suggest).

* camel-session.c (camel_session_get_service): Use
camel_exception_is_set() - Makes no difference but it's more
consistant with how we normally do it.

* camel-provider.h (CAMEL_URL_ALLOW_SSL): We don't need this.

* providers/imap/camel-imap-provider.c: Define the imaps provider.
(camel_provider_module_init): Register the imaps provider.

* camel-provider.c (camel_provider_init): Only add the protocol to
the hash table if it's non empty. Also, g_strdup() the filename
into the hash table.

* providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
So the service's URL isn't set until after this is
initialized. This means we can't check for SSL here.
(imap_connect): Set the SSL options here instead.

23 years agoEek! So the service's URL isn't set until after this is initialized. This
Jeffrey Stedfast [Thu, 15 Mar 2001 00:51:09 +0000 (00:51 +0000)]
Eek! So the service's URL isn't set until after this is initialized. This

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-store.c (camel_imap_store_init): Eek!
So the service's URL isn't set until after this is
initialized. This means we can't check for SSL here.
(imap_connect): Set the SSL options here instead.

23 years agoNumerous fixes to get it to build correctly with NSS enabled.
Jeffrey Stedfast [Wed, 14 Mar 2001 21:59:40 +0000 (21:59 +0000)]
Numerous fixes to get it to build correctly with NSS enabled.

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.c: Numerous fixes to get it to build
correctly with NSS enabled.

* camel-remote-store.c (remote_connect): Pass in the session and
expected host args, oops.

* camel-provider.h (CAMEL_URL_ALLOW_SSL): Defined.

* providers/imap/camel-imap-store.c (camel_imap_store_init): Check
to see if we are supposed to use SSL and set the options
accordingly.
(imap_connect): Return FALSE here instead of NULL.

* providers/imap/camel-imap-provider.c: Add CAMEL_URL_ALLOW_SSL.

* providers/imap/libcamelimap.urls: Add "imaps" which is the
protocol for Secure IMAP.

23 years agoAdded
Jeffrey Stedfast [Wed, 14 Mar 2001 19:53:12 +0000 (19:53 +0000)]
Added

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-openssl.[c,h]: Added

* Makefile.am: Added camel-tcp-stream-openssl.[c,h] to the build.

* camel-types.h: Added CamelTcpStreamSSL and CamelTcpStreamOpenSSL

23 years agore-constify inbuf, to remove a warning.
Not Zed [Wed, 14 Mar 2001 07:06:54 +0000 (07:06 +0000)]
re-constify inbuf, to remove a warning.

2001-03-14  Not Zed  <NotZed@Ximian.com>

* camel-mime-filter-charset.c (filter, complete): re-constify
inbuf, to remove a warning.

* camel-mime-parser.c (folder_scan_step): When we're out of data,
run the filter_complete.  For some reason the logic that was there
was never being run, always try it now, i think it was to work
around a buggy filter, rather than fix it the right way.

* camel-folder-summary.c (summary_build_content_info): If indexing
html parts, use the html filter to convert it to some indexable
format.
(summary_build_content_info): Reset the filters before adding them
back to the stream, if they get re-used in a given instance
(likely).

* Makefile.am (libcamelinclude_HEADERS): Added
camel-mime-filter-html.[ch].
(INCLUDES): Added xml clags

2001-03-05  Not Zed  <NotZed@Ximian.com>

* camel-folder-search.c (camel_folder_search_class_init): Setup a
new function, "uid" which matches uids.
(search_uid): Implement the "match uid" command.

23 years agoCheck for a new type of mailing list header.
Jeffrey Stedfast [Wed, 14 Mar 2001 06:16:28 +0000 (06:16 +0000)]
Check for a new type of mailing list header.

2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c: Check for a new type of mailing list header.

23 years agoMade cancellable. (stream_write): Same. (stream_connect): Removed checks
Jeffrey Stedfast [Wed, 14 Mar 2001 04:31:58 +0000 (04:31 +0000)]
Made cancellable. (stream_write): Same. (stream_connect): Removed checks

2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-raw.c (stream_read): Made cancellable.
(stream_write): Same.
(stream_connect): Removed checks for DIVINE_INTERVENTION as the
code worked fine.

* camel-tcp-stream-ssl.c (stream_write): get rid of 'w' as it
wasn't really needed.
(set_errno): New function to set errno based on the NSPR error
code.
(stream_read): If an error occured, call set_errno().
(stream_write): Same.

23 years agoAdded camel-tcp-stream-ssl to the build.
Jeffrey Stedfast [Wed, 14 Mar 2001 03:42:07 +0000 (03:42 +0000)]
Added camel-tcp-stream-ssl to the build.

2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

* Makefile.am: Added camel-tcp-stream-ssl to the build.

* camel-remote-store.h: Add a use_ssl member to the
CamelRemoteStore object.

23 years agoOops. Make this a subclass of CamelTcpStream, not CamelStream.
Jeffrey Stedfast [Wed, 14 Mar 2001 00:46:59 +0000 (00:46 +0000)]
Oops. Make this a subclass of CamelTcpStream, not CamelStream.

2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_get_type):
Oops. Make this a subclass of CamelTcpStream, not CamelStream.

* camel-types.h: Add the defs for CamelTcpStream and
CamelTcpStreamRaw

* Makefile.am: Add camel-tcp-stream and camel-tcp-stream-raw to
the build.

* camel-remote-store.c (remote_connect): Update to use
CamelTcpStreams.

* camel-tcp-stream-raw.c (stream_connect): Made cancellable by
copying the currently used code in camel-remote-store.c.
(stream_setsockopt): Oops, flags = fcntl (..., GET_FL);
(camel_tcp_stream_raw_get_type): Oops. Make this a subclass of
CamelTcpStream, not CamelStream.

23 years agoSince all of the Mozilla libs (including NSPR and NSS) correctly handle
Jeffrey Stedfast [Tue, 13 Mar 2001 23:31:32 +0000 (23:31 +0000)]
Since all of the Mozilla libs (including NSPR and NSS) correctly handle

2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

* camel.c (camel_init): Since all of the Mozilla libs (including
NSPR and NSS) correctly handle reinitializations, we might as well
init both NSPR and NSS in camel_init so we can be sure of that
these libs have been initialized.
(camel_shutdown): New function to call the NSS cleanup stuff.

23 years agoDon't allow the user to copy a message to or from the vtrash folder. Set
Jeffrey Stedfast [Tue, 13 Mar 2001 18:59:32 +0000 (18:59 +0000)]
Don't allow the user to copy a message to or from the vtrash folder. Set

2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>

* camel-folder.c (camel_folder_copy_message_to): Don't allow the
user to copy a message to or from the vtrash folder. Set an
exception if they try.
(camel_folder_move_message_to): This one is a bit more
complicated: 1) If the user tried to move a message from the
vtrash into the original folder, just undelete the message. 2) If
the user tries to move the message to the vtrash folder, then just
mark the message as deleted. 3) If the user tries to move the
message from the vTrash to a folder other than the original, use
the original folder as the source. As another optimization, I've
made it so that if the user tries to move a message to the same
folder, just no-op.
(move_message_to): Unset the deleted flag before moving (assuming
it's there).
(copy_message_to): Same.

* camel-vee-folder.c (camel_vee_folder_get_message_folder): New
convenience function to get the folder from which the message uid
is derived from.

23 years agoWhen trying again after a failed password attempt, check if the connection
Dan Winship [Tue, 13 Mar 2001 17:47:02 +0000 (17:47 +0000)]
When trying again after a failed password attempt, check if the connection

* providers/imap/camel-imap-store.c (imap_connect): When trying
again after a failed password attempt, check if the connection got
dropped (which Courier will do) and deal accordingly.

23 years agoMore fixing for exim: It can't deal with "-tif", you need to say "-t -i
Dan Winship [Tue, 13 Mar 2001 17:26:56 +0000 (17:26 +0000)]
More fixing for exim: It can't deal with "-tif", you need to say "-t -i

* providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
sendmail_send): More fixing for exim: It can't deal with "-tif",
you need to say "-t -i -f".

23 years agoRename the folder to "Trash" and i18nify it.
Jeffrey Stedfast [Mon, 12 Mar 2001 20:33:58 +0000 (20:33 +0000)]
Rename the folder to "Trash" and i18nify it.

2001-03-12  Jeffrey Stedfast  <fejj@ximian.com>

* camel-store.c (init_trash): Rename the folder to "Trash" and
i18nify it.

23 years agoComment out everything unless HAVE_NSS is defined.
Jeffrey Stedfast [Sun, 11 Mar 2001 04:35:20 +0000 (04:35 +0000)]
Comment out everything unless HAVE_NSS is defined.

2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>

* camel-tcp-stream-ssl.h: Comment out everything unless HAVE_NSS
is defined.

* camel-tcp-stream-ssl.c (stream_read): Don't use errno, use
nspr's error code stuff.
(stream_write): Same.

23 years agoCreated a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt
Jeffrey Stedfast [Sat, 10 Mar 2001 00:15:49 +0000 (00:15 +0000)]
Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt

2001-03-09  Jeffrey Stedfast  <fejj@ximian.com>

* camel-session.c (camel_session_query_authenticator): Created a
new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to
the user. This will be needed by the SSL/TLS code to come. Also
changed the return value to a gpointer rather than a char* to
allow the returning of TRUE/FALSE values.

* camel.c: Wrap stuff with HAVE_NSS

23 years agoRemove the "-U" for now, because it breaks exim's "sendmail" wrapper. (And
Dan Winship [Fri, 9 Mar 2001 21:53:05 +0000 (21:53 +0000)]
Remove the "-U" for now, because it breaks exim's "sendmail" wrapper. (And

* providers/sendmail/camel-sendmail-transport.c (sendmail_send,
sendmail_send_to): Remove the "-U" for now, because it breaks
exim's "sendmail" wrapper. (And it doesn't actually do all that
much to sendmail's behavior, and it was working fine before
anyway.)

23 years agoFix a bug that could make this walk off the end of a string. (The bug has
Dan Winship [Fri, 9 Mar 2001 20:36:12 +0000 (20:36 +0000)]
Fix a bug that could make this walk off the end of a string. (The bug has

* camel-mime-utils.c (header_fold): Fix a bug that could make this
walk off the end of a string. (The bug has been there since
December... maybe this will fix some unreproduceable crashes?)

23 years agoChanges so that the folder gets added to the vtrash reguardless of whether
Jeffrey Stedfast [Thu, 8 Mar 2001 23:33:32 +0000 (23:33 +0000)]
Changes so that the folder gets added to the vtrash reguardless of whether

2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>

* camel-store.c (camel_store_get_folder): Changes so that the
folder gets added to the vtrash reguardless of whether or not the
store is holding it's own folder lookup hash.
(init_trash): Oops, lets try locking the cache before we go and
add all the cached folders to the vtrash.

23 years agoThese fixes make it so that the CamelStore does not actually hold a ref on
Jeffrey Stedfast [Thu, 8 Mar 2001 20:01:42 +0000 (20:01 +0000)]
These fixes make it so that the CamelStore does not actually hold a ref on

2001-03-08  Jeffrey Stedfast  <fejj@ximian.com>
These fixes make it so that the CamelStore does not actually hold
a ref on it's vTrash folder. The vTrash folder is now created ONLY
when it is requested. This solves the problem of not being able to
unref a Store and have it disconnect/finalize like we expect it to.

* camel-store.c (init_trash): When we create the vtrash, add all
previously opened folders to it and hook on to the finalize event
so that we can then set the store->vtrash to NULL.
(get_trash): If a vtrash folder for the store doesn't exist,
init_trash() and then try.
(construct): No longer need this.
(camel_store_class_init): Don't override the construct method.
(camel_store_finalize): We no longer hold a ref on the vtrash so
don't unref it.

23 years agoImplement. (get_trash): Implement. (camel_pop3_store_class_init): Override
Jeffrey Stedfast [Thu, 8 Mar 2001 03:43:33 +0000 (03:43 +0000)]
Implement. (get_trash): Implement. (camel_pop3_store_class_init): Override

2001-03-07  Jeffrey Stedfast  <fejj@ximian.com>

* providers/pop3/camel-pop3-store.c (init_trash): Implement.
(get_trash): Implement.
(camel_pop3_store_class_init): Override the default init_trash and
get_trash virtual functions. Hopefully this should fix the problem
of pop3 sotre's not disconnecting after the send&recv code
finishes downloading mail.

Wonder if I should override the default implementation for the
mbox, mh, and maildir too?

23 years ago (remote_recv_line): Fix another problem...
Dan Winship [Wed, 7 Mar 2001 21:30:22 +0000 (21:30 +0000)]
(remote_recv_line): Fix another problem...

23 years agoRemove some unused stuff
Dan Winship [Wed, 7 Mar 2001 15:48:30 +0000 (15:48 +0000)]
Remove some unused stuff

* providers/local/camel-mbox-provider.c:
* providers/vee/.cvsignore:
* providers/vee/libcamelvee.urls: Remove some unused stuff

23 years agoReturn the return value of camel_service_connect rather than returning
Dan Winship [Wed, 7 Mar 2001 15:28:33 +0000 (15:28 +0000)]
Return the return value of camel_service_connect rather than returning

* camel-remote-store.c (camel_remote_store_connected): Return the
return value of camel_service_connect rather than returning
!camel_exception_is_set(), since that will be wrong if ex==NULL...
Fixes a crash in the IMAP keepalive code, but this same problem
probably exists in other places too...

23 years agoRedone so as to save on memory allocations and speed.
Jeffrey Stedfast [Tue, 6 Mar 2001 21:34:56 +0000 (21:34 +0000)]
Redone so as to save on memory allocations and speed.

2001-03-06  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl-digest-md5.c (compute_response): Redone so as to save
on memory allocations and speed.

23 years agoDon't return NULL if the token is non-NULL. This is why:
Jeffrey Stedfast [Mon, 5 Mar 2001 21:28:08 +0000 (21:28 +0000)]
Don't return NULL if the token is non-NULL. This is why:

2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl-plain.c (plain_challenge): Don't return NULL if the
token is non-NULL. This is why:

sending : AUTH PLAIN
        received: 334 ok. go on.                 <-- this is why
        sending : ZGZPaQpAZ214Lm5ldBBnb29jYXI=
        received: 235 {mp005-rz3} go ahead

* camel-sasl.c (camel_sasl_authtype): Add the PLAIN type here.
(camel_sasl_authtype_list): And here too.

* camel-sasl-plain.c: Initialize the camel_sasl_plain_authtype.

* camel-sasl-plain.h: extern the camel_sasl_plain_authtype.

23 years agoi18n'd some strings in here.
Jeffrey Stedfast [Mon, 5 Mar 2001 21:08:45 +0000 (21:08 +0000)]
i18n'd some strings in here.

2001-03-05  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-store.c (imap_connect): i18n'd some
strings in here.

* providers/smtp/camel-smtp-transport.c (smtp_connect): Keep
trying to authenticate until either we succeed or until the user
cancels.

23 years agoWrote a new version of header_fold() that takes a 'force' option and uses
Jeffrey Stedfast [Mon, 5 Mar 2001 04:02:38 +0000 (04:02 +0000)]
Wrote a new version of header_fold() that takes a 'force' option and uses

2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c: Wrote a new version of header_fold() that
takes a 'force' option and uses another new function called
header_fold_next_space() in place of strchr(inptr, ' ') to get the
next whitespace char. The idea of header_fold_next_space() is to
not treat spaces between a set of quotes as a space - this way it
will be possible to fold (for example) the Content-Type MIME
header without worrying about breaking up a boundary string.
Note: This code is #if 0'd out until Zucchi approves of the patch.
Another Note: We will probably still want to use the "don't fold
this header" hash lookup for headers like the Message-Id and
possibly a few others.

23 years agoMake sure there is a space between the name and the address tokens.
Jeffrey Stedfast [Mon, 5 Mar 2001 02:43:44 +0000 (02:43 +0000)]
Make sure there is a space between the name and the address tokens.

2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>

* camel-internet-address.c
(camel_internet_address_encode_address): Make sure there is a
space between the name and the address tokens.

23 years agoencoded string segments need to be at least 8 chars (7 doesn't leave room
Jeffrey Stedfast [Mon, 5 Mar 2001 00:37:44 +0000 (00:37 +0000)]
encoded string segments need to be at least 8 chars (7 doesn't leave room

2001-03-04  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (rfc2047_decode_word): encoded string
segments need to be at least 8 chars (7 doesn't leave room for an
ecoding value. To be more realistic, even 8 chars isn't enough as
this assumes there is no charset nor any encoded text. If the
encoding value is not 'Q' or 'B', then return NULL. This fixes bug
#1689.

23 years agoNew function to remove a folder from a vfolder.
Not Zed [Fri, 2 Mar 2001 23:37:43 +0000 (23:37 +0000)]
New function to remove a folder from a vfolder.

2001-03-03  Not Zed  <NotZed@Ximian.com>

        * camel-vee-folder.c (vee_folder_remove_folder): New function to
        remove a folder from a vfolder.
        (camel_vee_folder_remove_folder): New public function to remove a
        folder from a vfolder.

23 years agoDoh! Set the CAMEL_URL_ALLOW_AUTH flag.
Jeffrey Stedfast [Fri, 2 Mar 2001 22:09:40 +0000 (22:09 +0000)]
Doh! Set the CAMEL_URL_ALLOW_AUTH flag.

2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-provider.c: Doh! Set the
CAMEL_URL_ALLOW_AUTH flag.

* providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
Updated with the extended AUTH return codes.

23 years agooops, forgot the changelog
Jeffrey Stedfast [Fri, 2 Mar 2001 19:40:08 +0000 (19:40 +0000)]
oops, forgot the changelog

23 years agoUpdated with the extended AUTH return codes.
Jeffrey Stedfast [Fri, 2 Mar 2001 19:37:02 +0000 (19:37 +0000)]
Updated with the extended AUTH return codes.

2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>

* providers/smtp/camel-smtp-transport.c (get_smtp_error_string):
Updated with the extended AUTH return codes.

23 years agooops, the return code is 235 on success, not 234
Jeffrey Stedfast [Fri, 2 Mar 2001 19:20:39 +0000 (19:20 +0000)]
oops, the return code is 235 on success, not 234

23 years agoDon't forget to unref the SASL object.
Jeffrey Stedfast [Fri, 2 Mar 2001 19:19:31 +0000 (19:19 +0000)]
Don't forget to unref the SASL object.

2001-03-02  Jeffrey Stedfast  <fejj@ximian.com>

* providers/imap/camel-imap-store.c (try_auth): Don't forget to
unref the SASL object.

* providers/smtp/camel-smtp-transport.c (query_auth_types):
Implemented.
(smtp_auth): Implemented.
(smtp_helo): Don't bother parsing the authtypes if we already have
them.
(smtp_connect): call smtp_auth() here if we found any authtypes.
(smtp_disconnect): Updated as I now use a hash table for the
supported authtypes rather than a linked list.
(esmtp_get_authtypes): modify to use a hash table instead of a
linked list and also use isspace() rather than == ' '.

23 years agoUse "-f" to set the envelope from address so bounces go to the right
Dan Winship [Fri, 2 Mar 2001 15:14:51 +0000 (15:14 +0000)]
Use "-f" to set the envelope from address so bounces go to the right

* providers/sendmail/camel-sendmail-transport.c (sendmail_send_to,
sendmail_send): Use "-f" to set the envelope from address so
bounces go to the right place. Also, pass "-U" since the man page
says we're supposed to...

23 years ago#include "camel-sasl-digest-md5.h" (camel_sasl_authtype_list): add
Jeffrey Stedfast [Fri, 2 Mar 2001 02:29:08 +0000 (02:29 +0000)]
#include "camel-sasl-digest-md5.h" (camel_sasl_authtype_list): add

2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl.c: #include "camel-sasl-digest-md5.h"
(camel_sasl_authtype_list): add DIGEST-MD5 stuff here.
(camel_sasl_authtype): And here too.
(camel_sasl_new): And here...

* camel-sasl-digest-md5.[c,h]: new SASL class for DIGEST-MD5 (has
been tested and proven to work).

23 years agoAdd an "authtypes" hash table to CamelImapStore recording the supported
Dan Winship [Thu, 1 Mar 2001 22:39:52 +0000 (22:39 +0000)]
Add an "authtypes" hash table to CamelImapStore recording the supported

* providers/imap/camel-imap-store.c: Add an "authtypes" hash table
to CamelImapStore recording the supported authtypes.
(connect_to_server): Record supported authtypes in the authtypes
hash rather than the capabilities bitmask, since now the IMAP code
is no longer responsible for keeping track of which authtypes we
support.
(query_auth_types): Use camel_sasl_authtype_list to get the
SASL-supported authtypes.
(try_auth): New function to try a SASL auth mechanism. Sort of
formerly imap_try_kerberos_v4_auth.
(imap_connect): Get rid of the krb4-specific bits and genericize
them for any SASL authtype.

* providers/imap/Makefile.am: Remove camel-imap-auth.[ch] (moved
into camel-imap-store.c since it's now constant size) and the
KRB4_CFLAGS and KRB4_LDFLAGS references.

23 years agoTake a GByteArray as input as well. Comment that you can pass %NULL for
Dan Winship [Thu, 1 Mar 2001 22:23:23 +0000 (22:23 +0000)]
Take a GByteArray as input as well. Comment that you can pass %NULL for

* camel-sasl.c (camel_sasl_challenge): Take a GByteArray as input
as well. Comment that you can pass %NULL for @token to get the
initial auth data for mechanisms that are client-initiated.
(camel_sasl_challenge_base64): Convenience function for protocols
that use base64-encoded SASL.
(camel_sasl_authenticated): Implement this... (it was prototyped
already)
(camel_sasl_new): Function to take a service name, a mechanism
name, and a CamelService, and return a CamelSasl for it.
(camel_sasl_authtype, camel_sasl_authtype_list): Functions to
return CamelServiceAuthType information about SASL mechanisms, to
allow providers to deal with them generically.

* camel-sasl-anonymous.c, camel-sasl-plain.c: Update/simplify for
CamelSasl changes. Both of these are single-round
(client-initiated) mechanisms, so they don't need to keep state.
(camel_sasl_plain_new): Removed; use camel_sasl_new instead.
(Can't get rid of camel_sasl_anonymous_new though...)

* camel-sasl-cram-md5.c: Update/simplify for CamelSasl changes.
(camel_sasl_cram_md5_new): Removed; use camel_sasl_new instead.
(cram_md5_challenge): Use md5_get_digest where possible, and
various other minor simplifications. CRAM-MD5 only has a single
round, so there's no need to keep track of state. This code is now
tested (against Cyrus IMAPd) and known to work.

* camel-sasl-kerberos4.h: Update/simplify for CamelSasl changes.
Make only a single #ifdef HAVE_KRB4. Remove stuff from priv that
isn't needed between rounds.
(camel_sasl_kerberos4_new): Removed; use camel_sasl_new instead
(krb4_challenge): Fix up the logic I broke in my previous "at
least make it compile" fixes, update to match other changes, and
remove IMAP-isms that shouldn't be in the generic code. This still
isn't tested, because we're stuck behind a NAT right now...

23 years agoDon't base64 encode the data, leave that up to the provider to do if it
Jeffrey Stedfast [Thu, 1 Mar 2001 18:15:23 +0000 (18:15 +0000)]
Don't base64 encode the data, leave that up to the provider to do if it

2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
data, leave that up to the provider to do if it needs to. Also
save on some memory allocations and stuff.

* camel-sasl-cram-md5.c (cram_md5_challenge): Same here. Also get
rid of the need for the temp buf as we can just write it to the
GByteArray.

23 years agoremove mime-utils header for base64 stuff.
Jeffrey Stedfast [Thu, 1 Mar 2001 18:04:07 +0000 (18:04 +0000)]
remove mime-utils header for base64 stuff.

23 years agoDon't base64 encode the data, leave that up to the provider to do if it
Jeffrey Stedfast [Thu, 1 Mar 2001 18:01:27 +0000 (18:01 +0000)]
Don't base64 encode the data, leave that up to the provider to do if it

2001-03-01  Jeffrey Stedfast  <fejj@ximian.com>

* camel-sasl-anonymous.c (anon_challenge): Don't base64 encode the
data, leave that up to the provider to do if it needs to. Also
save on some memory allocations and stuff.

* camel-sasl-cram-md5.c (cram_md5_challenge): Same here.

23 years agoReconstify variables to match iconv.
Not Zed [Thu, 1 Mar 2001 17:31:33 +0000 (17:31 +0000)]
Reconstify variables to match iconv.

2001-03-02  Not Zed  <NotZed@Ximian.com>

        * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
        Reconstify variables to match iconv.

        * camel-search-private.c (camel_ustrstrcase): Change some
        assertions back into valid returns.

23 years agocamel depends on krb4 now (where available), for camel-sasl-kerberos4.c
Dan Winship [Thu, 1 Mar 2001 17:16:32 +0000 (17:16 +0000)]
camel depends on krb4 now (where available), for camel-sasl-kerberos4.c

* Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on
krb4 now (where available), for camel-sasl-kerberos4.c

* camel-sasl-kerberos4.[ch]: Make this at least compile. Dunno if
it works yet.

23 years agoAssert url_string != NULL.
Peter Williams [Thu, 1 Mar 2001 06:15:03 +0000 (06:15 +0000)]
Assert url_string != NULL.

2001-03-01  Peter Williams  <peterw@ximian.com>

       * camel-url.c (camel_url_new): Assert url_string != NULL.

23 years agooops, not empty string - need to base64 encode it, which is just "="
Jeffrey Stedfast [Wed, 28 Feb 2001 23:26:34 +0000 (23:26 +0000)]
oops, not empty string - need to base64 encode it, which is just "="

23 years agoAdded camel-sasl-anonymous.[c,h] to the build.
Jeffrey Stedfast [Wed, 28 Feb 2001 23:24:15 +0000 (23:24 +0000)]
Added camel-sasl-anonymous.[c,h] to the build.

2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>

* Makefile.am: Added camel-sasl-anonymous.[c,h] to the build.

* camel-sasl-anonymous.[c,h]: new SASL class for ANONYMOUS

* camel-sasl-plain.c (plain_challenge): Oops, have a state for
setting sasl->authenticated = TRUE;

* camel-sasl-cram-md5.c (cram_md5_challenge): Same here.

23 years agoA fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01
Jeffrey Stedfast [Wed, 28 Feb 2001 21:40:51 +0000 (21:40 +0000)]
A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01

2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_decode_date): A fix for broken
mailers that send 2-digit years (ie "Wed, 28 Feb 01
04:59:41"). Fixes bug #1633.

23 years agoA fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01
Jeffrey Stedfast [Wed, 28 Feb 2001 21:06:44 +0000 (21:06 +0000)]
A fix for broken mailers that send 2-digit years (ie "Wed, 28 Feb 01

2001-02-28  Jeffrey Stedfast  <fejj@ximian.com>

* camel-mime-utils.c (header_decode_date): A fix for broken
mailers that send 2-digit years (ie "Wed, 28 Feb 01
04:59:41"). Fixes bug #1633.

* camel-filter-driver.c (camel_filter_driver_filter_folder): Check
to make sure message isn't NULL.

23 years agoIf we get back 0 bytes from camel_stream_buffer_gets, that means the
Dan Winship [Wed, 28 Feb 2001 18:41:27 +0000 (18:41 +0000)]
If we get back 0 bytes from camel_stream_buffer_gets, that means the

* camel-remote-store.c (remote_recv_line): If we get back 0 bytes
from camel_stream_buffer_gets, that means the socket got
disconnected, so set an exception. (Noticed because of a message
that crashes our IMAP server when you try to look at it. :)