Commit Graph

242 Commits

Author SHA1 Message Date
Danny Baumann 5d1e42c453 Improve certificate failure notifications.
The commit that introduced those notifications also introduced a rather
... interesting design pattern: The CertificateValidationException
notified the user of its pure existance - it's no longer a 'message'
only, but defines policy. As this is more than unusual, replace this
pattern by the MessagingController treating
CertificateValidationException specially when accessing remote folders.

Also make clear which account failed when constructing the notification.
2013-02-02 13:04:41 +01:00
Joe Steele 29f15d715d Fix Issue 2389: Self signed certificate expiry causes silent send/receive failure.
With this fix, a CertPathValidatorException or CertificateException will
create a "Certificate error:  Check your server settings" notification
in the status bar.  When the user clicks on the notification, they are
taken to the appropriate server settings screen where they can review their
settings and can accept a different server certificate.
2013-01-10 16:49:55 -05:00
cketti bcd52a6707 Fetch in-reply-to header when downloading envelope on IMAP accounts 2012-12-13 17:03:35 +01:00
cketti 44348e08a4 Create non-existent IMAP folders when copying/moving messages 2012-12-10 21:42:57 +01:00
cketti 63b6b497a0 Early version of message threading
Missing:
- UI support for threading when polling
- code to upgrade existing installations
- UI elements to switch from/to threaded display mode
- threading of messages with same subject
2012-10-08 22:51:29 +02:00
Andrew Chen 39e2a973a1 Merge branch 'imapsearch'
* imapsearch:
  Change settings version to 18 to match what's currrently on master.
  Handle aborted imap searches by nuking in-progress connections.
  Move IMAP search into the Folder level.
  Remove duplicate notification on remote search start.
  Rename variables
  changed PREFERENCE_CLOUD_SEARCH_ENABLED from "cloud_search_enabled" to "remote_search_enabled" in activity/setup/AccountSettings.java to resolve FC.
  Add cloud search icon to local search result screen. Implement pull-to-remote-search.
  Log remote search exceptions in addition to toasting them.
  Add settings export for remote search settings.
  Whitespace; no functional changes.
  Handle implicit vs. explicit searches in ActionBar home button behavior.
  Whitespace fix; no functional changes.
  Add remote search actionbar icons.
  IMAP Search: log exceptions on remote search, properly dispatch MessageList changes.
  modified loadMessageForView() to dowload message if neither X_DOWNLOADED_FULL nor X_DOWNLOADED_PARTIAL.
  Add remote IMAP search support.

Conflicts:
	res/menu/message_list_option.xml
	res/values/attrs.xml
	res/values/themes.xml
	src/com/fsck/k9/activity/MessageList.java
	src/com/fsck/k9/preferences/Settings.java
2012-09-25 16:01:52 -07:00
Andrew Chen 2541753aff Handle aborted imap searches by nuking in-progress connections. 2012-09-25 15:46:30 -07:00
Andrew Chen 9f96cd36a7 Move IMAP search into the Folder level.
Should also consider moving the LocalStore search into the folder level and have the store call the folder level searches.
2012-09-25 14:34:59 -07:00
Andrew Chen 7631af1572 Log remote search exceptions in addition to toasting them. 2012-09-22 09:37:50 -07:00
cketti 2ee3378eef Use executeSimpleCommand() for UID COPY so the response type is checked
The previous code never failed e.g. on a "NO" response. That lead to
messages being deleted for a move action.
2012-09-14 02:08:39 +02:00
Rob Bayer fdb1267cb1 Add remote IMAP search support.
* rbayer/IMAPsearch: (21 commits)
  More cleanup
  Code Cleanup getRemoteSearchFullText -> isRemoteSearchFullText line wraps for preference items
  Refactor to allow fetching of extra search results beyond original request.  Most code moved out of ImapStore and ImapFolder and into MessagingController.searchRemoteMessagesSynchronous.  Should make it easier to add remoteSearch for other server types.
  Prevent delete of search results while search results open
  remove duplicated code block
  Don't hide Crypto when IMAPsearch disabled
  Code Style Cleanup: Tabs -> 4 spaces Remove trailing whitespace from blank lines
  tabs -> spaces (my bad...)
  Fix opening of folders to be Read-Write when necessary, even if they were previously opened Read-Only.
  add missing file
  Working IMAP search, with passable UI.
  UI improvements
  Simple help info when enabling Remote Search
  Dependency for preferences
  Basic IMAP search working
2012-09-13 09:10:37 -07:00
Bernhard Redl e5d56a4eac Fixes 4517: Junk special folder not autoconfigured (rfc6154 implementation was incomplete) 2012-09-09 19:12:37 -05:00
Bernhard Redl 474f32ad02 changed parseFlags to directly manimpulate member 2012-08-30 18:15:19 +02:00
Bernhard Redl 56105bcfe3 + add support for $Forwarded IMAP flag 2012-08-29 02:26:38 +02:00
cketti e1d9a4779d Changed the rest of ImapStore to use longs for storing UIDs 2012-07-07 16:46:07 +02:00
cketti a37c95b456 Move auto-unboxing out of if-clause 2012-07-07 15:41:55 +02:00
cketti c359eb3cb7 Use auto-unboxing when iterating over a List<Long> 2012-07-07 15:36:43 +02:00
cketti 08c6c63b31 Merge branch 'pullreq153' 2012-07-07 15:06:41 +02:00
András Veres-Szentkirályi 961872edf0 combined nested if statements in ImapStore 2012-07-06 14:35:01 +02:00
Joe Steele 102c6153a1 Issue 4359: IMAP message UIDs are 32 bit unsigned values and cannot be
stored in int, so we now parse them as long.
2012-07-05 18:00:49 -04:00
ashley willis b1b6d5fce4 Yahoo! IMAP seems to no longer require 'ID ("GUID" "1")' over non-3G.
see http://mobile.yahoo.com/mail for IMAP setup instructions.
2012-05-09 13:48:36 -05:00
cketti 0caac114a6 Added some error checks when processing IMAP FETCH responses 2012-04-03 07:55:52 +02:00
cketti 0cb4207ef7 IMAP: don't create the destination folder when copying messages 2012-03-09 21:51:48 +01:00
cketti 7163d39091 Change ImapException to always be a permanent error
This way IMAP commands that get anything but an "OK" response are never
tried again (pending actions).
2012-03-09 21:50:26 +01:00
cketti 5591865f17 Merge branch 'uidplus' 2012-02-29 14:09:41 +01:00
cketti fbc187a3e2 IMAP: Send the Message-ID as quoted string in getUidFromMessageId() 2012-02-19 19:51:06 +01:00
cketti 5083b8f1e8 Use newly imported AOSP code instead of ImapStore.parseSequenceSet() 2012-02-17 15:01:30 +01:00
cketti 3e4e6c72fd Cleaned up ImapStore.ImapFolder.copyMessages() 2012-02-16 22:12:44 +01:00
cketti 396005974a Cleaned up ImapStore.ImapFolder.appendMessages() 2012-02-16 21:33:53 +01:00
cketti 8e1627e1b9 Merge branch 'master' into uidplus
Conflicts:
	src/com/fsck/k9/controller/MessagingController.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2012-02-16 19:57:24 +01:00
cketti 32a29f131b Make sure an IOException is always passed through as MessagingException
This is important for the code handling pending actions in
MessagingController. If a non-permantent MessagingException is
encountered, the pending action is retried later.

Fixes issue 3696
2012-01-20 19:50:07 +01:00
cketti 258b0039d5 IMAP: also get the Message-ID when fetching the message "envelope"
This should fix issue 3994
2012-01-14 06:30:22 +01:00
cketti 66b7805a57 Fixed a bug in the IMAP response parser
Also got rid of ImapResponse.more() which isn't necessary anymore.
2012-01-12 07:56:52 +01:00
cketti 6de081c5b0 Minor cleanup 2011-12-19 02:21:27 +01:00
mwolschon 696666ca5e Issue 1303: can't send mail get "no route to host" error 2011-12-19 02:10:17 +01:00
cketti 63605b65b6 Add support for new auto-detect namespace setting to ImapStore 2011-12-01 06:30:47 +01:00
cketti 75cdbd860e Only save IMAP path prefix in store URI if auto-detection isn't used 2011-12-01 05:58:44 +01:00
cketti cb7b88680b Use Store.decodeStoreUri() in AccountSetupIncoming 2011-12-01 02:28:57 +01:00
cketti 9e0ea7dd79 Extended ImapStore URI to support empty IMAP path prefix 2011-12-01 01:57:50 +01:00
cketti d6fbeb2913 Fixed creation of store URIs when a "path" was used. 2011-11-29 21:45:52 +01:00
Apoorv Khatreja 4b0d3ccf21 Removed an unnecessary portion of code that attempted to handle command continuation requests after a UID COPY command. Also removed some extraneous test code that mysteriously creeped into the repo. 2011-11-17 02:46:01 +05:30
Andrew Chen 7ca438669e Add theoretical support for RFC6154 SPECIAL-USE for auto-configuration. 2011-11-14 18:55:11 -08:00
Andrew Chen 95215f00b7 Kerio also supports auto-configuration; remove the gmail.com requirement to use XLIST for auto-configuration. 2011-11-14 18:27:08 -08:00
Andrew Chen 2f3565d180 Implement Gmail's XLIST IMAP command to determine Gmail-specific folders. 2011-11-14 18:15:32 -08:00
cketti 88a2dd6289 Merge branch 'issue549'
Conflicts:
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2011-11-05 18:47:55 +01:00
Andrew Gaul d301089f3c Avoid string concatenation in String.format 2011-11-03 18:47:34 -07:00
Andrew Chen d80e5bfbd0 Merge pull request #90 from andrewgaul/close-quietly
Call IOUtils.closeQuietly instead of using empty try/catch block.
2011-11-03 06:35:42 -07:00
Andrew Chen 64b299ebec Merge pull request #89 from andrewgaul/is-empty
Prefer Collection.isEmpty over size
2011-11-03 06:34:15 -07:00
Andrew Gaul b1a807a712 Call IOUtils.closeQuietly where appropriate 2011-11-02 22:22:15 -07:00
Andrew Gaul cb14cd9d78 Prefer StringBuilder.append over String.concat
Addresses FindBugs complaints.
2011-11-02 22:10:02 -07:00
Andrew Gaul 647ae0a31c Prefer Collection.isEmpty over size 2011-11-02 20:03:07 -07:00
Andrew Gaul 773f2e8870 Prefer Integer.valueOf over explicit boxing
Addresses a FindBugs complaint.
2011-10-31 21:58:32 -07:00
cketti 807907cb9e Merge branch 'master' into issue549
Conflicts:
	res/values/strings.xml
	src/com/fsck/k9/service/MailService.java
2011-10-29 05:22:07 +02:00
cketti b69d6cb64c Use Locale.US with toUpperCase() and toLowerCase() where appropriate 2011-10-27 17:17:43 +02:00
Andrew Gaul ce4b42f66b Remove duplicated combine flags code 2011-10-19 22:04:57 -07:00
cketti dd8cd33c5a Fixed decoding of store URIs with empty passwords 2011-10-18 05:05:40 +02:00
cketti 52a92d93a1 Add dialog to ask for server passwords after import 2011-10-17 04:34:26 +02:00
cketti fc8d2e9979 Merge branch 'master' into issue549
Conflicts:
	res/menu/accounts_context.xml
	res/menu/accounts_option.xml
	res/values/strings.xml
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/AsyncUIProcessor.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/ImportListener.java
	src/com/fsck/k9/activity/K9Activity.java
	src/com/fsck/k9/activity/K9ListActivity.java
	src/com/fsck/k9/activity/MessageView.java
	src/com/fsck/k9/mail/store/ImapStore.java
	src/com/fsck/k9/mail/store/Pop3Store.java
	src/com/fsck/k9/mail/store/WebDavStore.java
	src/com/fsck/k9/mail/transport/SmtpTransport.java
2011-10-14 20:33:25 +02:00
cketti b05750c245 Better input validation in *Store.createUri() 2011-10-13 02:35:08 +02:00
Andrew Gaul 47eb0fa2e1 Prefer StringBuilder over StringBuffer
The former is unsynchronized and slightly faster.
2011-10-05 21:50:31 -07:00
Apoorv Khatreja cf39070048 Whitespaces :/ 2011-07-25 18:56:21 +05:30
Apoorv Khatreja da9a5e6c17 Made some cosmetic changes for clarity, added debug messages for erroneous conditions. Fixed potential NPE in ImapFolder.parseSequenceSet(). 2011-07-25 06:50:26 +05:30
Jesse Vincent b02b895aaf Add 2MB, 5MB and "All" message download options 2011-07-02 15:29:49 -04:00
Apoorv Khatreja bc9b7030d7 COPYUID implementation now in place and working, restructured appendMessages, copyMessages and moveMessages globally to return a Map of srcUids -> destUids rather than returning nothing. This is now used to bring local and remote UIDs upto speed without the need for additional requests. 2011-06-28 16:50:48 +05:30
Apoorv Khatreja 0ba7f20622 Attempt to implement COPYUID, works for the most part except for updation of the LocalStore with freshly copied messages. 2011-06-24 02:54:12 +05:30
Apoorv Khatreja 970271dbf9 If the response for an APPEND command contains the APPENDUID response code, read the UID of the newly appended message from there. 2011-06-21 04:34:57 +05:30
cketti ded489daab Add support for incoming-server and outgoing-server elements on import 2011-06-09 05:50:43 +02:00
cketti bccf0b5546 Renamed class StoreSettings to ServerSettings 2011-06-07 16:09:15 +02:00
cketti f4bcb4d923 Extracted inner class Store.StoreSettings 2011-06-07 15:59:23 +02:00
cketti f6de6f8e42 Save name of the store type in StoreSettings 2011-06-07 04:07:50 +02:00
cketti 29738993d9 Added function to decode store URIs into a container object
This will later be used by the export code to make exporting the
password optional (and the XML output "pretty").
It's also the first step to get away from store URIs towards something
more easily extensible, like Store.StoreSettings.
2011-06-07 00:08:43 +02:00
Jesse Vincent 3d583da450 ant astyle 2011-06-01 16:03:56 -04:00
cketti 41b039b691 Fix bug introduced with commit b7a6dbd973
Fixes issue 3297
2011-05-15 16:23:53 +02:00
cketti 8e1c4acef9 Get rid of constant K9.OUTBOX
Use Account.getOutboxFolderName() instead (still hardcoded, though)
2011-05-08 02:22:38 +02:00
cketti b7a6dbd973 Skip IMAP folders with names that are not correctly encoded.
Configure the CharsetDecoder to throw an exception if malformed input
is encountered. Not doing this can cause an endless loop that
allocates memory until the application dies with an OutOfMemory error.
Until we have support for both a folder display name and a raw folder
name we simply ignore folders with names that aren't correctly encoded
with the modified UTF-7 variant.

Fixes issue 3268

Credits: Bernhard Redl (aatdark) analysed the problem and wrote the
initial version of the fix.
2011-04-28 04:46:01 +02:00
bitblaster 20a9043a13 Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
Jesse Vincent 0174988d27 astyle 2011-04-12 22:16:22 +10:00
cketti 2cadff74b1 Extracted CRAM-MD5 computation into separate class.
This gets rid of duplicated code in ImapStore, Pop3Store, and
SmtpTransport.
2011-04-07 17:11:32 +02:00
Jesse Vincent 97ec38d03f Move our IMAP Store to using a message's sizing method 2011-03-27 23:09:41 +08:00
cketti 83451cff10 Merge branch 'remove_non_api_dependencies' 2011-03-24 19:35:12 +01:00
cketti 330737c4c6 Fix length-check of BODYSTRUCTURE reply
Fixes issue 3116
2011-03-15 08:34:38 +01:00
cketti 171711fa9c Remove trailing space from IMAP command
This could be the cause of the error reported in issue 3089.
2011-03-04 03:36:52 +01:00
cketti 6f90d791b5 Removed dependency on (external) commons-codec and commons-logging 2011-02-26 17:36:18 +01:00
cketti 397d01d513 Fix bug with partitioning of IMAP FETCH commands 2011-02-21 21:07:56 +01:00
Matt Johnston d43f17ab94 Use java.util.zip for inflating
Can't use it for deflating since it doesn't have Z_PARTIAL_FLUSH
2011-02-21 04:57:46 +08:00
cketti 737cff0612 Hardcode folder name for (local) outbox and don't show outbox when
only being allowed to select remote folders.
2011-02-20 04:47:28 +01:00
Jesse Vincent 12d1097a24 Big, scary massive "ant astyle" to get us back to something
approximating AOSP coding standards.
2011-02-06 17:09:48 -05:00
Jesse Vincent 6550151684 Add serialVersionUID to Serializable classes to make eclipse happy 2011-01-31 23:45:14 +00:00
cketti 22834d6998 Removed unnecessary null pointer checks 2011-01-19 01:30:13 +00:00
Andrew Chen e56b044bbc Add support for HTML composition with text alternative.
Revamp K9 Identity string.
Quote names in Address only when needed.
Remove quoted text bar and move button to quoted text area.
2011-01-12 23:48:28 +00:00
Jesse Vincent 9c847d3e9d minor code cleanup 2011-01-06 16:55:34 +00:00
cketti f9f6160719 Correctly encode/escape strings when used in IMAP commands.
Fixes issue 2832
2011-01-06 00:39:09 +00:00
Jesse Vincent 9f4790088e Escape backslashes in IMAP mailbox names 2011-01-05 13:12:30 +00:00
Jesse Vincent 29fdb81f9b Fix for the "K9 skips every 101st message when fetching on IMAP" bug by
e-t172 <e-t172@akegroup.org>. Fixes Issue 2819
2010-12-30 23:57:41 +00:00
Fiouz 47762a9baa Remove coupling between ImapStore and ImapConnection by adding an settings indirection interface. Purpose: use the IMAP connection code to validate credentials without having an actual ImapStore instance. 2010-12-30 21:57:59 +00:00
Fiouz 05a8a31d4a Don't reference the enclosing type instance when it's not used (memory optimisation) 2010-12-14 19:26:51 +00:00
Jesse Vincent f5eb6e03af astyle 2010-12-01 06:32:29 +00:00
Jesse Vincent 78c900b5fe remove redundant ;s 2010-12-01 03:07:28 +00:00
Jesse Vincent cead5c7060 flip some loops to using java internals instead (per intellij) 2010-12-01 03:04:57 +00:00
Jesse Vincent c79ea226a5 Remove "throws" declarations that didn't actually get thrown. Remove a
couple of try blocks that only caught throws we didn't throw. IntelliJ
optimization.
2010-12-01 03:02:13 +00:00