Commit Graph

747 Commits

Author SHA1 Message Date
61ec5b754b ignore test-newsrc
2000-06-22  Chris Toshok  <toshok@helixcode.com>

	* providers/nntp/.cvsignore: ignore test-newsrc

	* providers/nntp/camel-nntp-store.c,
	providers/nntp/camel-nntp-store.h,
	providers/nntp/camel-nntp-folder.c,
	providers/nntp/camel-nntp-folder.h,
	providers/nntp/camel-nntp-utils.c: Bring the nntp provider up to a
	state where it builds and is usable with the current camel.  there
	are still warts (semi-broken .newsrc file handling, and a lack of
	a subscribe ui -- in fact no way to add a new server, really), but
	it'll display news messages.

	* providers/nntp/Makefile.am (libcamelnntp_la_SOURCES): add
	camel-nntp-newsrc.c
	(libcamelnntpinclude_HEADERS): add camel-nntp-newsrc.h
	also, add test-newsrc stuff.

	* providers/nntp/test-newsrc.c: new file that tests the newsrc
	stuff by parsing and regurgitating a .newsrc file for a particular
	server.

	* providers/nntp/camel-nntp-newsrc.c,
	providers/nntp/camel-nntp-newsrc.h: new files, initial support for .newsrc files.

svn path=/trunk/; revision=3702
2000-06-23 02:03:35 +00:00
a7f40b2f5f Updated
2000-06-22  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/sendmail/camel-sendmail-provider.c:
	* providers/vee/camel-vee-provider.c:
	* providers/smtp/camel-smtp-provider.c:
	* providers/mbox/camel-mbox-provider.c:
	* providers/pop3/camel-pop3-provider.c:
	* providers/imap/camel-imap-provider.c: Updated

	* camel-session.c: Moved service_cache hash table into the
	providers.
	(service_cache_remove): Updated.
	(camel_session_get_service): Updated.

	* camel-url.c (camel_url_hash): Took out the hashing of
	url->passwd. We don't want this anymore.

	* providers/imap/camel-imap-folder.c (imap_init): Took out
	references to 'namespace'
	(camel_imap_folder_init): Same

	* providers/imap/camel-imap-folder.h: No more namespace. We are
	instead going to use url->path as the namespace.

svn path=/trunk/; revision=3700
2000-06-22 21:51:40 +00:00
2751abfcef Modified to use the "namespace" (url->path) if it exists.
2000-06-21  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-store.c (imap_create): Modified to
	use the "namespace" (url->path) if it exists.

	* providers/imap/camel-imap-folder.c (imap_delete_message_by_uid):
	Now just sets the deleted flag on the summary rather than speaking
	directly to the IMAP server. This is both faster and cleaner.

svn path=/trunk/; revision=3688
2000-06-21 23:51:36 +00:00
36f9a55056 Fix dumb bug.
* providers/pop3/camel-pop3-store.c (query_auth_types): Fix dumb
	bug.

svn path=/trunk/; revision=3682
2000-06-21 22:28:30 +00:00
ed696d7133 IMAP is working! (sorta)
you can now read your INBOX

svn path=/trunk/; revision=3680
2000-06-21 20:38:22 +00:00
d0f4337af7 When determining a mailboxe's folder_file_path et aluse its basename to prevent the triple-slash filenames (~/ev/inbox///movemail.ibex)
svn path=/trunk/; revision=3679
2000-06-21 18:22:21 +00:00
242ffb8b8e Set date_received based on the first (most recent) "Received" header.
* camel-folder-summary.c (message_info_new): Set date_received
	based on the first (most recent) "Received" header.

svn path=/trunk/; revision=3677
2000-06-21 18:15:27 +00:00
4f20138bfc flush the filter stream before unreffing it, so it will
* camel-mime-part.c (write_to_stream): flush the filter stream
	before unreffing it, so it will camel_mime_filter_complete.

	* camel-stream-filter.c (camel_stream_filter_class_init): Fix a
	braino so camel_stream_flush works here.

	* camel-stream-mem.c (stream_seek): Fix a bug that resulted in
	large attachments being silently dropped.

	* providers/pop3/camel-pop3-store.c
	(camel_pop3_command_get_additional_data): Don't use g_strjoinv
	here, since it is O(n^2) on the length of the output string, and
	we can do O(n).

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): add a CRLF decoder
	after the QP/B64 decoder if it's text.

svn path=/trunk/; revision=3658
2000-06-21 02:09:48 +00:00
5d477147b7 now parses flags gotten from the IMAP server correctly
svn path=/trunk/; revision=3654
2000-06-20 22:33:40 +00:00
de2f05a152 Implemented. (imap_sync): Added code to set flags on messages that have
2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-folder.c (imap_set_message_flags):
	Implemented.
	(imap_sync): Added code to set flags on messages that have had
	their flags changed (however I #if'd it out until we are more
	confidant in the IMAP code :)

svn path=/trunk/; revision=3652
2000-06-20 22:07:48 +00:00
9272361bba Only fetch the summary if the folder summary doesn't already exist. When
2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-folder.c (imap_get_summary): Only
	fetch the summary if the folder summary doesn't already exist.
	When the summary *does* exist, start fetching from 1, not 0.
	(imap_free_summary): Don't do anything here.
	(imap_finalize): Free the summary here instead of in
	imap_free_summary().

	* camel-url.c (check_equal): No need to check s1 if s2 is NULL
	(camel_url_equal): Don't check the passwd component of the url.

and in mail/component-factory.c (create_imap_storage): removal of
debug statements
mail/folder-browser.c (folder_browser_load_folder): improved imap
service parser

svn path=/trunk/; revision=3649
2000-06-20 21:11:07 +00:00
b7f2532c93 mark the message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
* camel-folder-summary.c (camel_folder_summary_add): mark the
	message info with CAMEL_MESSAGE_FOLDER_FLAGGED if we change the
	uid, so the folder will know that it's dirty.

svn path=/trunk/; revision=3647
2000-06-20 17:37:33 +00:00
98928d9663 Now returns the last line of data that the server sends back as well. This
2000-06-20  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-store.c (camel_imap_command_extended):
	Now returns the last line of data that the server sends back as
	well. This is needed for commands like SELECT (like Peter pointed
	out).
	(camel_imap_command): No longer checks for SELECT (no need)

	* providers/imap/camel-imap-folder.c: Added namespace stuff
	which we will need later on...
	(imap_parse_subfolder_line): Convenience function for use in
	get_subfolder_names()
	(imap_get_subfolder_names): Updated. Also changed it to use LIST
	instead of LSUB (temporary change).

svn path=/trunk/; revision=3646
2000-06-20 17:34:18 +00:00
1ede35fcdd basically got IMAP into the tree view
svn path=/trunk/; revision=3643
2000-06-20 04:57:39 +00:00
b27eb5f67a Set summary equal to NULL. (imap_get_summary): Store the summary in the
2000-06-19  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-folder.c (camel_imap_folder_init):
	Set summary equal to NULL.
	(imap_get_summary): Store the summary in the ImapFolder
	(imap_summary_get_by_uid): If we have a summary cache in the
	ImapFolder, first check to see if that message info is in the
	cached summary first, if not fetch it directly from the IMAP
	server and append it to the summary cache.
	(imap_get_message_flags): Don't free the message info that we
	get back from summary_get_by_uid as we don't want to be
	corrupting our cached summary.

svn path=/trunk/; revision=3636
2000-06-19 20:54:50 +00:00
b14b1bfac1 Read the full server reply when we SELECT mailboxes.
svn path=/trunk/; revision=3635
2000-06-19 20:46:20 +00:00
e02ffba8e0 Now gets the message flags as it should. (imap_get_summary): Same as
2000-06-18  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-folder.c (imap_summary_get_by_uid):
	Now gets the message flags as it should.
	(imap_get_summary): Same as imap_summary_get_by_uid
	(imap_get_permanent_flags): Return the permanent flags stored
	on the folder.
	(imap_get_message_flags): Return message flags associated with
	given uid. Note: we may want to somehow cache summary info so
	that we don't have to keep querying the IMAP provider in
	imap_summary_get_by_uid().

svn path=/trunk/; revision=3626
2000-06-18 21:47:21 +00:00
c1c936c70a We were leaking memory - but not anymore! (imap_get_summary): We now get
2000-06-17  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-folder.c (imap_free_summary): We were
	leaking memory - but not anymore!
	(imap_get_summary): We now get the UIDs and the beginnings of the
	code to get the message flags as well.

svn path=/trunk/; revision=3625
2000-06-18 01:56:23 +00:00
4ffc39159b Don't copy newlines into the parsed header text, and turn any number of
* camel-mime-parser.c (folder_scan_header): Don't copy newlines
	into the parsed header text, and turn any number of tabs and
	spaces after a newline into a single space.

svn path=/trunk/; revision=3624
2000-06-18 00:59:15 +00:00
f4ae655f41 camel/providers/imap/camel-imap-folder.c: CAPABILITY now works like it should
po/POTFILES.in: removed reference to camel/providers/imap/imap.c - this was just
a temporary file to use as a reference for IMAP code

svn path=/trunk/; revision=3623
2000-06-18 00:18:57 +00:00
67936b0c77 Add some debugging printfs when rebulding summary to help figure out why
* providers/mbox/camel-mbox-summary.c: Add some debugging printfs
	when rebulding summary to help figure out why people's summaries
	are always being rebuilt.

svn path=/trunk/; revision=3614
2000-06-17 19:12:47 +00:00
cde9231ca7 removed imap.c/h from providers/imap
began implementing search functionality

svn path=/trunk/; revision=3613
2000-06-17 19:00:58 +00:00
18dc66f594 Added code to expunge if called for (still need to finish coding this).
2000-06-16  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-folder.c (imap_sync): Added code
	to expunge if called for (still need to finish coding this).
	(imap_get_uids): Implemented.
	(imap_get_summary): Found a way to get the date
	(imap_summary_get_by_uid): Same.
	(imap_free_summary): Implemented.

	* string-utils.c (strstrcase): Fixed a compile warning

	* providers/imap/camel-imap-summary.c: Removed - we don't
	need a CamelImapSummary structure.

svn path=/trunk/; revision=3606
2000-06-17 05:29:55 +00:00
174d7c38d1 Move flag handling from CamelMimeMessage to CamelFolder. This
simplifies several flag-handling pieces of code in the mailer, and
	lets you change a message's flags without having to fetch the
	message body. It also means that fully-constructed
	CamelMimeMessages are now essentially constant, which will help
	simplify locking issues later since it means two threads
	interested in the same message can just work with separate copies
	of it.

	* camel-mime-message.h (struct _CamelMimeMessage): Removed flags
	and user_flags (moved to summary). Removed expunged and
	message_number which were unused. Removed message_uid and folder
	which are no longer needed in the new scheme.
	(struct CamelMimeMessageClass): Removed message_changed signal and
	get/set_message_number methods.

	* camel-mime-message.c: Updates for CamelMimeMessage changes.
	(camel_mime_message_get/set_flags,
	camel_mime_message_get/set_user_flag): Replaced with methods in
	CamelFolder.
	(camel_flag_get, camel_flag_set, camel_flag_list_size,
	camel_flag_list_free): Moved verbatim to camel-folder-summary.c

	* camel-folder.c (camel_folder_get/set_message_flags,
	camel_folder_get/set_message_user_flag): New methods (and
	corresponding useless default implementations)
	(camel_folder_class_init): add a message_changed signal

	* camel-folder-summary.c (camel_flag_get, camel_flag_set,
	camel_flag_list_size, camel_flag_list_free): Moved here from
	camel-mime-message.c

	* providers/mbox/camel-mbox-folder.c (message_changed): Removed.
	(mbox_get_message_flags, mbox_set_message_flags,
	mbox_get_message_user_flag, mbox_set_message_user_flag): Tweak
	summary bits as appropriate. (Functionality moved here from
	message_changed.)
	(mbox_get_message_by_uid): Update for CamelMimeMessage changes
	(less stuff to initialize).

	* providers/imap/camel-imap-folder.c (message_changed): Remove
	this. It was just copied from the mbox provider and doesn't deal
	with the real IMAP flag stuff anyway. (So there's currently no
	flag support in the IMAP provider.)
	(imap_get_message_by_uid): Update for CamelMimeMessage changes.

	* providers/vee/camel-vee-folder.c: (message_changed): Remove old
	one. Add a new one to listen for message_changed on each folder
	and re-emit message_changed signals that correspond to messages in
	the vfolder.
	(vee_get/set_message_flags, vee_get/set_message_user_flag): Proxy
	flag setting to the underlying real messages.
	(vee_append_message): Removed for now; there's no way to translate
	this into the new CamelMimeMessage/CamelFolder scheme, but (a)
	there's also no code which would ever call it and (b) we're
	probably going want a better interface than append_message for
	message drag and drop to work anyway. To be revisited.

svn path=/trunk/; revision=3598
2000-06-16 23:09:43 +00:00
f0600c2ccb KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet, output
* camel-mime-utils.c (rfc2047_decode_word):
	* camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
	* camel-folder-summary.c (summary_build_content_info):
	KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
	output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
	This will be reverted later.

svn path=/trunk/; revision=3597
2000-06-16 22:42:12 +00:00
4ad1d8f783 document camel_folder_search_by_expression
svn path=/trunk/; revision=3587
2000-06-16 01:27:55 +00:00
57689076e4 Started to code the imap summary stuff
svn path=/trunk/; revision=3585
2000-06-16 00:20:45 +00:00
a0b7ca18e2 Remove camel_service_connect_with_url. (URLs must be specified when the
* camel-service.c: Remove camel_service_connect_with_url. (URLs
	must be specified when the service is requested from the session,
	so that there can only ever be one service for any URL.)

svn path=/trunk/; revision=3584
2000-06-15 23:05:18 +00:00
cd157eecb9 Kill. Folders are now always open, and handle "closing" sorts of
* camel-folder.c: (camel_folder_open, camel_folder_is_open,
	camel_folder_get_mode): Kill. Folders are now always open, and
	handle "closing" sorts of operations at sync or finalize time.
	(camel_folder_sync): renamed from camel_folder_close. Syncs state
	to the store but doesn't necessarily close/disconnect.

	* providers/*/camel-*-folder.c: Merge "open" methods into "init"
	methods. Rename close to sync and update appropriately.

	* providers/imap/camel-imap-store.c: Remove camel_imap_store_open
	and camel_imap_store_close, which should not have been copied from
	the POP provider (where the exist to work around limitations of
	the POP protocol).

svn path=/trunk/; revision=3581
2000-06-15 22:19:44 +00:00
e1de51e60e fix a bug. (don't expunge deleted messages if called with expunge ==
* providers/mbox/camel-mbox-summary.c: fix a bug. (don't expunge
	deleted messages if called with expunge == FALSE)

svn path=/trunk/; revision=3580
2000-06-15 22:18:48 +00:00
49b37933f9 Check server for various interesting extensions.
* providers/pop3/camel-pop3-store.c (connect_to_server): Check
	server for various interesting extensions.

	* providers/pop3/camel-pop3-folder.c (get_uids): If the server
	supports UIDL, use real UIDs rather than fake ones.
	(etc): Map uids back to numbers appropriately

svn path=/trunk/; revision=3578
2000-06-15 19:38:00 +00:00
f3e0d87b42 Fix to previous change: make sure the "seek" variable ends up with the
* providers/mbox/camel-mbox-folder.c (mbox_append_message): Fix to
	previous change: make sure the "seek" variable ends up with the
	value it should.

	* providers/mbox/camel-mbox-summary.c (summary_rebuild): Update
	summary mtime as well as size.

svn path=/trunk/; revision=3577
2000-06-15 17:52:06 +00:00
f6bfa59574 if the mbox doesn't end with a '\n', write one before appending the new
* providers/mbox/camel-mbox-folder.c (mbox_append_message): if the
	mbox doesn't end with a '\n', write one before appending the new
	message.

svn path=/trunk/; revision=3562
2000-06-14 05:10:58 +00:00
abdfcfcfe2 updated the crlf filter:
encoder: allocate more memory (3 * len instead of 2 * len)

decoder: prevent p from pointing beyond the end of the buffer

svn path=/trunk/; revision=3561
2000-06-14 05:10:57 +00:00
477a592e59 Took out the filter code ( we already filter in
* providers/pop3/camel-pop3-folder.c (get_message_by_uid): Took out the
	filter code ( we already filter in camel_pop3_command_get_additional_data)

svn path=/trunk/; revision=3560
2000-06-14 05:10:56 +00:00
e4b07cd9d1 Updated: a separator is now a char* rather than a single char because IMAP
2000-06-14  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-folder.c (init): Updated: a separator is now a char* rather than
	a single char because IMAP can have a string for a directory separator.
	Also, since IMAP does not begin with a directory separator, there is a new
	argument (path_begins_with_sep) which decides if a directory should begin
	with a directory separator.

	* providers/imap/camel-imap-store.c (imap_create): Since, on connect,
	Camel tries to create INBOX (which already exists on every IMAP provider)
	we can return TRUE when the folder name is "INBOX".

	* providers/vee/camel-vee-folder.c (vee_init): Updated.

	* providers/imap/camel-imap-folder.c (camel_imap_folder_new): Updated.

	* providers/mbox/camel-mbox-store.c (get_folder): Updated.

	* providers/mbox/camel-mbox-folder.c (mbox_init): Updated.

	* providers/pop3/camel-pop3-folder.c (camel_pop3_folder_new): Updated.

svn path=/trunk/; revision=3559
2000-06-14 05:10:55 +00:00
9f197c605b Renamed from camel_mbox_summary_expunge. Takes a gboolean saying whether
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
	Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
	whether to expunge or just sync the mbox file. Change some
	g_errors to g_warning so we don't abort. Make the quick
	X-Evolution updating code lseek around correctly. Update the
	mbox mtime in the summary file even in the quick case.

	* providers/mbox/camel-mbox-summary.h: make
	CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
	CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h

	* providers/mbox/camel-mbox-folder.c (mbox_close): call
	camel_mbox_summary_sync to save flag state if not expunging.
	(mbox_expunge): Update for camel_mbox_summary_expunge rename.

svn path=/trunk/; revision=3558
2000-06-14 05:10:54 +00:00
a18691c17e IMAP will now allow you to login, and on some IMAP providers it will actually allow you to get mail - however there are some things that might need to be rewritten in Camel to allow all IMAP providers to work
right now, it wants to open /INBOX which isn't always the same as INBOX
Camel won't seem to allow me to just have it open "INBOX" if I specify '/' as the separator
*sigh*

svn path=/trunk/; revision=3557
2000-06-14 05:10:53 +00:00
c0748cf4f1 implemented a temp hack for the imap fetch by uid code
(works something like the POP code, should be fixed to work like we originally planned)

svn path=/trunk/; revision=3540
2000-06-13 00:27:30 +00:00
ee7f4d32f9 pop provider now uses the crlf filter
svn path=/trunk/; revision=3538
2000-06-12 23:20:16 +00:00
9d229d236a Removed the camel-mime-filter-smtp.h entry from Makefile.am - oops!
svn path=/trunk/; revision=3537
2000-06-12 22:34:28 +00:00
d6291ddc1f Deprecated.
2000-06-12  Jeffrey Stedfast  <fejj@helixcode.com>

	* camel-mime-filter-smtp.c: Deprecated.

	* providers/smtp/camel-smtp-transport.c (smtp_data): Updated to use
	camel-mime-filter-crlf with my 'dot' extension in place of
	camel-mime-filter-smtp

	* camel-mime-part.c (write_to_stream): Updated to reflect changes
	made to camel-mime-filter-crlf.c

	* camel-mime-filter-crlf.c (filter): Modified to be able to
	encode/decode dots ("\n.\n"<->"\n..\n"). Also fixed the decoder
	so that it should no longer get caught in an infinite loop.

svn path=/trunk/; revision=3536
2000-06-12 22:32:54 +00:00
94eda6b11d don't pass a second (incorrect) -rpath in addition to the (correct) one
* providers/*/Makefile.am: don't pass a second (incorrect) -rpath
	in addition to the (correct) one automatically provided by
	automake.

svn path=/trunk/; revision=3535
2000-06-12 20:59:32 +00:00
9573b501a8 New filter to do CRLF<->LF conversion. (Currently only tested in the
* camel-mime-filter-crlf.c: New filter to do CRLF<->LF conversion.
	(Currently only tested in the LF->CRLF direction.)

	* camel-mime-part.c (write_to_stream): if content-type is text,
	and it's QP or B64 encoded, pass through the CRLF filter before
	the other filter to satisfy the "canonical encoding" rules in the
	MIME spec.

svn path=/trunk/; revision=3529
2000-06-12 16:49:59 +00:00
2aefadf282 Add another argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
* camel-session.c (camel_session_query_authenticator): Add another
	argument, "mode", which can be CAMEL_AUTHENTICATOR_ASK or
	CAMEL_AUTHENTICATOR_TELL, so callers can get the app to un-cache
	bad info.

	* providers/pop3/camel-pop3-store.c (pop3_connect): uncache the
	password if it doesn't work.

svn path=/trunk/; revision=3496
2000-06-09 22:00:53 +00:00
08cb892bea Updated to reflect changes made in camel-imap-store.c
2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/imap/camel-imap-stream.c (stream_read): Updated to reflect
	changes made in camel-imap-store.c

	* providers/imap/camel-imap-store.c (imap_create): No longer checks to
	make sure a folder doesn't already exists (as this is no longer needed)
	(camel_imap_command): Now takes a CamelFolder argument so it can detect
	whether or not it needs to SELECT a folder or not
	(camel_imap_command_extended): Same.

svn path=/trunk/; revision=3494
2000-06-09 21:19:57 +00:00
59d329b5b0 Will now always send EHLO first, if that fails it will fall back on HELO.
2000-06-09  Jeffrey Stedfast  <fejj@helixcode.com>

	* providers/smtp/camel-smtp-transport.c (smtp_connect): Will now always
	send EHLO first, if that fails it will fall back on HELO.
	(esmtp_get_authtypes): Should now correctly parse authtypes.

svn path=/trunk/; revision=3490
2000-06-09 18:58:57 +00:00
dd9fba5eec Initial datawrapper diagram.
svn path=/trunk/; revision=3472
2000-06-07 23:57:18 +00:00
6ce7c0054f Parser state diagram.
svn path=/trunk/; revision=3471
2000-06-07 23:55:26 +00:00
c6f978717a providers/imap/camel-imap-summary.c now builds
svn path=/trunk/; revision=3470
2000-06-07 23:00:34 +00:00