platform/upstream/evolution-data-server.git
23 years agooops, and just in case value is NULL...
Jeffrey Stedfast [Tue, 24 Jul 2001 22:24:03 +0000 (22:24 +0000)]
oops, and just in case value is NULL...

23 years agoHandle broken mailers that send unencoded 8bit header params. And there
Jeffrey Stedfast [Tue, 24 Jul 2001 22:23:40 +0000 (22:23 +0000)]
Handle broken mailers that send unencoded 8bit header params. And there

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.

23 years agoNew #define, and there was much rejoicing. Rah.
Jeffrey Stedfast [Tue, 24 Jul 2001 19:55:46 +0000 (19:55 +0000)]
New #define, and there was much rejoicing. Rah.

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

* camel-url.h (CAMEL_URL_HIDE_ALL): New #define, and there was
much rejoicing. Rah.

23 years agoSomehow this missed the commit.
Not Zed [Tue, 24 Jul 2001 01:39:53 +0000 (01:39 +0000)]
Somehow this missed the commit.

2001-07-24  Not Zed  <NotZed@Ximian.com>

        * camel-operation.c (camel_operation_register, unregister): Added
        some warnings for bad cases.

23 years agoAdded some warnings for bad cases.
Not Zed [Tue, 24 Jul 2001 00:56:11 +0000 (00:56 +0000)]
Added some warnings for bad cases.

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.

23 years agoSlight fix for when source == destination (we don't want to do this action
Jeffrey Stedfast [Mon, 23 Jul 2001 16:59:17 +0000 (16:59 +0000)]
Slight fix for when source == destination (we don't want to do this action

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").

23 years agoAdded some operation progress reporting. Actual data transfer is 'tricky'
Not Zed [Mon, 23 Jul 2001 02:35:21 +0000 (02:35 +0000)]
Added some operation progress reporting. Actual data transfer is 'tricky'

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.

23 years agoMore usage fixes for CamelException. Check our own exception for
Peter Williams [Fri, 20 Jul 2001 21:01:30 +0000 (21:01 +0000)]
More usage fixes for CamelException. Check our own exception for

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.

23 years agoPull up test fixes to get them building again
JP Rosevear [Fri, 20 Jul 2001 20:55:53 +0000 (20:55 +0000)]
Pull up test fixes to get them building again

2001-07-20  JP Rosevear  <jpr@ximian.com>

* Pull up test fixes to get them building again

23 years agorenamed to camel_charset_to_iconv() to make it just a little more
Not Zed [Fri, 20 Jul 2001 04:59:46 +0000 (04:59 +0000)]
renamed to camel_charset_to_iconv() to make it just a little more

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

23 years agoConvert to the iconv-friendly charset names.
Jeffrey Stedfast [Fri, 20 Jul 2001 00:08:50 +0000 (00:08 +0000)]
Convert to the iconv-friendly charset names.

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().

23 years agoFixed a compiler warning about returning without a value in a non-void
Jeffrey Stedfast [Thu, 19 Jul 2001 23:15:51 +0000 (23:15 +0000)]
Fixed a compiler warning about returning without a value in a non-void

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.

23 years agoModified to treat the return value from camel_charset_locale_name() as a
Jeffrey Stedfast [Thu, 19 Jul 2001 23:11:13 +0000 (23:11 +0000)]
Modified to treat the return value from camel_charset_locale_name() as a

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.

23 years agoIn camel:
Peter Williams [Thu, 19 Jul 2001 21:35:42 +0000 (21:35 +0000)]
In camel:

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.

23 years agoNo need for `acharset' anymore. (check_html_charset): Return a const char*
Jeffrey Stedfast [Thu, 19 Jul 2001 21:08:14 +0000 (21:08 +0000)]
No need for `acharset' anymore. (check_html_charset): Return a const char*

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.

23 years agoRemove my iso8859-1 -> iso-8859-1 hack and use
Jeffrey Stedfast [Thu, 19 Jul 2001 21:00:27 +0000 (21:00 +0000)]
Remove my iso8859-1 -> iso-8859-1 hack and use

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.

23 years agoRevert 7/11/2001 patch for IMAP INBOX filtering at NotZed's request.
Peter Williams [Thu, 19 Jul 2001 15:38:51 +0000 (15:38 +0000)]
Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's request.

2001-07-19  Peter Williams  <peterw@ximian.com>

       * Revert 7/11/2001 patch for IMAP INBOX filtering at NotZed's
       request.

23 years agoClean up some exception misusage.
Peter Williams [Tue, 17 Jul 2001 21:22:20 +0000 (21:22 +0000)]
Clean up some exception misusage.

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.

23 years agoUse CAMEL_VTRASH_NAME.
Jeffrey Stedfast [Tue, 17 Jul 2001 16:08:47 +0000 (16:08 +0000)]
Use CAMEL_VTRASH_NAME.

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

23 years agoGiven: 4 EXISTS 1 EXPUNGE We have to pass 3, not 4 to
Dan Winship [Mon, 16 Jul 2001 19:23:33 +0000 (19:23 +0000)]
Given: 4 EXISTS 1 EXPUNGE We have to pass 3, not 4 to

* 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!).

23 years agoIf the message info for an expunged message is NULL, then just break out -
Jeffrey Stedfast [Sun, 15 Jul 2001 00:57:09 +0000 (00:57 +0000)]
If the message info for an expunged message is NULL, then just break out -

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?

23 years agoAdded a hack to convert charsets in the format iso8859-1 to iso-8859-1
Jeffrey Stedfast [Fri, 13 Jul 2001 18:53:08 +0000 (18:53 +0000)]
Added a hack to convert charsets in the format iso8859-1 to iso-8859-1

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.

23 years agoLet people install as non-root, but give them a bigass warning so they're
Peter Williams [Fri, 13 Jul 2001 17:35:51 +0000 (17:35 +0000)]
Let people install as non-root, but give them a bigass warning so they're

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.

23 years agoWe now use a structure as the bucket data rather than just a cache level
Jeffrey Stedfast [Fri, 13 Jul 2001 15:06:14 +0000 (15:06 +0000)]
We now use a structure as the bucket data rather than just a cache level

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).

23 years agoOkay, I've decided that that user is just on crack. We don't want to allow
Jeffrey Stedfast [Thu, 12 Jul 2001 21:17:14 +0000 (21:17 +0000)]
Okay, I've decided that that user is just on crack. We don't want to allow

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.

23 years agoOkay, I've decided that that user is just on crack. We don't want to allow
Jeffrey Stedfast [Thu, 12 Jul 2001 17:41:51 +0000 (17:41 +0000)]
Okay, I've decided that that user is just on crack. We don't want to allow

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.

23 years agoOnly set p->copied and p->deleted if the messages are copied without an
Jeffrey Stedfast [Thu, 12 Jul 2001 17:26:39 +0000 (17:26 +0000)]
Only set p->copied and p->deleted if the messages are copied without an

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.

23 years agoRemoved. (check_html_charset): Replaced with this.
Not Zed [Thu, 12 Jul 2001 05:02:11 +0000 (05:02 +0000)]
Removed. (check_html_charset): Replaced with this.

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.

23 years agoRemoved some code i wasn't supposed to commit.
Not Zed [Thu, 12 Jul 2001 02:22:23 +0000 (02:22 +0000)]
Removed some code i wasn't supposed to commit.

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.

23 years agoNew function to extract a meta-tag charset value if it exists.
Jeffrey Stedfast [Wed, 11 Jul 2001 23:56:31 +0000 (23:56 +0000)]
New function to extract a meta-tag charset value if it exists.

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.

23 years agoRipped out my code since it was never being used since the mime parser is
Jeffrey Stedfast [Wed, 11 Jul 2001 21:10:52 +0000 (21:10 +0000)]
Ripped out my code since it was never being used since the mime parser is

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.

23 years agoRun the filter in its own thread to prevent locking issues.
Peter Williams [Wed, 11 Jul 2001 19:12:22 +0000 (19:12 +0000)]
Run the filter in its own thread to prevent locking issues.

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.

23 years agoCreate the messageinfo itself, so we can properly set the size.
Not Zed [Wed, 11 Jul 2001 07:28:40 +0000 (07:28 +0000)]
Create the messageinfo itself, so we can properly set the size.

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.

23 years agoNew function to parse an HTML meta-tag.
Jeffrey Stedfast [Tue, 10 Jul 2001 22:06:56 +0000 (22:06 +0000)]
New function to parse an HTML meta-tag.

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.

23 years agoForget the passphrase if the user has set that option. (pgp_clearsign):
Jeffrey Stedfast [Mon, 9 Jul 2001 21:31:09 +0000 (21:31 +0000)]
Forget the passphrase if the user has set that option. (pgp_clearsign):

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.

23 years agoOops, e_poolv_set free's it for us, so dont double-free here.
Not Zed [Mon, 9 Jul 2001 03:42:50 +0000 (03:42 +0000)]
Oops, e_poolv_set free's it for us, so dont double-free here.

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.

23 years agoChanged so we dont have the list changing under us, just going to the next
Not Zed [Mon, 9 Jul 2001 01:49:41 +0000 (01:49 +0000)]
Changed so we dont have the list changing under us, just going to the next

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(?)

23 years agoopenssl_table is gone. we now store/get the stream from the SSL_CTX's
Chris Toshok [Sun, 8 Jul 2001 22:15:30 +0000 (22:15 +0000)]
openssl_table is gone. we now store/get the stream from the SSL_CTX's

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.

23 years agoDon't allow in to be NULL, so instead of doing if (in == NULL) return;,
Jeffrey Stedfast [Fri, 6 Jul 2001 21:59:14 +0000 (21:59 +0000)]
Don't allow in to be NULL, so instead of doing if (in == NULL) return;,

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.

23 years agoFixes bug #1138.
Jeffrey Stedfast [Fri, 6 Jul 2001 20:55:16 +0000 (20:55 +0000)]
Fixes bug #1138.

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

* providers/local/camel-maildir-store.c (get_inbox): Fixes bug
#1138.

23 years agoMake the `day-of-month' digit take up 2 chars by using "%2d". Fixes bug
Jeffrey Stedfast [Fri, 6 Jul 2001 20:30:25 +0000 (20:30 +0000)]
Make the `day-of-month' digit take up 2 chars by using "%2d". Fixes bug

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.

23 years agoSet the pipe fd's to nonblocking.
Jeffrey Stedfast [Fri, 6 Jul 2001 16:52:44 +0000 (16:52 +0000)]
Set the pipe fd's to nonblocking.

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

* camel-pgp-context.c (crypto_exec_with_passwd): Set the pipe fd's
to nonblocking.

23 years agoMake sure that after the finalization event has happened and the
Peter Williams [Fri, 6 Jul 2001 13:00:48 +0000 (13:00 +0000)]
Make sure that after the finalization event has happened and the

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.

23 years agoAdd locking to camel_nntp_get_grouplist_from_server().
Joe Shaw [Fri, 6 Jul 2001 04:11:27 +0000 (04:11 +0000)]
Add locking to camel_nntp_get_grouplist_from_server().

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.

23 years agoAdded an assert to make sure that `mi' isn't NULL.
Jeffrey Stedfast [Thu, 5 Jul 2001 22:59:46 +0000 (22:59 +0000)]
Added an assert to make sure that `mi' isn't NULL.

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.

23 years agoSend the --no-auto-key-retrieve argument to gpg if we are in offline mode
Jeffrey Stedfast [Thu, 5 Jul 2001 20:37:30 +0000 (20:37 +0000)]
Send the --no-auto-key-retrieve argument to gpg if we are in offline mode

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.

23 years agoSend the --no-auto-key-retrieve argument to gpg so that we don't have to
Jeffrey Stedfast [Thu, 5 Jul 2001 20:07:46 +0000 (20:07 +0000)]
Send the --no-auto-key-retrieve argument to gpg so that we don't have to

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.

23 years agouse X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the
Chris Toshok [Thu, 5 Jul 2001 19:11:50 +0000 (19:11 +0000)]
use X509_STORE_CTX_get_ex_data to get at the SSL* - don't use the

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.

23 years agoif source == dest, just no-op.
Jeffrey Stedfast [Thu, 5 Jul 2001 17:41:53 +0000 (17:41 +0000)]
if source == dest, just no-op.

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

* camel-folder.c (camel_folder_copy_messages_to): if source ==
dest, just no-op.

23 years agoMove this before the camel_vee_folder_remove_folder because that function
Peter Williams [Thu, 5 Jul 2001 16:40:45 +0000 (16:40 +0000)]
Move this before the camel_vee_folder_remove_folder because that function

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.

23 years ago (camel_message_info_dup_to): Assign the to->strings from the
Michael Zucci [Thu, 5 Jul 2001 09:38:59 +0000 (09:38 +0000)]
  (camel_message_info_dup_to): Assign the to->strings from the
  e_poolv_cpy() call, since it may allocaote a new poolv if the
  lengths do not match.

23 years agoFix the assertion slightly, if we have a little bit of input the output
Not Zed [Thu, 5 Jul 2001 03:59:45 +0000 (03:59 +0000)]
Fix the assertion slightly, if we have a little bit of input the output

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.

23 years agoWhen indexing a new record, create a pseudo word 'ibexindexed' so we can
Not Zed [Thu, 5 Jul 2001 03:13:52 +0000 (03:13 +0000)]
When indexing a new record, create a pseudo word 'ibexindexed' so we can

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.

23 years agoAdded NNTP_NO_PERMISSION (502) to the list of response codes.
Joe Shaw [Tue, 3 Jul 2001 21:33:47 +0000 (21:33 +0000)]
Added NNTP_NO_PERMISSION (502) to the list of response codes.

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.

23 years agoDoh. Don't remove things from the hash table while foreach'ing it. (And
Dan Winship [Tue, 3 Jul 2001 15:24:55 +0000 (15:24 +0000)]
Doh. Don't remove things from the hash table while foreach'ing it. (And

* 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.

23 years agoImplemented nntp_folder_search_by_expression and nntp_folder_search_free.
Sam Creasey [Tue, 3 Jul 2001 02:54:06 +0000 (02:54 +0000)]
Implemented nntp_folder_search_by_expression and nntp_folder_search_free.

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.

23 years agoAdd comment noting that Camel actually exists now :-)
Peter Williams [Mon, 2 Jul 2001 18:55:54 +0000 (18:55 +0000)]
Add comment noting that Camel actually exists now :-)

2001-07-02  Peter Williams  <peterw@ximian.com>

* README (Introduction): Add comment noting that Camel actually
exists now :-)

23 years agonew method to get an application-initialized filter driver.
Dan Winship [Mon, 2 Jul 2001 15:03:49 +0000 (15:03 +0000)]
new method to get an application-initialized filter driver.

* 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

23 years agoproperly return error if we can't create pipes.
Not Zed [Mon, 2 Jul 2001 13:59:39 +0000 (13:59 +0000)]
properly return error if we can't create pipes.

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.

23 years agore-enable html indexing.
Not Zed [Mon, 2 Jul 2001 13:32:55 +0000 (13:32 +0000)]
re-enable html indexing.

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.

23 years agoChange a camel_exception_clear to camel_exception_init to fix a
Dan Winship [Mon, 2 Jul 2001 13:06:56 +0000 (13:06 +0000)]
Change a camel_exception_clear to camel_exception_init to fix a

* tests/misc/url.c (main): Change a camel_exception_clear to
camel_exception_init to fix a sometimes-crash

23 years agoAdded Originator: header as a header to look for when looking for the
Jeffrey Stedfast [Fri, 29 Jun 2001 18:24:30 +0000 (18:24 +0000)]
Added Originator: header as a header to look for when looking for the

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.

23 years agoBuild the test-crlf test program.
Jeffrey Stedfast [Fri, 29 Jun 2001 18:09:45 +0000 (18:09 +0000)]
Build the test-crlf test program.

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.

23 years agossh
Jose Maria Celorio [Fri, 29 Jun 2001 06:23:57 +0000 (06:23 +0000)]
ssh

23 years agoAdd a CamelMimeFilterStripHeader that removes a header from mime output. Used
Peter Williams [Thu, 28 Jun 2001 20:35:43 +0000 (20:35 +0000)]
Add a CamelMimeFilterStripHeader that removes a header from mime output. Used
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.

23 years agoFix a memory leak. Also if the decoded value is NULL, that means it wasn't
Jeffrey Stedfast [Thu, 28 Jun 2001 16:52:23 +0000 (16:52 +0000)]
Fix a memory leak. Also if the decoded value is NULL, that means it wasn't

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.

23 years agoIf the folder is frozen, don't refresh, just record that we need to do it
Dan Winship [Thu, 28 Jun 2001 16:50:09 +0000 (16:50 +0000)]
If the folder is frozen, don't refresh, just record that we need to do it

* 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

23 years agoInitialize the private send_lock. (camel_transport_finalize): Free the
Jeffrey Stedfast [Wed, 27 Jun 2001 22:43:00 +0000 (22:43 +0000)]
Initialize the private send_lock. (camel_transport_finalize): Free the

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.

23 years agoUpdated to match the current API.
Jeffrey Stedfast [Wed, 27 Jun 2001 22:21:05 +0000 (22:21 +0000)]
Updated to match the current API.

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().

23 years agoUse the new header_address_fold.
Jeffrey Stedfast [Wed, 27 Jun 2001 22:14:20 +0000 (22:14 +0000)]
Use the new header_address_fold.

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.

23 years agoSince we want an error opening a folder to result in the message being
Jeffrey Stedfast [Tue, 26 Jun 2001 22:45:16 +0000 (22:45 +0000)]
Since we want an error opening a folder to result in the message being

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.

23 years agolock the cache around accesses
Dan Winship [Tue, 26 Jun 2001 19:20:01 +0000 (19:20 +0000)]
lock the cache around accesses

* 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...

23 years agoD'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/
Dan Winship [Tue, 26 Jun 2001 17:50:48 +0000 (17:50 +0000)]
D'oh. s/FALSE/CAMEL_URL_HIDE_PASSWORD/

        * camel-service.c (camel_service_get_url): D'oh.
        s/FALSE/CAMEL_URL_HIDE_PASSWORD/

23 years agoconstify args
Dan Winship [Tue, 26 Jun 2001 16:50:46 +0000 (16:50 +0000)]
constify args

* camel-url.c (camel_url_encode): constify args

23 years agog_strdup() the message source here or we will have problems later when we
Jeffrey Stedfast [Tue, 26 Jun 2001 00:18:23 +0000 (00:18 +0000)]
g_strdup() the message source here or we will have problems later when we

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 ;-)

23 years agoFix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a
Dan Winship [Mon, 25 Jun 2001 15:40:30 +0000 (15:40 +0000)]
Fix this: IMAP doesn't allow an extra argument to AUTHENTICATE to avoid a

* 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.

23 years agoUpdate the copyrights, replacing Helix Code with Ximian and
Ettore Perazzoli [Sat, 23 Jun 2001 08:51:31 +0000 (08:51 +0000)]
Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

23 years agoNew function that decides if 2 word types are mergeable. An atom and a
Jeffrey Stedfast [Thu, 21 Jun 2001 19:53:47 +0000 (19:53 +0000)]
New function that decides if 2 word types are mergeable. An atom and a

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.

23 years agoUse camel_address_length() rather than casting and accessing data members.
Jeffrey Stedfast [Thu, 21 Jun 2001 17:19:00 +0000 (17:19 +0000)]
Use camel_address_length() rather than casting and accessing data members.

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.

23 years agoIf the first char of the mailing-list name is '<', chop it off to make
Jeffrey Stedfast [Wed, 20 Jun 2001 19:46:58 +0000 (19:46 +0000)]
If the first char of the mailing-list name is '<', chop it off to make

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.

23 years agoupdated .cvsignore to ignore camel-lock-helper
Jeffrey Stedfast [Tue, 19 Jun 2001 18:51:01 +0000 (18:51 +0000)]
updated .cvsignore to ignore camel-lock-helper

23 years agoFixed a bug when not running setuid it wouldn't unlock.
Not Zed [Tue, 19 Jun 2001 14:21:05 +0000 (14:21 +0000)]
Fixed a bug when not running setuid it wouldn't unlock.

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.

23 years agoNote: Except for the info_free(), the NULL checks are g_return's. I felt
Jeffrey Stedfast [Mon, 18 Jun 2001 21:08:19 +0000 (21:08 +0000)]
Note: Except for the info_free(), the NULL checks are g_return's. I felt

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.

23 years agoRemove DB3_LDADD
Dan Winship [Mon, 18 Jun 2001 20:07:35 +0000 (20:07 +0000)]
Remove DB3_LDADD

* 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

23 years agoSet camel-lock-help setgid or setuid as needed
Dan Winship [Mon, 18 Jun 2001 18:17:19 +0000 (18:17 +0000)]
Set camel-lock-help setgid or setuid as needed

* Makefile.am (install-exec-local): Set camel-lock-help setgid or
setuid as needed

23 years agoOnly create a missing uid if we have indexing turned on.
Not Zed [Mon, 18 Jun 2001 14:36:44 +0000 (14:36 +0000)]
Only create a missing uid if we have indexing turned on.

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.

23 years agoReturn the largest real UID in the cache (as an integer). Eventually to be
Dan Winship [Fri, 15 Jun 2001 18:47:04 +0000 (18:47 +0000)]
Return the largest real UID in the cache (as an integer). Eventually to be

* 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.

23 years agoAdded Mailing-List header regex so that we can do mlist magic on that
Jeffrey Stedfast [Thu, 14 Jun 2001 22:32:35 +0000 (22:32 +0000)]
Added Mailing-List header regex so that we can do mlist magic on that

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.

23 years agoProperly handle correct and incorrect (for the common case, ie Outlook and
Jeffrey Stedfast [Thu, 14 Jun 2001 22:24:59 +0000 (22:24 +0000)]
Properly handle correct and incorrect (for the common case, ie Outlook and

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.

23 years agoDon't try to format the Reply-To header - we don't want to wrap the
Jeffrey Stedfast [Thu, 14 Jun 2001 17:16:33 +0000 (17:16 +0000)]
Don't try to format the Reply-To header - we don't want to wrap the

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.

23 years agoA new provider, for spool mailboxes. Mostly a cut and paste of the mbox
Not Zed [Tue, 12 Jun 2001 14:29:28 +0000 (14:29 +0000)]
A new provider, for spool mailboxes. Mostly a cut and paste of the mbox

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.

23 years agoAdd a separator between the service url and the folder name, if needed.
Jon Trowbridge [Fri, 8 Jun 2001 00:41:40 +0000 (00:41 +0000)]
Add a separator between the service url and the folder name, if needed.

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.

23 years agoAdded an argument, so that the original source URI of the mbox can be
Jon Trowbridge [Fri, 8 Jun 2001 00:12:52 +0000 (00:12 +0000)]
Added an argument, so that the original source URI of the mbox can be

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.

23 years agoDon't fetch the UID and FLAGS of messages we don't know about yet, since
Dan Winship [Wed, 6 Jun 2001 14:30:42 +0000 (14:30 +0000)]
Don't fetch the UID and FLAGS of messages we don't know about yet, since

* 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.

23 years agoFix to not get into a recursive loop in get_type().
Jeffrey Stedfast [Sat, 2 Jun 2001 21:06:42 +0000 (21:06 +0000)]
Fix to not get into a recursive loop in get_type().

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.

23 years agoNumerous fixes to get it to compile.
Jeffrey Stedfast [Thu, 31 May 2001 22:30:06 +0000 (22:30 +0000)]
Numerous fixes to get it to compile.

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

* camel-smime-context.c: Numerous fixes to get it to compile.

23 years agoAdded camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,
Jeffrey Stedfast [Thu, 31 May 2001 20:41:00 +0000 (20:41 +0000)]
Added camel-cipher-context.h, camel-cms-context.h, camel-smime-context.h,

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

23 years agoNew virtual class for manipulating cryptographic message syntax messages
Jeffrey Stedfast [Thu, 31 May 2001 20:15:35 +0000 (20:15 +0000)]
New virtual class for manipulating cryptographic message syntax messages

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.

23 years agoRedo the BUILD_MAP code to not depend on libunicode. Now it only generates
Dan Winship [Wed, 30 May 2001 21:32:18 +0000 (21:32 +0000)]
Redo the BUILD_MAP code to not depend on libunicode. Now it only generates

* 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.

23 years agoFix an obvious typo
Dan Winship [Tue, 29 May 2001 21:07:11 +0000 (21:07 +0000)]
Fix an obvious typo