Commit Graph

553 Commits

Author SHA1 Message Date
Vincent Richard
feabba4470 Unit tests for SMTPCommand and SMTPCommandSet. Fixed SMTPCommandSet::isFinished(). 2013-02-12 17:54:36 +01:00
Vincent Richard
83c5ba96b9 Rewrote SMTP command sending. Better code for pipelining. Report full command text on MAIL/RCPT errors. 2013-02-12 16:58:27 +01:00
Vincent Richard
f0e12cbadc Fixed invalid use of freed memory. 2013-02-11 21:10:19 +01:00
Vincent Richard
b02e6ab664 Added missing includes. 2013-02-11 09:37:32 +01:00
Vincent Richard
ddf3cff495 Check for MLang on Windows platform. 2013-02-10 21:12:41 +01:00
Vincent Richard
4457dec512 Fixed issue #23. Avoid additional queries if gethostname() is already a FQDN. Use getaddrinfo() instead of gethostbyname() for IPv6 compatibility. 2013-02-10 20:59:14 +01:00
Vincent Richard
173c665e0c Additional MDN fields (thanks to Mehmet Bozkurt). 2013-02-08 14:23:48 +01:00
Vincent Richard
c2474f2b2b Check for localtime_r and gmtime_r at build instead of testing _REENTRANT. Use localtime_s and gmtime_s on Windows, if available. 2013-02-05 14:21:21 +01:00
Vincent Richard
1da9117fa5 Gives access to X.509 certificate underlying structure. 2013-02-05 13:01:59 +01:00
Vincent Richard
099d7a7882 Moved includes to fix compilation issue. 2013-01-15 13:24:45 +01:00
Vincent Richard
ea06bc1de1 Renamed TYPE_BOOL to avoid name collision on MacOS. 2013-01-15 13:21:10 +01:00
Vincent Richard
b74955cee5 Better test for stream state. 2013-01-15 13:05:21 +01:00
Vincent Richard
65f235d647 Removed unused includes for OpenSSL. 2013-01-15 12:01:58 +01:00
Vincent Richard
ad9bef78c4 Updated copyright year and maintainer email address. 2013-01-10 17:30:31 +01:00
Vincent Richard
3ac625efa5 Fixed issue #17. 2012-12-27 21:14:24 +01:00
Mark Brand
1c43b53cde exclude defaultCertificateVerifier.cpp unless VMIME_HAVE_TLS_SUPPORT 2012-12-24 16:26:06 +01:00
Vincent Richard
9e8cdca585 Fixed type for maximum line length. 2012-12-22 13:40:18 +01:00
Vincent Richard
0305c3c5a9 Fixed first modifier not being generated. 2012-12-22 12:18:52 +01:00
Vincent Richard
a63c0c5094 Misc fixes for Windows build (thanks to Mehmet Bozkurt). 2012-12-17 17:02:08 +01:00
Vincent Richard
e192ce6716 More robust check for EOF in input stream. 2012-12-13 18:37:01 +01:00
Vincent Richard
c9f0641b06 Fixed seeking after EOF in input stream. 2012-12-13 18:34:22 +01:00
Vincent Richard
e91495e3c3 Also do not re-encode Quoted-Printable and UUEncode. 2012-12-13 13:16:52 +01:00
Vincent Richard
3a5621c2aa Trivial 64-bit warning fixes. 2012-12-12 16:35:55 +01:00
Vincent Richard
7a9db510f5 Do not re-encode data if it is already encoded (thanks to Mehmet Bozkurt). 2012-12-12 14:56:07 +01:00
Vincent Richard
afec9aa66f Ignore empty modifiers (thanks to Mehmet Bozkurt). 2012-12-12 14:47:15 +01:00
Vincent Richard
dc791215f5 Fixed wrong class name (copy/paste is BAD ;-) ). 2012-12-11 21:48:43 +01:00
Vincent Richard
87259631e4 SSL server identity check. 2012-12-10 22:59:19 +01:00
Vincent Richard
1ba5e8698c Moved POP3 response receiving and parsing to a separate class. 2012-12-06 11:02:31 +01:00
Vincent Richard
053d2b4ee0 Fixed progression notification when message size is lower than 64K. 2012-12-05 21:02:34 +01:00
Vincent Richard
052cf47fcc Use message size for progress listener. 2012-11-30 20:11:33 +01:00
Mark Brand
d78f17b8af remove stray argument from windowsSocket::sendRawNonBlocking
follow-up to 3e9e8c9265
2012-11-29 23:35:29 +01:00
Vincent Richard
71f06fab91 Trivial 64-bit warning fixes. 2012-11-29 22:33:31 +01:00
Vincent Richard
3e9e8c9265 Better handling of SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. Sockets on Windows platform are now non-blocking (thanks to Mehmet Bozkurt). 2012-11-29 22:33:31 +01:00
Mark Brand
fa97c5e2d8 add missing wincrypt.h 2012-11-12 12:22:03 +01:00
Vincent Richard
6ae75bc971 SMTP Command Pipelining (RFC-2920). 2012-11-11 21:55:44 +01:00
Vincent Richard
f4c42cc0cf Compatibility with RFC-1341. 2012-11-10 17:47:55 +01:00
Vincent Richard
defc1bba1d Fixed compilation issues on Windows. 2012-11-06 16:05:24 +01:00
Vincent Richard
a6a098b473 Thread-safe initialization for OpenSSL. 2012-11-06 16:05:04 +01:00
Vincent Richard
5e83d1d57c Fixed runtime error on cast. 2012-11-03 09:47:48 +01:00
Vincent Richard
d4052b2589 Fixed compilation issues. 2012-11-03 09:36:22 +01:00
Vincent Richard
bc63892291 OpenSSL support (thanks to Mehmet Bozkurt). 2012-11-03 09:27:12 +01:00
Vincent Richard
cce1c28bce Migrated build system to CMake. Conditional file compilation. Automatic selection of platform handler. 2012-11-01 18:20:06 +01:00
Vincent Richard
794afe9a1b Added support for timeout when receiving data from a socket (POSIX platform). 2012-10-15 13:33:54 +02:00
Vincent Richard
2b09c6ea6c Support for bogus encoding name 'bmoted-printable' (Zarafa). 2012-10-15 13:33:54 +02:00
Vincent Richard
e4102b4374 Do not fail if charset is not recognized. 2012-10-15 13:33:54 +02:00
Vincent Richard
ff462a5ee1 Fixed body part extraction (only body should be extracted). 2012-07-30 20:45:17 +02:00
Vincent Richard
a68cebf12a Added functions to get messages by UID (IMAP only for now). 2012-07-28 13:01:48 +02:00
Vincent Richard
891aba49ff Fixed issue #10. 2012-07-06 18:45:02 +02:00
Vincent Richard
4f33877820 Added ability to parse directly from an input stream (eg. file). This allows very big messages to be parsed without loading the whole message data into memory. 2012-04-16 22:32:33 +02:00
Vincent Richard
cc49395dd2 Split stream.hpp/.cpp into multiple source files. 2012-04-14 13:46:05 +02:00
Vincent Richard
b5927243a2 Fixed memory leak. 2012-04-06 22:26:18 +02:00
Vincent Richard
0633a49b04 Fixed wrong encoding of line breaks in QP-encoded text (issue #7). 2012-04-05 23:15:04 +02:00
Vincent Richard
92c445dd63 Added function to retrieve sequence numbers of messages whose UID is greater or equal than a specified UID (thanks to Zahi Mashael). 2012-04-05 11:46:39 +02:00
Vincent Richard
3b20040e9f Set Diffie-Hellman prime size (bug SF#3434852). 2011-11-15 11:46:07 +00:00
Vincent Richard
50f82c3a04 GNU TLS 3 has no 'extra' (thanks to mabrand). 2011-11-15 11:40:42 +00:00
Vincent Richard
f68a466dc0 Removed dependency on gcrypt for gnutls version >= 2.12. 2011-08-21 08:55:46 +00:00
Vincent Richard
bcdffb5355 Use gnutls_strerror() for reporting errors. 2011-08-20 06:35:06 +00:00
Vincent Richard
92b4dc8648 Fixed encoding of whitespace. Fixed old test case. 2011-06-26 12:47:25 +00:00
Vincent Richard
4365a126e3 Use gnutls_priority_set_direct() instead of GNUTLS deprecated functions. 2011-06-26 08:19:11 +00:00
Vincent Richard
a55c574436 Fixed parsing of empty body parts (thanks to John van der Kamp, from Zarafa). 2011-06-25 17:07:53 +00:00
Vincent Richard
4f9dc93200 Added support for mailboxes that specify an (encoded) full name with an empty email address, set by a <> marker (Zarafa). 2011-06-19 18:49:55 +00:00
Vincent Richard
fbdb750496 Fixed messageBuilder to accept an empty mailbox group in 'To:' field, to allow for undisclosed-recipients (Zarafa). 2011-06-19 18:39:35 +00:00
Vincent Richard
4286a80d9d Alias for UTF-7 charset. 2011-06-19 18:16:49 +00:00
Vincent Richard
ac03342507 Correctly generate attachment names which are long and have high characters for Outlook Express (Zarafa). 2011-06-19 18:08:12 +00:00
Vincent Richard
49cc5dc40a Fixed parsing of an attachment filename that is between 66 and 76 characters long (Zarafa). 2011-06-19 17:51:33 +00:00
Vincent Richard
d7c2fb2e58 Flush stateful data from iconv (thanks to John van der Kamp, Zarafa). 2011-03-31 19:13:03 +00:00
Vincent Richard
98b4d91d01 Fixed bug #3174903. Fixed word parsing when buffer does not end with NL. Fixed 'no encoding' when forced. 2011-03-09 18:03:31 +00:00
Vincent Richard
773d750f5c Fixed possible read to invalid memory location (thanks to Alexander Konovalov). 2011-01-28 12:11:08 +00:00
Vincent Richard
3cec9612fa Fixed possible infinite loop (thanks to John van der Kamp, Zarafa). 2011-01-21 15:28:06 +00:00
Vincent Richard
9e4867b641 Fixed boundary parsing (thanks to John van der Kamp, Zarafa). 2010-12-10 16:54:38 +00:00
Vincent Richard
20ba86512f No extra space between ':' and '<' in MAIL FROM and RCPT TO. Wait for server response after QUIT and before closing connection. 2010-12-08 08:52:54 +00:00
Vincent Richard
7e5a9a404f Return failed email address in exception for RCPT TO. 2010-10-20 09:37:39 +00:00
Vincent Richard
fa06cf1652 Added support for DRAFT flag. 2010-10-19 13:28:43 +00:00
Vincent Richard
dbcb03893c Fold non-encoded lines in the case there is no whitespace in them. 2010-10-18 14:20:34 +00:00
Vincent Richard
097bde861d Fixed missing whitespace in text parsing. 2010-10-12 20:01:34 +00:00
Vincent Richard
9e8871fb59 Better RFC-2047 encoding. 2010-10-12 17:10:58 +00:00
Vincent Richard
e8cb19f9e5 Encode quotation marks in QP/RFC-2047. 2010-10-12 09:45:16 +00:00
Vincent Richard
def04e4ba5 Added an option to recognize inline objects as attachments. 2010-09-07 10:46:24 +00:00
Vincent Richard
f1b5d7d7e2 Support filenames with charset (thanks to John van der Kamp, Zarafa). 2010-09-07 07:44:15 +00:00
Vincent Richard
c4d595624b Fixed extraction of root part body. 2010-09-06 20:20:45 +00:00
Vincent Richard
5debcfccfa Fixed pointer-type argument for gnutls_credentials_set (thanks to Mike Smellie). 2010-08-19 07:50:15 +00:00
Vincent Richard
d252ccf097 Encode TSpecials in RFC-2231 encoded chunks. 2010-08-17 21:47:25 +00:00
Vincent Richard
80373e44d4 Added stubs for timeout handler (#3045770). 2010-08-16 10:21:03 +00:00
Vincent Richard
d6a8b099ed Connection time out. 2010-08-05 10:30:22 +00:00
Vincent Richard
f63c64c0e1 Take account of charset recommended encoding (thanks to John van der Kamp, Zarafa). 2010-07-17 07:00:49 +00:00
Vincent Richard
1930316f36 Do not generate 7-bit value for parameter if RFC-2231 extended value is generated (thanks to Eugene A. Shatokhin). 2010-06-23 20:42:25 +00:00
Vincent Richard
2f8026dc5b Improved automatic encoding selection. Added helper functions on body for setting contents, type, charset and encoding. 2010-05-23 16:18:00 +00:00
Vincent Richard
4ff310c7e4 Always encode special charsets. 2010-05-21 07:41:15 +00:00
Vincent Richard
b2b01b8c26 Fixed missing #include. 2010-05-21 06:01:33 +00:00
Vincent Richard
1e00ab7bba Fixed case-sensitive include. 2010-05-20 15:28:51 +00:00
Vincent Richard
ac1da379eb Fixed type size. 2010-05-20 09:57:51 +00:00
Vincent Richard
9196d5c342 Added helper function to construct parsed message from net message. Splitted IMAP source files. 2010-05-18 13:52:27 +00:00
Vincent Richard
13ae80a4c7 Fixed parsing of header field value with no data on the first line (folding). 2010-05-14 16:56:20 +00:00
Vincent Richard
6fb89acf38 Use STARTTLS for additional connections (thanks to Andrei). 2010-05-04 10:49:10 +00:00
Vincent Richard
1e57aa31c5 Register non-standard encoding names. 2010-04-13 09:51:30 +00:00
Vincent Richard
8f9fec339c Fixed parsing of non-significant whitespaces in field values. 2010-04-08 18:28:22 +00:00
Vincent Richard
6b713d502e Fixed calls to 'empty' instead of 'clear' (thanks to John van der Kamp, from Zarafa). 2010-03-16 11:54:11 +00:00
Vincent Richard
2854eed183 Return false instead of throwing an exception if file does not exist in isDirectory(), isFile(), canRead() and canWrite(). 2010-03-16 08:39:45 +00:00
Vincent Richard
3604182a9a Fixed compilation issue with 'const'. 2010-03-10 15:54:23 +00:00
Vincent Richard
75fcad48c9 Fixed bug #2966885: memory leak caused by strong ref (thanks to tuxx from SF). 2010-03-10 13:29:33 +00:00
Vincent Richard
fa6c1dba06 Don't quote if no encoding is needed. 2010-02-10 09:41:36 +00:00
Vincent Richard
5c2d078b4f Allow spaces to appear in mailbox display name without encoding or quoting. Encode or quote if CR or LF is present. 2010-02-10 09:12:25 +00:00
Vincent Richard
b05039de3d Fixed compilation issue on Windows. 2010-02-03 11:01:40 +00:00
Vincent Richard
6298cdc850 Use homemade isSpace() instead of std::ispace() for portability. 2010-02-03 10:56:12 +00:00
Vincent Richard
1b19b40022 Removed wide-char support. 2010-02-03 10:45:17 +00:00
Vincent Richard
69421bbd6f Fixed memory leak. 2010-02-01 16:33:31 +00:00
Vincent Richard
668087ea36 Fixed bug #2927077: account for multi-byte charsets in invalid sequence output. 2010-02-01 13:26:12 +00:00
Vincent Richard
625fd5f156 Fixed bug #2927077: account for multi-byte charsets in invalid sequence output. 2010-02-01 13:06:06 +00:00
Vincent Richard
b94fe09cae Fixed bug #2933667: CRLF filter broken. 2010-01-20 08:42:47 +00:00
Vincent Richard
45faafdced Makes 'To' optional, like 'Cc' and 'Bcc'. An exception is still thrown if there are no recipients at all (see bug #2912670). 2009-12-13 12:50:36 +00:00
Vincent Richard
7a6dcdf385 Fixed non thread-safe getLocalCharset() function (thanks to Bartek Szurgot). 2009-12-08 10:21:33 +00:00
Vincent Richard
a3bf37fb4f Fixed not exception-safe constructor, which could lead to possible memory leak (thanks to Bartek Szurgot). Get rid of const-ness on factories. 2009-12-08 10:03:34 +00:00
Vincent Richard
6016fd5879 Initialize multi-threading for GNUTLS/GCrypt (thanks to Bartek Szurgot). 2009-12-08 09:31:06 +00:00
Vincent Richard
82e1a690d9 Fixed directory renaming. 2009-12-01 14:24:55 +00:00
Vincent Richard
ee2fa4feaf Added option to return ISO week-numbering instead of default calendar-numbering. 2009-12-01 13:44:34 +00:00
Vincent Richard
5d82825687 Added block size on sockets to allow different buffer size for SSL. 2009-11-30 13:04:15 +00:00
Vincent Richard
90f838232f Quote mailbox name instead of encoding it whenever it's possible. 2009-11-12 15:40:56 +00:00
Vincent Richard
b0fbd0edf0 Auto-detect filename. Renamed 'filename' argument to 'filepath' for disambiguity. Added constructor for input stream. Use 'word' instead of 'string' for filename. 2009-11-04 14:12:06 +00:00
Vincent Richard
5341f2d1f7 Removed some unnecessary consts on integral types where overrides conflict. Added <cctype> to get the std::isspace that doesn't require a 2nd arg 'locale' (thanks to Ben Jackson). 2009-11-04 12:52:49 +00:00
Vincent Richard
63d6a2ac5a Reset EOF flag when stream is reset. 2009-11-03 14:17:55 +00:00
Vincent Richard
75b32c4125 Fixed possible segfault (thanks to László Vadócz). 2009-11-03 12:37:51 +00:00
Vincent Richard
ac6865fe36 Fixed possible segfault (thanks to John van der Kamp, from Zarafa). 2009-09-15 19:36:03 +00:00
Vincent Richard
a5d258dc72 Relicensed VMime under the GNU GPL version 3. Changed copyright year to 2009. 2009-09-06 12:02:10 +00:00
Vincent Richard
6bfaff3ce4 maildirFolder::addMessage() : iff FLAG_RECENT is present, add message to 'new' instead of 'cur' (Georg Sauthoff). 2009-07-11 12:39:36 +00:00
Vincent Richard
f36ccb2558 fsync() in posixFile::fileCreate(); changed posixFile::rename to exclusive semantics - if dst exists it fails (Georg Sauthoff). 2009-07-11 12:31:18 +00:00
Vincent Richard
a67f0a537e Ensure 'unsigned long' is 4 bytes long (Georg Sauthoff). 2009-07-11 12:21:59 +00:00
Vincent Richard
3442caf607 gnutls_x509_crt_list_import does not support multiple DER certificates (Georg Sauthoff). 2009-06-21 21:32:25 +00:00
Vincent Richard
0537a5eb8e Include hostname in message id (ensure unicity when working on a network file system). 2009-06-21 21:19:00 +00:00
Vincent Richard
6e1acbf794 Use ::flush() (aka fsync()) after a maildir message is written (Georg Sauthoff). 2009-06-21 21:08:56 +00:00
Vincent Richard
9bd54d3e47 Changed posix write wrapper since a) write can be interrupted and b) write can write less than specified without error (Georg Sauthoff). 2009-06-21 21:07:35 +00:00
Vincent Richard
148c161128 Added other missing return error checks for posix system calls; check consistent for -1 (Georg Sauthoff). 2009-06-21 21:05:16 +00:00
Vincent Richard
43bbb3c410 Check return status of fsync (Georg Sauthoff). 2009-06-21 20:57:03 +00:00
Vincent Richard
7d75b131ef Fixed duplicate switch case on AIX (thanks to Robin Rawson-Tetley). 2009-04-09 20:24:08 +00:00
Vincent Richard
d0bc8b3a95 Fixed block size through filtered streams. 2009-04-09 18:15:50 +00:00
Vincent Richard
c2d2603761 Fixed non-numeric timezone parsing (thanks to John van der Kamp, Zarafa). 2009-01-09 21:07:42 +00:00
Vincent Richard
2fe5fceb3f Fixed week of year for 53th week (non ISO-compliant). 2008-12-29 21:46:08 +00:00
Vincent Richard
a74393b092 Send CRLF in the same packet as command to avoid problems with some servers. 2008-12-16 21:44:42 +00:00
Vincent Richard
d9c3a8eda0 Missing #include for GCC 4.4 (thanks to Martin Michlmayr). 2008-11-09 13:48:04 +00:00
Vincent Richard
13f69779c2 New namespace for encoders. 2008-10-12 13:59:09 +00:00
Vincent Richard
3f4226eaac Fixed compilation warnings. 2008-10-12 10:05:28 +00:00
Vincent Richard
3d5b699cd9 Encode '?' characters to avoid breaking QP encoding (Zarafa). 2008-07-11 21:48:58 +00:00
Vincent Richard
b9c6740957 Fixed 'negative unsigned' index causing crash (Zarafa). 2008-07-11 21:46:32 +00:00
Vincent Richard
f626c4fbe8 Enable re-generation of broken Content-Id's that had no '@' sign in them (Zarafa). 2008-07-11 21:37:38 +00:00
Vincent Richard
689f99f7a6 Treat empty encoding as default '7-bit' (Zarafa). 2008-07-11 21:33:18 +00:00
Vincent Richard
30f0825877 Fixed bad buffer length causing duplicate data (Zarafa). 2008-07-11 21:27:48 +00:00
Vincent Richard
85cd5f7abf Escape all RFC-2047 'especials' characters (Zarafa). 2008-07-11 21:12:42 +00:00
Vincent Richard
166f6206f4 Fix for possible NULL return value for setlocale() (Zarafa). 2008-07-11 21:07:32 +00:00
Vincent Richard
1d093c46a7 Actually add the 'Final-Recipient' header (Zarafa). 2008-07-11 21:04:31 +00:00
Vincent Richard
ad0ea8ce9f Remove BCC headers before sending the message over SMTP (Zarafa). 2008-07-11 21:02:12 +00:00
Vincent Richard
a68e122354 Recover from broken emails without a final boundary (Zarafa). 2008-07-11 20:45:17 +00:00