1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-14 13:35:04 -05:00
Commit Graph

527 Commits

Author SHA1 Message Date
Marcus Wolschon
0b6f0a09bb http://code.google.com/p/k9mail/issues/detail?id=3407&sort=-id&colspec=ID%20Product%20Type%20Status%20Priority%20Milestone%20Owner%20Summary
Issue 3407: 	Handling of SMTP 5xx error codes unclean

fix part one: 5xx error codes are detected in SMTP-code and reported as permanent failures.
2011-06-01 09:07:05 +02:00
cketti
30d31c7074 Explicitly use Locale.US when dealing with dates in message headers 2011-05-26 04:32:26 +02:00
Jesse Vincent
92239739b0 microoptimize peekableInputStream's peek method to not do an extra
method dispatch and boolean check on every peek.
2011-05-24 21:35:18 -04:00
Jesse Vincent
29117ae7a6 Switch a StringBuffer to StringBuilder, which replaced it 2011-05-24 21:21:03 -04:00
Koji Arai
b4f3712246 Should retrieve just visibleLimit messages when the local folder is cleared. 2011-05-25 00:37:51 +09:00
Koji Arai
cb46f170cd Should reset visibleLimit on clear messages. 2011-05-25 00:37:49 +09:00
Koji Arai
a4f7288d37 Avoid NullPointerException.
The name parameter in Content-Type may be not set.
2011-05-25 00:37:46 +09:00
cketti
2d7fad1fa9 Use InetAddress.getCanonicalHostName() instead of getHostName()
This should always return a FQDN.
2011-05-19 00:55:34 +02:00
cketti
8fc714ac4a Don't show "null" for partially downloaded messages with empty text body 2011-05-16 00:36:46 +02:00
cketti
41b039b691 Fix bug introduced with commit b7a6dbd973
Fixes issue 3297
2011-05-15 16:23:53 +02:00
cketti
95288b37d7 Removed unnecessary method implementation
Make Pop3Folder.setFlags(Flag[],boolean) throw an
UnsupportedOperationException instead of calling a method that does
just that.
2011-05-14 23:46:26 +02:00
cketti
dc96bf3186 Only mark all messages as read on the server if that's supported
This change prevents K-9 Mail from establishing a connection to the
server when all messages are marked as read on a POP3 account.
2011-05-14 23:30:47 +02:00
cketti
ba9bc2f8e9 Added method Folder.isFlagSupported(Flag) 2011-05-14 23:19:24 +02:00
cketti
86fca9c1f2 POP3: Check for support of the TOP command (if CAPA isn't supported)
This will allow to download partial messages if the server doesn't
support the CAPA command but supports the TOP command (e.g. Hotmail).

Fixes issue 2042
2011-05-14 21:40:21 +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
92ea452163 Restore hardcoded Outbox 2011-05-07 23:57:47 +02:00
cketti
33c0bf9e31 Avoid NullPointerException for messages with html_content = NULL in DB
Fixes issue 3302
2011-05-06 20:02:55 +02:00
Jesse Vincent
8a907f9be7 remove a pointless extra assignment 2011-05-05 12:47:57 -04:00
Jesse Vincent
196a9c167d comment some preview regexes 2011-05-05 12:47:39 -04:00
Andrew Chen
3fcca67ae5 Preserve legacy SMTP authentication behavior for PLAIN by trying LOGIN if supported. 2011-05-04 23:34:02 -07:00
Bernhard Redl
f2283aa91e Catch IllegalCharsetNameException causing force-close on unsupported japanese charsets (issue 3272) 2011-05-01 04:32:10 +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
cketti
037b0ff64d Fix automatic authentication method selection for SMTP
Only use automatic authentication method selection if none was
explicitly selected in outgoing server settings.
2011-04-26 18:23:41 +02:00
cketti
e8a1a9a466 Restored semantics of auth*Supported in SMTP authentication code
Also, display a debug message if a certain authentication method was
selected by the user but the server didn't advertise support for it in
the EHLO response.
2011-04-26 17:49:40 +02:00
Jonas Hurrelmann
da38149091 Support for SMTP authentication methods that are not announced by the server.
- Added AUTOMATIC as a new authentication method that will automatically choose the best authentication method (basically old behavior with CRAM_MD5). All other options will now enforce the selected authentication method.
- Added LOGIN as selectable option.
- Cleaned up code so strings to the different authentication methods are only defined once.
2011-04-25 22:32:48 +02:00
cketti
4b2fe6efab Removed unused imports 2011-04-21 00:00:16 +02:00
cketti
49308922d9 Refactored code to calculate number of unread messages some more 2011-04-20 23:58:10 +02:00
Bernhard Redl
92f7c3a19f Refactored the code to calculate the number of unread messages in an account 2011-04-20 23:35:02 +10:00
Bernhard Redl
415c11d712 "When calculating the number of unread messages shown in the account list, INBOX now is always counted, even if a "special" folder has been set to INBOX (issue 3074) 2011-04-20 23:09:02 +10:00
Jesse Vincent
d3848d352d astyle 2011-04-12 22:17:22 +10:00
bitblaster
d2c56edbd2 Restored original imports, added comments, changed method createFolder 2011-04-12 22:17:11 +10:00
bitblaster
0a5d7ba953 In getPersonalNameSpaces now we ask the server for the real folder names corresponding to the special folders ids (for which we have constants), so we can map the account folders using the real names. 2011-04-12 22:17:11 +10:00
bitblaster
c46372b58c Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10:00
bitblaster
59b1d57658 Replaced references to K9.INBOX with account.getInboxFolderName() 2011-04-12 22:17:11 +10: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
Sander Bogaert
c283449d04 Added another badDateTimeFormat to ImapResponseParser.
Some IMAP servers generate timestamps without timezones. :/

Fixes gcode issue 3179
2011-04-12 21:34:22 +10:00
cketti
939660faf4 Quote CID before using it in a regular expression
Fixes issue 3227
2011-04-10 20:39:40 +02:00
Koji Arai
2cd178e684 Fixed NullPointerException 2011-04-10 01:10:25 +09:00
Koji Arai
79a96952f2 Correct encoding and decoding for the filename parameter in the Content-Disposition. 2011-04-08 00:58:53 +09: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
Will Hawkins
d881832eca Made the minor modifications to support CRAM-MD5 authentication
in POP3 accounts.
2011-04-06 11:42:37 -04:00
Koji Arai
37303d69d8 Should store the disposition-type without Content-Disposition parameters. 2011-04-04 00:58:59 +09:00
Jesse Vincent
39e3aecf73 Unify two IMAP date parsing paths, improving the exception so we can
learn what date format we don't cope with.
2011-04-03 14:56:12 +10:00
cketti
867b251e6d Added @Override annotations to fix warnings 2011-04-01 04:36:29 +02:00
DraSine on Rails
e698c78190 Fixed gcode #3182
Sending mail (SMTP) doesn’t work is the SMTP server is picky about RFC
conformance of envelope dialogue.

k9mail:

MAIL FROM: <sender@dom.ain>
RCPT TO: <receiver@dom.ain>

rfc:

MAIL FROM:<sender@dom.ain>
RCPT TO:<receiver@dom.ain>
2011-03-31 21:41:03 +08:00
Jesse Vincent
03d05e9331 If an SMTP server tells us how big the biggest message they accept is,
don't even try to deliver it to them
2011-03-27 23:09:41 +08:00
Jesse Vincent
97ec38d03f Move our IMAP Store to using a message's sizing method 2011-03-27 23:09:41 +08:00
Jesse Vincent
4f63a3de24 Add a pair of methods to help optimize countingmessagestream 2011-03-27 23:08:25 +08:00
Jesse Vincent
604e532879 Add a method to calculate a message's serialized size 2011-03-27 23:08:25 +08:00
Jesse Vincent
c8d38da568 Pull out the maximum acceptable message size from SMTP servers that tell
us when we EHLO.

Next step is to _use_ this data.
2011-03-27 23:08:25 +08:00
cketti
c9510f8f16 Merge branch 'mime_type_rewriting' 2011-03-25 01:31:27 +01:00
cketti
0aa03ccdc4 Extract MIME type fixup code to method MimeUtility.getMimeTypeForViewing() 2011-03-25 00:37:53 +01:00
cketti
7c5c29e87e Move MIME type fixing to AttachmentProvider 2011-03-24 23:07:46 +01:00
cketti
f3e4618702 Cosmetic + documentation changes 2011-03-24 23:04:58 +01:00
Apoorv Khatreja
168f6277da Mime type rewriting must be done only when an attachment is viewed. Therefore, removed conflicting references to rewriting code from LocalStore. 2011-03-25 05:46:11 +08:00
Apoorv Khatreja
80d99baf29 Implemented table lookup for mime type replacement (issue 873 and similar), added javadocs, moved to MimeUtility.java. 2011-03-25 05:46:11 +08:00
cketti
83451cff10 Merge branch 'remove_non_api_dependencies' 2011-03-24 19:35:12 +01:00
Jesse Vincent
e19162cb86 ant astyle 2011-03-22 18:07:47 +11:00
HIRANO Takahito
6c37741e63 Could not handle iso-2022-jp streams which contain continuous escape
sequences.

Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-03-19 18:05:07 +09:00
cketti
330737c4c6 Fix length-check of BODYSTRUCTURE reply
Fixes issue 3116
2011-03-15 08:34:38 +01:00
cketti
a753f1ce5c Removed unused import 2011-03-14 00:35:03 +01:00
danapple
a8440032e9 Fixes Issue 3102 in cooperation with vincent...@gmail.com
Reset service enablement and MailService scheduling whenever a storage
medium is mounted or unmounted.
2011-03-12 12:27:11 -06: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
Koji Arai
da34a5ec8c Avoid IllegalArgumentException for Charset.forName(null). 2011-03-02 00:59:20 +09:00
cketti
766674c27c Code/comment cleanup 2011-02-26 23:04:49 +01:00
Jesse Vincent
c7a3b28289 Change our technique for sending \r\n at the end of smtp commands to
deal with a weird failure on honeycomb
2011-02-26 16:53:53 -05: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
Matt Johnston
eb9fca69c6 Don't need to reparse addresses from database 2011-02-21 02:45:40 +08:00
cketti
ea590cbe39 Removed unused import + constant 2011-02-20 06:25:19 +01:00
cketti
ad159b3093 Merge branch 'hardcoded_outbox' into HEAD 2011-02-20 05:14:22 +01: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
HIRANO Takahito
580d19ec17 Allow emoji input in subjects.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-02-20 10:15:50 +09:00
Jan Berkel
a7a690e6ff Simplify getTextForDisplay() and fix a potential ClassCastException 2011-02-19 15:25:09 -05:00
Koji Arai
68381d4725 Should not use double-quoted empty string.
Some host may reject such the From address.
2011-02-17 00:41:55 +09:00
wongk
5c6e86006d Support non-English Exchange installations. 2011-02-15 19:05:08 -05:00
Jesse Vincent
7cbbd72fac Astyle 2011-02-13 21:20:21 -05:00
unknown
42edb24c4b Merge branch 'master' of https://github.com/k9mail/k-9 2011-02-12 16:24:56 -05:00
unknown
9d0201edae Correctly verify when the user is authenticated or not. Handle "quasi-absolute" form targets during authentication. 2011-02-12 16:10:12 -05:00
Matt Johnston
ae2c933181 Destroy all messages in one sqlite transaction 2011-02-11 15:30:50 -05:00
Andrew Chen
a51daf9798 Use interface Map.Entry. 2011-02-09 11:06:01 -08:00
Jesse Vincent
7cd99bdfd2 When some message has an Application/octet-stream .jpg attachment, be a
bit more lenient and treat it as application/octet-stream, so we can
look up the content type by file extension
2011-02-07 20:34:08 -05:00
Jesse Vincent
bb1e66c70d If android's content-type lookup says "why yes, I have no idea what that
is", at least look at our local list
2011-02-07 20:33:46 -05: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
cketti
d2561f19af Removed unused imports
git-svn-id: https://k9mail.googlecode.com/svn/k9mail/trunk@3270 9a7fa126-a48b-11dd-a887-7ffe1a420f8d
2011-02-04 23:19:07 -05:00
Dan Applebaum
40bdf99925 Fixes Issue 2934 Fixes Issue 2935
Provides for storing Folder Settings in the central Preferences
Storage as a back-up to the settings stored on each folder.  In this
way, even if the LocalStore DB is recreated or otherwise lost, Folder
Settings can be recovered.

1) Does not change the methodology used to read settings while
running, nor the changes in r3107 & r3116 which tremendously improve
Accounts list loading time.

2) Loads Folder Settings from Preferences and stores on the folder
only when creating a new LocalFolder

3) Saves Folder Settings to Preferences and the DB row every time the
Folder Settings are changed.

4) When upgrading from DB version 41 to 42 or later, copies all
settings for existing folders from the DB storage to the Preferences
Storage.

5) Transactional bulk folder creation and single pass local folder
existence check during "Refresh folders" operation drastically reduces
time spent when refreshing folders from the remote store.

6) Uses prepared statement during Editor commit to reduce Preference
storing time.

Probably needs a reversion of r3239, but I'm unfamiliar with
translations, so am leaving that to others' discretion.
2011-02-04 23:19:06 -05:00
Andrew Chen
5fa757bba1 Only include name with an address if it's non-empty. 2011-02-03 03:35:50 +00:00
Jesse Vincent
ff0f517cbb Configure MIME4J to not die when there are long header lines or a large message header 2011-02-01 20:48:20 +00:00
Kris Wong
9e5435a5f3 Fix the ability to accept invalid SSL certificates for exchange support. 2011-02-01 13:15:54 +00:00
Jesse Vincent
3d090e9626 astyle 2011-01-31 23:45:23 +00:00
Jesse Vincent
6550151684 Add serialVersionUID to Serializable classes to make eclipse happy 2011-01-31 23:45:14 +00:00
Jesse Vincent
4d5381f33d Turns out to be some code which tries to be clever about removing the
multipart envelope in LocalStore.java. It is thrown away if there is
just one item in the multipart. This breaks the display of attachment
only message, since the attachment is no longer detected by the code
which creates the view. I made a fix (see patch below) which checks if
the single item in the multipart is not a attachment.

        -- patch from wernermann29 at googlemail.com
2011-01-31 01:54:27 +00:00
cketti
bec094326a Make decodeQ() actually use the "fixed up" string. Will fix Q-encoded subjects where space is encoded as "_".
Fixes issue 2926
2011-01-30 03:00:46 +00:00
HIRANO Takahito
07814db9f4 Fix range check for ISO-2022-JP stream.
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
2011-01-29 17:56:58 +00:00
cketti
a213ca2fb7 Correctly parse email addresses (from contacts). Could be of the form "User name <user@example.com>".
Fixes issue 2920
2011-01-28 06:01:10 +00:00
cketti
e5b172b7bb Fix warnings 2011-01-25 02:36:08 +00:00
Marcus Wolschon
ba24fdc742 update issue 2744
try all addresses of a host.
(Fix is required for proper operation in IPv4-only/IPv6-only networks
 for IPv4/IPv6 dual-stack mail-hosts)
2011-01-24 15:09:36 +00:00
Jesse Vincent
04e4dcb187 code reindenting 2011-01-24 03:27:26 +00:00