Peter Williams [Tue, 22 Aug 2000 20:09:10 +0000 (20:09 +0000)]
Automatically connect services when given a valid URL (should hopefully disconnect, too); remove the old movemail folder correctly.
JP Rosevear [Mon, 21 Aug 2000 20:47:09 +0000 (20:47 +0000)]
Make sure newsrc is not null (nntp_folder_get_subfolder_names): ditto
2000-08-21 JP Rosevear <jpr@helixcode.com>
* providers/nntp/camel-nntp-folder.c
(nntp_folder_get_subfolder_names):
Make sure newsrc is not null
(nntp_folder_get_subfolder_names): ditto
* providers/nntp/camel-nntp-newsrc.c
(camel_nntp_newsrc_get_subscribed_group_names): Programming check
for newsrc == NULL
(camel_nntp_newsrc_get_all_group_names): ditto
(camel_nntp_newsrc_write_to_file): ditto
(camel_nntp_newsrc_write): ditto
JP Rosevear [Mon, 21 Aug 2000 19:56:14 +0000 (19:56 +0000)]
Make sure respbuffer is not null before manipulating it. If it is null,
2000-08-21 JP Rosevear <jpr@helixcode.com>
* providers/nntp/camel-nntp-store.c (camel_nntp_command):
Make sure respbuffer is not null before manipulating it.
If it is null, return CAMEL_NNTP_FAIL and a decent error
message.
Peter Williams [Fri, 18 Aug 2000 17:28:36 +0000 (17:28 +0000)]
Fix output for when the name is empty
Matthew Loper [Thu, 17 Aug 2000 14:19:00 +0000 (14:19 +0000)]
Whole buncha leak fixes thanks to Purify
Peter Williams [Wed, 16 Aug 2000 19:24:30 +0000 (19:24 +0000)]
More leak fixes
Peter Williams [Wed, 16 Aug 2000 18:35:03 +0000 (18:35 +0000)]
ChangeLog for previous camel-object commit.
Peter Williams [Wed, 16 Aug 2000 18:33:19 +0000 (18:33 +0000)]
Plug mem leaks.
Peter Williams [Tue, 15 Aug 2000 19:10:44 +0000 (19:10 +0000)]
Add support for copying messages
Peter Williams [Mon, 14 Aug 2000 19:07:06 +0000 (19:07 +0000)]
Infrastructure for date-based queries
Dan Winship [Sun, 13 Aug 2000 21:40:24 +0000 (21:40 +0000)]
Add camel-nntp-utils.h
* providers/nntp/Makefile.am (libcamelnntpinclude_HEADERS): Add
camel-nntp-utils.h
Dan Winship [Sun, 13 Aug 2000 16:09:25 +0000 (16:09 +0000)]
do a strcasecmp rather than just a strcmp when checking if a folder is
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_names_internal): do a strcasecmp rather than
just a strcmp when checking if a folder is "INBOX", since it is
a case-insensitive name.
Dan Winship [Sun, 13 Aug 2000 03:25:47 +0000 (03:25 +0000)]
(imap_get_subfolder_names_internal): Add "INBOX" to the list as
g_malloc'ed memory, not a static string.
Dan Winship [Sun, 13 Aug 2000 03:06:34 +0000 (03:06 +0000)]
Don't assume the FETCH results will come back in the order they were
* providers/imap/camel-imap-folder.c (imap_get_summary_internal):
Don't assume the FETCH results will come back in the order they
were requested.
Jeffrey Stedfast [Sat, 12 Aug 2000 22:56:55 +0000 (22:56 +0000)]
Now takes a char * parameter rather than a stream
2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(camel_imap_command_continuation): Now takes a char * parameter
rather than a stream
(camel_imap_command_continuation_with_stream): Same function as
above but takes a stream parameter instead
* providers/imap/camel-imap-folder.c (imap_append_message): Use
camel_imap_command_continuation_with_stream
Dan Winship [Sat, 12 Aug 2000 22:10:22 +0000 (22:10 +0000)]
New function to do one round of attempted authentication. (pop3_connect):
* providers/pop3/camel-pop3-store.c (pop3_try_authenticate): New
function to do one round of attempted authentication.
(pop3_connect): Move a bunch of code out into
pop3_try_authenticate and fix some bugs in the edge cases.
Jeffrey Stedfast [Sat, 12 Aug 2000 21:58:01 +0000 (21:58 +0000)]
No longer calls try_connect() to get authtypes
2000-08-12 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (query_auth_types): No longer
calls try_connect() to get authtypes
Jeffrey Stedfast [Sat, 12 Aug 2000 03:42:42 +0000 (03:42 +0000)]
Changed param order a bit and fixed some logic
2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(camel_imap_command_continuation): Changed param order a bit and
fixed some logic
* providers/imap/camel-imap-folder.c (imap_append_message): Use
the new multi-transactional convenience functions
Jeffrey Stedfast [Sat, 12 Aug 2000 01:36:31 +0000 (01:36 +0000)]
New convenience function for multi-transactional commands (opening
2000-08-11 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c
(camel_imap_command_preliminary): New convenience function for
multi-transactional commands (opening request)
(camel_imap_command_continuation): New convenience function for
multi-transactional commands (followup data)
Christopher James Lahey [Sat, 12 Aug 2000 01:25:17 +0000 (01:25 +0000)]
Fixed a warning.
2000-08-11 Christopher James Lahey <clahey@helixcode.com>
* providers/mh/camel-mh-folder.c: Fixed a warning.
Chris Toshok [Fri, 11 Aug 2000 21:32:55 +0000 (21:32 +0000)]
remove get_name and get_full_name assignments, since the camel-folder.c
2000-08-11 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-folder.c
(camel_nntp_folder_class_init): remove get_name and get_full_name
assignments, since the camel-folder.c implementation does what we
need.
Chris Toshok [Fri, 11 Aug 2000 21:14:33 +0000 (21:14 +0000)]
use g_get_home_dir, since evolution_dir isn't available in the providers.
2000-08-11 Chris Toshok <toshok@helixcode.com>
* providers/nntp/camel-nntp-store.c
(camel_nntp_store_get_toplevel_dir): use g_get_home_dir, since
evolution_dir isn't available in the providers.
Peter Williams [Fri, 11 Aug 2000 17:35:13 +0000 (17:35 +0000)]
Fix the camel-folder's thaw handler. Implement event forwarding into the main thread.
Not Zed [Fri, 11 Aug 2000 07:43:50 +0000 (07:43 +0000)]
Implement. (mh_get_message_user_tag): Implement.
2000-08-11 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-folder.c (mh_set_message_user_tag):
Implement.
(mh_get_message_user_tag): Implement.
* providers/mbox/camel-mbox-folder.c (mbox_get_message_user_tag):
(mbox_set_message_user_tag): Implement.
* camel-folder.c
(camel_folder_set_message_user_tag): Routine to set message tags.
(camel_folder_get_message_user_tag): And accessor.
Not Zed [Fri, 11 Aug 2000 04:24:13 +0000 (04:24 +0000)]
Yay so lets fix an already fixed fix, again. (copy_message_to): and here
2000-08-11 Not Zed <NotZed@HelixCode.com>
* camel-folder.c (move_message_to): Yay so lets fix an already fixed fix, again.
(copy_message_to): and here too ... update for api change to append().
And removed another warning.
Christopher James Lahey [Fri, 11 Aug 2000 02:57:11 +0000 (02:57 +0000)]
Fixed some warnings.
2000-08-10 Christopher James Lahey <clahey@helixcode.com>
* camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
camel-mime-filter-charset.c, camel-mime-filter.c,
camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
camel-movemail.c, camel-multipart.c, camel-object.c,
camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
providers/mbox/camel-mbox-summary.c,
providers/mh/camel-mh-folder.c,
providers/smtp/camel-smtp-transport.c: Fixed some warnings.
Michael Zucci [Fri, 11 Aug 2000 02:50:02 +0000 (02:50 +0000)]
t Zed <NotZed@HelixCode.com>
t Zed <NotZed@HelixCode.com>
* providers/vee/camel-vee-folder.c (vee_folder_build_folder): Free
the search properly.
(vee_folder_build): And here too.
Michael Zucci [Fri, 11 Aug 2000 01:53:08 +0000 (01:53 +0000)]
Removed unecessary change and fixed indenting.
Jeffrey Stedfast [Thu, 10 Aug 2000 21:23:29 +0000 (21:23 +0000)]
If we go over the max number of messages, don't keep requesting new
2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
If we go over the max number of messages, don't keep requesting
new message summaries, just break.
Peter Williams [Thu, 10 Aug 2000 17:30:47 +0000 (17:30 +0000)]
Merge with camel-async.
Not Zed [Thu, 10 Aug 2000 16:35:28 +0000 (16:35 +0000)]
A better way to compress leading whitespace. The code is probably invalid
2000-08-11 Not Zed <NotZed@HelixCode.com>
* camel-mime-parser.c (folder_scan_header): A better way to
compress leading whitespace. The code is probably invalid anyway,
I dont think it will work across buffer boundaries.
* providers/mbox/camel-mbox-folder.c (mbox_append_message): And
write out proper format From lines here too.
* providers/mbox/camel-mbox-summary.c
(camel_mbox_summary_build_from): New function to build a more
compatible mbox "From " line.
(camel_mbox_summary_sync): Write From lines in the proper format.
2000-08-10 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-store.c (get_folder): Remove warnin g.
* providers/mbox/camel-mbox-store.c (xrename): Kill some warnings
with constification.
* providers/imap/camel-imap-folder.c (imap_append_message): Fixed
for append api change. Eek this routine seriously wastes memory.
* providers/mh/camel-mh-folder.c (mh_search_free): Impelemnt.
(mh_append_message): Fix for api change, and include user flags
and tags in new message.
* providers/vee/camel-vee-folder.c (vee_search_by_expression): Fix
for search api change.
* camel-folder.c (camel_folder_search_free): New function for
freeing search results.
(search_free): Changed my mind, implement a default that actually
does something. Free as to the old interface.
(camel_folder_append_message): Changed to accept a
camelmessageinfo rather than flags, which just doesn't have enough
info in it.
(copy_message_to): Change for append_message api change.
(move_message_to): Likewise.
* providers/mbox/camel-mbox-folder.c (mbox_search_free):
Implement.
(mbox_append_message): Fix for api change, and also copy user
flags/tags across to new summary.
* camel-folder-search.c (search_user_tag): A search expression
that returns the current use flag by name.
(camel_folder_search_free_result): New function to free the result
of a search.
* camel-folder-summary.c: Bump summary version.
(message_info_new):
(message_info_load):
(message_info_save):
(camel_message_info_dup_to):
(camel_message_info_free): Added support for arbitrary tag/value
pairs (CamelTag's).
(camel_tag_get):
(camel_tag_set):
(camel_tag_list_size):
(camel_tag_list_free): Operations for working with CamelTags.
Ettore Perazzoli [Wed, 9 Aug 2000 05:21:12 +0000 (05:21 +0000)]
Fix the NNTP provider's Makefile.am so that it does not use installed
Camel headers before the source ones. Also, get rid of an unused
variable.
Not Zed [Wed, 9 Aug 2000 00:40:03 +0000 (00:40 +0000)]
Reorder search result in summary order if we searched with a summary.
2000-08-09 Not Zed <NotZed@HelixCode.com>
* camel-folder-search.c (camel_folder_search_execute_expression):
Reorder search result in summary order if we searched with a
summary.
Dan Winship [Wed, 9 Aug 2000 00:07:56 +0000 (00:07 +0000)]
New code to keep an on-disk cache of what UIDs have been seen in a folder.
* camel-uid-cache.c: New code to keep an on-disk cache of what
UIDs have been seen in a folder.
* camel-provider.h: Add new flags CAMEL_PROVIDER_IS_SOURCE (mail
can arrive in it by non-Camel means) and CAMEL_PROVIDER_IS_STORAGE
(you can work with mail directly without needing to copy it local).
* providers/*/camel-*-provider.c: Add flags as needed: imap and
mbox are SOURCE and STORAGE. mh and nntp are just STORAGE, pop3 is
just SOURCE.
* camel-mime-message.c (process_header): Add another subject
g_strstrip that fejj's earlier commit missed.
Dan Winship [Tue, 8 Aug 2000 16:28:43 +0000 (16:28 +0000)]
Add another subject g_strstrip that fejj's earlier commit missed.
* camel-mime-message.c (process_header): Add another subject
g_strstrip that fejj's earlier commit missed.
Not Zed [Tue, 8 Aug 2000 03:42:47 +0000 (03:42 +0000)]
Only retry another uid if we had a name clash, otherwise fail.
2000-08-07 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-folder.c (mh_append_message): Only retry
another uid if we had a name clash, otherwise fail.
2000-08-04 Not Zed <NotZed@HelixCode.com>
* camel-url.c (camel_url_set_protocol):
(camel_url_set_host):
(camel_url_set_path):
(camel_url_set_port): Url editing functions.
2000-08-02 Not Zed <NotZed@HelixCode.com>
* providers/mh/camel-mh-summary.c (camel_mh_summary_sync): Expunge
from the end, so the index isn't messed up when you remove a
message.
* providers/mh/camel-mh-folder.c (mh_append_message): Fix a bug
where it would never open an output file/uid.
* providers/mbox/camel-mbox-store.c (rename_folder):
Implementation for mbox as well.
* camel-store.c (camel_store_rename_folder): New method to rename folders.
(rename_folder): Default implementation.
* providers/mh/camel-mh-store.c (delete_folder): Implement this.
(rename_folder): Implement a rename operation.
Jeffrey Stedfast [Mon, 7 Aug 2000 20:32:27 +0000 (20:32 +0000)]
If we are trying to get a subfolder listing of the root folder, always
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_subfolder_names_internal): If we are trying to get a
subfolder listing of the root folder, always make sure INBOX is
there...
* providers/imap/camel-imap-utils.c (imap_parse_list_response):
Check for NIL as a directory separator.
Jeffrey Stedfast [Mon, 7 Aug 2000 18:54:15 +0000 (18:54 +0000)]
Strip all \n's from the expression
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_translate_sexp): Strip
all \n's from the expression
* string-utils.c (strip): New convenience function to strip
occurences of a single char from a string
Jeffrey Stedfast [Mon, 7 Aug 2000 18:18:17 +0000 (18:18 +0000)]
Do a g_strstrip on the subject so we can stop getting those annoying
2000-08-07 Jeffrey Stedfast <fejj@helixcode.com>
* camel-mime-message.c (camel_mime_message_set_subject): Do a
g_strstrip on the subject so we can stop getting those annoying
leading spaces
Dan Winship [Mon, 7 Aug 2000 04:16:26 +0000 (04:16 +0000)]
Fix this to not require NULL-termination of the array.
* camel-folder.c (camel_folder_free_deep): Fix this to not require
NULL-termination of the array.
Jeffrey Stedfast [Fri, 4 Aug 2000 22:41:05 +0000 (22:41 +0000)]
If we fail to get a dir_sep, then supply the default of "/". (get_folder):
2000-08-04 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_connect): If we fail to
get a dir_sep, then supply the default of "/".
(get_folder): Undo changes by Peter
Peter Williams [Fri, 4 Aug 2000 21:29:43 +0000 (21:29 +0000)]
Coredump fix when IMAP get_folder with NULL dir_sep
Dan Winship [Fri, 4 Aug 2000 18:40:38 +0000 (18:40 +0000)]
Indexes into the flags array are message_number minus 1, not just
* providers/pop3/camel-pop3-folder.c (pop3_set_message_flags):
(pop3_sync): Indexes into the flags array are message_number minus
1, not just message_number.
Dan Winship [Fri, 4 Aug 2000 04:36:19 +0000 (04:36 +0000)]
add a debugging macro for doing protocol tracing.
* providers/pop3/camel-pop3-store.c: add a debugging macro for
doing protocol tracing.
Jeffrey Stedfast [Thu, 3 Aug 2000 23:07:18 +0000 (23:07 +0000)]
Only call imap_get_summary_internal if the folder can hold messages
2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Only
call imap_get_summary_internal if the folder can hold messages
* providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
Initialize the service_cache for the news/nntp providers
Jeffrey Stedfast [Thu, 3 Aug 2000 20:40:19 +0000 (20:40 +0000)]
Initialize the service_cache for the news/nntp providers
2000-08-03 Jeffrey Stedfast <fejj@helixcode.com>
* providers/nntp/camel-nntp-provider.c (camel_provider_module_init):
Initialize the service_cache for the news/nntp providers
Peter Williams [Thu, 3 Aug 2000 15:45:22 +0000 (15:45 +0000)]
srcdir != builddir fix
Dan Winship [Thu, 3 Aug 2000 00:47:50 +0000 (00:47 +0000)]
Kill this. It doesn't have any code to do anything the new mh provider
* providers/MH: Kill this. It doesn't have any code to do anything
the new mh provider doesn't do better.
* providers/Makefile.am: Remove reference to MH subdir, and
promote nntp to fully-supported status, since it does compile and
all.
Dan Winship [Thu, 3 Aug 2000 00:35:45 +0000 (00:35 +0000)]
Trim trailing space from the subject. I've now seen replies from two
* camel-mime-message.c (camel_mime_message_set_subject): Trim
trailing space from the subject. I've now seen replies from two
different people that tricked the threading code by (a) not having
References/In-Reply-To, and (b) adding an extra space to the end
of the subject line so the subject-based threading fails too. Who
writes these broken mailers anyway?
Jeffrey Stedfast [Wed, 2 Aug 2000 00:29:53 +0000 (00:29 +0000)]
When forced to use the IP, place it in square brackets.
2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
* providers/smtp/camel-smtp-transport.c (smtp_helo): When forced
to use the IP, place it in square brackets.
Jeffrey Stedfast [Tue, 1 Aug 2000 23:05:34 +0000 (23:05 +0000)]
New and improved sexp parser. An honest try at using e-sexp is wrapped in
2000-08-01 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_translate_sexp): New and
improved sexp parser. An honest try at using e-sexp is wrapped in
a #ifdef at the bottom of the file but is currently not used
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
We want to do a UID SEARCH so we get UIDs back instead of sequence
numbers
Peter Williams [Tue, 1 Aug 2000 14:30:59 +0000 (14:30 +0000)]
cvsignore file
Not Zed [Tue, 1 Aug 2000 12:46:05 +0000 (12:46 +0000)]
Initial cut at mh provider. Well, it already does everything
mbox does.
2000-08-01 Not Zed <NotZed@HelixCode.com>
* providers/mh: New mh provider implementation.
* providers/Makefile.am (SUBDIRS): Added mh provider.
Jeffrey Stedfast [Tue, 1 Aug 2000 00:31:28 +0000 (00:31 +0000)]
Some IMAP servers don't wrap the UID in ()'s so don't depend on that
2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_info_internal):
Some IMAP servers don't wrap the UID in ()'s so don't depend on that
(imap_get_summary_internal): Same
Jeffrey Stedfast [Mon, 31 Jul 2000 22:15:31 +0000 (22:15 +0000)]
Oops, forgot to free node->function - not good.
2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (free_sexp_node): Oops, forgot to
free node->function - not good.
Peter Williams [Mon, 31 Jul 2000 20:46:47 +0000 (20:46 +0000)]
Buffer overrun fix in g_strfreev -- two more that I forgot
Peter Williams [Mon, 31 Jul 2000 20:33:27 +0000 (20:33 +0000)]
Buffer overrun fix in g_strfreev
Jeffrey Stedfast [Mon, 31 Jul 2000 20:00:20 +0000 (20:00 +0000)]
New convenience function to translate a Camel sexp into the equivalent
2000-07-31 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-utils.c (imap_translate_sexp): New
convenience function to translate a Camel sexp into the equivalent
IMAP sexp.
* providers/imap/camel-imap-store.c: More places now use
imap_next_word
* providers/imap/camel-imap-folder.c (imap_search_by_expression):
Implemented initial version (this may or may not work quite right)
Peter Williams [Mon, 31 Jul 2000 19:57:49 +0000 (19:57 +0000)]
A few string overrun checks for the mime parser
Jeffrey Stedfast [Sat, 29 Jul 2000 01:49:06 +0000 (01:49 +0000)]
Make sure the third word/token (whatever) is "EXPUNGE" and not something
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_expunge): Make sure
the third word/token (whatever) is "EXPUNGE" and not something
else like "EXISTS" or "RECENT". When removing the message from
the summary also make sure to free that data to avoid leakage.
Also make sure to subtract 1 from the 'id' since IMAP starts
at 1 and our summary starts at 0 :-)
Jeffrey Stedfast [Sat, 29 Jul 2000 00:18:09 +0000 (00:18 +0000)]
fixed a few logic errors
Jeffrey Stedfast [Fri, 28 Jul 2000 23:13:46 +0000 (23:13 +0000)]
Cleaned up a bit, now uses imap_next_word() (camel_imap_command_extended):
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_status): Cleaned
up a bit, now uses imap_next_word()
(camel_imap_command_extended): Now uses imap_next_word(). When
checking for RECENT, allow the first digit of the recent-count
be between 0 and 9 inclusive instead of exclusive.
* providers/imap/camel-imap-folder.c (imap_expunge): Optimized.
No longer will it need to reload the summary as it now instead
removes the appropriate message summaries from the cache.
(camel_imap_folder_changed): If recent == 0 then return. If
recent < 0 then just emit the folder_changed signal, don't reload
summaries.
Jeffrey Stedfast [Fri, 28 Jul 2000 17:41:15 +0000 (17:41 +0000)]
Get message count when STATUS is not available. (imap_init):
2000-07-28 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal): Get message count when STATUS
is not available.
(imap_init): folder->has_search_capability is required for IMAP so
should always be set to TRUE (is currently being set to FALSE as
I've not yet implemented SEARCH support).
(camel_imap_folder_changed): Seem to have fixed my optimization
hack
2000-07-28 Jon K Hellan <hellan@acm.org>
* providers/imap/camel-imap-store.h (CamelImapServerLevel): New
enum.
(CamelImapStore): Added server_level and has_status_capability
members.
* providers/imap/camel-imap-store.c (imap_connect): Detect
IMAP4REV1, IMAP4 and STATUS in capability response.
* providers/imap/camel-imap-folder.c
(imap_get_message_count_internal): Use STATUS only if server
supports it. TODO: Get message count when STATUS not supported.
(imap_get_message, imap_get_summary_internal,
imap_get_message_info_internal): Handle IMAP4 as well.
(imap_protocol_get_summary_specifier): New function: Make a data
item specifier for the header lines we need, appropriate to the
server level.
Jeffrey Stedfast [Fri, 28 Jul 2000 02:02:51 +0000 (02:02 +0000)]
Fixed my routine to only fetch new headers, my IDs were off by 1 on the
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Fixed my routine to only fetch new headers, my IDs were off by 1
on the high end, so when it would fetch the last newly arrived
message it would fail and end up fetching all of the summaries
because of the corruption.
Jeffrey Stedfast [Thu, 27 Jul 2000 23:49:47 +0000 (23:49 +0000)]
If the path doesn't begin with a / and there is a host, prepend a / to the
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* camel-url.c (camel_url_to_string): If the path doesn't begin
with a / and there is a host, prepend a / to the path.
Jeffrey Stedfast [Thu, 27 Jul 2000 23:11:11 +0000 (23:11 +0000)]
Added camel-imap-utils.[c,h]
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/Makefile.am: Added camel-imap-utils.[c,h]
* providers/imap/camel-imap-utils.[c,h]: Utilities for parsing
server responses for use in both camel-imap-store.c and
camel-imap-folder.c
* providers/imap/camel-imap-folder.c (imap_get_summary_internal):
Free all the pointers in the headers array.
(imap_get_subfolder_names_internal): Updated to use
imap_parse_list_response
(imap_parse_subfolder_list): Removed in favor of
imap_parse_list_response
* providers/imap/camel-imap-store.c (camel_imap_command_extended):
Free all the pointers in the data array.
(imap_connect): Updated to use imap_parse_list_response and fixed
a leak
(folder_is_selectable): Updated.
Jeffrey Stedfast [Thu, 27 Jul 2000 18:32:23 +0000 (18:32 +0000)]
Now uses a hash table for looking up message info rather than a linear
2000-07-27 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_info): Now uses
a hash table for looking up message info rather than a linear search :)
Peter Williams [Thu, 27 Jul 2000 17:01:05 +0000 (17:01 +0000)]
Fix Makefile.am booboo.
Matthew Loper [Wed, 26 Jul 2000 21:02:08 +0000 (21:02 +0000)]
Make the mime parser a bit less reckless. More reckful?
Dan Winship [Wed, 26 Jul 2000 18:32:10 +0000 (18:32 +0000)]
routine to call an external movemail program. (camel_movemail): Nuke
* camel-movemail.c (movemail_external): routine to call an
external movemail program.
(camel_movemail): Nuke return value, use movemail_external when
available and useful, and don't delete "dest" on errors, since
it might have started non-empty.
Jeffrey Stedfast [Wed, 26 Jul 2000 15:13:50 +0000 (15:13 +0000)]
Should now always prepend a '/' before the path if it doesn't already
2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
* camel-url.c (camel_url_to_string): Should now always prepend a '/'
before the path if it doesn't already exist.
* providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
Jeffrey Stedfast [Wed, 26 Jul 2000 15:08:56 +0000 (15:08 +0000)]
Fixed a few compiler warnings
2000-07-26 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c: Fixed a few compiler warnings
Jeffrey Stedfast [Tue, 25 Jul 2000 19:35:08 +0000 (19:35 +0000)]
Fixed the real problem that Peter was running into.
2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_summary_free): Fixed the
real problem that Peter was running into.
Dan Winship [Tue, 25 Jul 2000 17:59:07 +0000 (17:59 +0000)]
Don't add a Mime-Version header to a message that already has one.
* camel-mime-message.c (write_to_stream): Don't add a Mime-Version
header to a message that already has one.
* camel-internet-address.c (internet_encode): Don't put <>s around
addresses with no name part.
Peter Williams [Tue, 25 Jul 2000 16:02:20 +0000 (16:02 +0000)]
IMAP expunge crash prevention... still not right...
Jeffrey Stedfast [Tue, 25 Jul 2000 05:32:55 +0000 (05:32 +0000)]
Optimized to try and get the new message headers without reloading the
2000-07-25 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_changed):
Optimized to try and get the new message headers without reloading
the entire summary from scratch.
(imap_get_summary_internal): Will now sync() before attempting to reload
the summary so that flags are set in the reloaded summary as well.
Jeffrey Stedfast [Tue, 25 Jul 2000 03:45:55 +0000 (03:45 +0000)]
Updated to give special attention to the root folder.
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Updated to give special
attention to the root folder.
* providers/imap/camel-imap-folder.c (imap_get_subfolder_names_internal):
Updated to handle the root folder
(imap_get_message_count_internal): return 0 if folder can't hold messages
(camel_imap_folder_new): Change so that root folder gets special attention
and always gets can_hold_messages set to FALSE
Dan Winship [Tue, 25 Jul 2000 02:42:11 +0000 (02:42 +0000)]
Remove exceptions from a number of methods that work on what ought to be
* camel-folder.c: Remove exceptions from a number of methods that
work on what ought to be static data: get_parent_folder,
get_parent_store, get_message_count, get_unread_message_count,
get_permanent_flags, get_message_flags, set_message_flags,
get_message_user_flag, set_message_user_flag, get_uids,
get_summary, get_subfolder_names. Turn camel_folder_delete_message
into a macro. (Mostly a pull-up from the camel-async branch.)
* providers/{imap,mbox,nntp,pop3,vee}: Update for CamelFolder
changes
Jeffrey Stedfast [Tue, 25 Jul 2000 02:02:14 +0000 (02:02 +0000)]
Updated to port easily to the new Camel API (imap_init): Don't SELECT
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message_info): Updated
to port easily to the new Camel API
(imap_init): Don't SELECT INBOX, we don't need to do that
Jeffrey Stedfast [Mon, 24 Jul 2000 23:10:21 +0000 (23:10 +0000)]
Initialize the summary and subfolder listing. (imap_summary_free): Now
2000-07-24 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_new):
Initialize the summary and subfolder listing.
(imap_summary_free): Now takes a GPtrArray arg rather than a
CamelImapFolder as it increases it's usefullness for free()'ing
temporary summaries.
(imap_get_message_count_internal): A new convenience function for
getting the actual message count on a server to be used by
imap_get_summary_internal)
(imap_get_message_count): Since the Camel API is on the move again,
the future version of this function will not be able to make a
call to the store, it must only access previously fetched data (thus
the creation of the _internal function)
(imap_get_subfolder_names_internal): Again, because the future version
of imap_get_subfolder_names will not take an exception, we must rename
this function which will be called by camel_imap_folder_new()
(imap_get_subfolder_names): We now return the previously collected
subfolder listing that the _internal function fetched previously
(imap_get_summary_internal): Again, same idea as the previous _internal
functions...
(imap_get_summary): Again... now returns a previously aquired summary
* providers/imap/camel-imap-store.c (imap_noop): This will hopefully
prevent the imap store from disconnecting.
(imap_connect): Modified to add a gtk timeout event that will call
imap_noop() every 10 minutes (we may want to change this time value)
(imap_disconnect): Modified to remove the NOOP timeout event from the
store.
(camel_imap_command_extended): Commented out the code that would try
and detect if the store was disconnected and then reconnect if it was
needed.
Dan Winship [Mon, 24 Jul 2000 15:16:09 +0000 (15:16 +0000)]
Remove camel_folder_get_message_uid, which was not used, and not
* camel-folder.[ch]: Remove camel_folder_get_message_uid, which
was not used, and not implemented by any provider.
* providers/nntp/camel-nntp-folder.c: Remove get_message_uid
non-implementation.
Dan Winship [Mon, 24 Jul 2000 15:13:07 +0000 (15:13 +0000)]
Bye bye bye.
* camel-folder-pt-proxy.[ch], camel-arg-collector.c,
camel-marshal-utils.[ch]: Bye bye bye.
* Makefile.am: remove reference to camel-arg-collector.c
Jeffrey Stedfast [Mon, 24 Jul 2000 01:37:43 +0000 (01:37 +0000)]
Made it a little more forgiving. Also set current_folder to NULL as there
2000-07-23 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_disconnect): Made it a
little more forgiving. Also set current_folder to NULL as there is
no selected folder after a disconnect.
(stream_is_alive): Detects whether or not a socket is "alive"
(camel_imap_command_extended): Use stream_is_alive() to aid in the
detection of a disconnected state.
Jeffrey Stedfast [Sat, 22 Jul 2000 19:12:55 +0000 (19:12 +0000)]
Clear CamelExceptions when appropriate (eg when folder is marked as
2000-07-22 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (get_folder): Clear CamelExceptions when
appropriate (eg when folder is marked as \NoSelect). Still needs some
cleanup and perhaps Dan will have a better way of doing this as this seems
like a messy way of handling this.
* providers/imap/camel-imap-folder.c (imap_get_uids): Took out some debug
statements as they are no longer needed.
Jeffrey Stedfast [Sat, 22 Jul 2000 01:38:41 +0000 (01:38 +0000)]
Updated to not strip out subfolders that are marked as \NoSelect because
2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_subfolder_names): Updated to
not strip out subfolders that are marked as \NoSelect because this will be
correctly handled in store->get_folder from now on.
* providers/imap/camel-imap-store.c (folder_is_selectable): New convenience
function for use in get_folder().
(parse_list_response): Now takes a char **flags argument which is needed by
folder_is_selectable().
(imap_connect): Updated to reflect changes to parse_list_response().
Jeffrey Stedfast [Fri, 21 Jul 2000 19:48:43 +0000 (19:48 +0000)]
Updated with some of the same fixes I've made to camel-imap-folder.c like
2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-stream.c (stream_read): Updated with some of the
same fixes I've made to camel-imap-folder.c like recalculating message part
lengths.
Jeffrey Stedfast [Fri, 21 Jul 2000 19:30:20 +0000 (19:30 +0000)]
Rewrote the code to check for "* %d RECENT". Still needs to be modified,
2000-07-21 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (camel_imap_command_extended): Rewrote
the code to check for "* %d RECENT". Still needs to be modified, but should
no longer cause an infinite loop by detecting mis-detecting RECENT messages.
Jeffrey Stedfast [Thu, 20 Jul 2000 04:29:54 +0000 (04:29 +0000)]
Oops. Fix UID parser to allow 0 and 9 to be in the range of valid UID
2000-07-20 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary):
(imap_get_message_info): Oops. Fix UID parser to allow 0 and 9 to be in
the range of valid UID chars.
Jeffrey Stedfast [Wed, 19 Jul 2000 21:43:44 +0000 (21:43 +0000)]
General cleanup working towards getting Actions->Expunge working
2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c: General cleanup working towards
getting Actions->Expunge working correctly.
* providers/imap/camel-imap-store.c (cammel_imap_command_extended): Added
code to look for "* %d RECENT" and to emit the folder_changed signal if
there are any recent messages. Note: this is a hack and needs to be rewritten
badly.
Jeffrey Stedfast [Wed, 19 Jul 2000 18:15:37 +0000 (18:15 +0000)]
If the folder's message count is not the same as the number of summaries,
2000-07-19 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_summary): If the folder's
message count is not the same as the number of summaries, free the old
summary and create a new summary.
Jeffrey Stedfast [Tue, 18 Jul 2000 20:56:46 +0000 (20:56 +0000)]
Added in imap_[g,s]et_message_user_flag() methods (imap_get_message_info):
2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_class_init): Added
in imap_[g,s]et_message_user_flag() methods
(imap_get_message_info): Rewrote to use the more efficient way of
downloading summary information and also added a UID comparison so that
if the UID requested doesn't match the UID received, it returns NULL.
FIXME: When the mailer gets NULL when it requested message info, it
seems that it displays a row for that message and when you try and select
the blank row, it segfaults.
* providers/imap/camel-imap-store.c (get_folder): Oops, this should not be
checking against "/", it should be checking against dir_sep.
* providers/imap/camel-imap-folder.c (imap_parse_subfolder_line): Updated
to trim out the leading namespace.
(imap_get_subfolder_names): Let the subfolder parser trim the namespace
off the folder name.
Jeffrey Stedfast [Tue, 18 Jul 2000 19:36:12 +0000 (19:36 +0000)]
Added in imap_[g,s]et_message_user_flag() methods
2000-07-18 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (camel_imap_folder_class_init): Added
in imap_[g,s]et_message_user_flag() methods
* providers/imap/camel-imap-store.c (get_folder): Oops, this should not be
checking against "/", it should be checking against dir_sep.
* providers/imap/camel-imap-folder.c (imap_parse_subfolder_line): Updated
to trim out the leading namespace.
(imap_get_subfolder_names): Let the subfolder parser trim the namespace
off the folder name.
Jeffrey Stedfast [Tue, 18 Jul 2000 00:02:59 +0000 (00:02 +0000)]
Send a "LOGOUT" command.
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c (imap_disconnect): Send a "LOGOUT"
command.
* providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get
IMAP code to work with CommunigatePro and MS Exchange (and any other
servers that send back a UID at the end of each FETCH inside of the main
body of the message part).
(imap_sync): Un-#if 0 the code that sets the flags on the IMAP server
for messages that have changed. Oops, don't mask with DELETED to find out
if the message has been answered ;-)
(imap_expunge): sync before expunging.
Jeffrey Stedfast [Mon, 17 Jul 2000 22:19:19 +0000 (22:19 +0000)]
Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get
IMAP code to work with CommunigatePro and MS Exchange (and any other
servers that send back a UID at the end of each FETCH inside of the main
body of the message part).
(imap_sync): Un-#if 0 the code that sets the flags on the IMAP server
for messages that have changed. Oops, don't mask with DELETED to find out
if the message has been answered ;-)
Jeffrey Stedfast [Mon, 17 Jul 2000 21:55:04 +0000 (21:55 +0000)]
oops, s/status/s in imap_sync()
Jeffrey Stedfast [Mon, 17 Jul 2000 21:50:11 +0000 (21:50 +0000)]
Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get
IMAP code to work with CommunigatePro and MS Exchange (and any other
servers that send back a UID at the end of each FETCH inside of the main
body of the message part).
(imap_sync): Un-#if 0 the code that sets the flags on the IMAP server
for messages that have changed
Jeffrey Stedfast [Mon, 17 Jul 2000 21:42:49 +0000 (21:42 +0000)]
Hacks to get IMAP code to work with CommunigatePro and MS Exchange (and
2000-07-17 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c (imap_get_message): Hacks to get
IMAP code to work with CommunigatePro and MS Exchange (and any other
servers that send back a UID at the end of each FETCH inside of the main
body of the message part).
Jeffrey Stedfast [Mon, 17 Jul 2000 03:27:30 +0000 (03:27 +0000)]
minor fixes that came up when building with gcc -ansi -pedantic
Jeffrey Stedfast [Mon, 17 Jul 2000 02:41:50 +0000 (02:41 +0000)]
All SELECT calls now pass a NULL folder argument to
2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-folder.c: All SELECT calls now pass
a NULL folder argument to camel_imap_command_extended() since it's
not needed. Also s/camel_imap_command/camel_imap_command_extended as
I will probably be doing away with camel_imap_command() or at least
only using it for LOGIN and similar commands where the server won't
notify us of any recent messages.
Jeffrey Stedfast [Mon, 17 Jul 2000 02:16:02 +0000 (02:16 +0000)]
All SELECT calls now pass a NULL folder argument to
2000-07-16 Jeffrey Stedfast <fejj@helixcode.com>
* providers/imap/camel-imap-store.c: All SELECT calls now pass
a NULL folder argument to camel_imap_command_extended() since it's
not needed.
(imap_connect): Moved service_class->connect() to the point right
after a connection is established with the server rather than
waiting until the end of the function.
(camel_imap_command): Updated the documentation comment
(camel_imap_command_extended): Before sending a command, first
check to make sure we are connected; if we aren't, then reconnect.
Don't strncmp() command with "SELECT" as it's redundant.
* providers/imap/camel-imap-folder.c: All SELECT calls now pass
a NULL folder argument to camel_imap_command_extended() since it's
not needed.