aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog22
-rw-r--r--camel/camel-mime-filter-bestenc.c5
-rw-r--r--camel/camel-mime-filter-linewrap.c7
-rw-r--r--camel/camel-mime-message.c6
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c17
5 files changed, 51 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b546c95d6e..5812a37b84 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,27 @@
2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
+ Fixes bug #27672
+
+ * camel-mime-filter-bestenc.c: Conditionally #include <config.h>
+
+ * camel-mime-filter-linewrap.c: Same here... although we could
+ probably just get rid of this filter? We don't seem to use it
+ anywhere since we try to QP/Base64 encode any text parts with long
+ lines. Besides, we couldn't use this filter for SMTP anyway since
+ we can't risk possibly linewrapping a binary mime part. I dunno,
+ maybe this could be useful in the composer though? *shrug*
+
+ * providers/smtp/camel-smtp-transport.c (smtp_data): Always call
+ camel_mime_message_set_best_encoding() even if the server allows
+ 8BITMIME and even if we don't have any 8bit parts because we may
+ have parts with long lines (>998 octets) which also need to be
+ encoded.
+
+ * camel-mime-message.c (check_8bit): Don't forget to check for the
+ binary encoding here as well.
+
+2002-07-11 Jeffrey Stedfast <fejj@ximian.com>
+
* providers/imap/camel-imap-folder.c (parse_fetch_response): If we
are fetching HEADERs, don't cache the stream - instead just create
a mem-stream and return that. This reduces a significant amount of
diff --git a/camel/camel-mime-filter-bestenc.c b/camel/camel-mime-filter-bestenc.c
index e53923344b..0de8abd04b 100644
--- a/camel/camel-mime-filter-bestenc.c
+++ b/camel/camel-mime-filter-bestenc.c
@@ -18,6 +18,11 @@
* Boston, MA 02111-1307, USA.
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <string.h>
#include "camel-mime-filter-bestenc.h"
diff --git a/camel/camel-mime-filter-linewrap.c b/camel/camel-mime-filter-linewrap.c
index 44d4755efb..c9a741dacf 100644
--- a/camel/camel-mime-filter-linewrap.c
+++ b/camel/camel-mime-filter-linewrap.c
@@ -19,9 +19,16 @@
* Boston, MA 02111-1307, USA.
*/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include <ctype.h>
+
#include "camel-mime-filter-linewrap.h"
+
static void filter (CamelMimeFilter *f, char *in, size_t len, size_t prespace,
char **out, size_t *outlen, size_t *outprespace);
static void complete (CamelMimeFilter *f, char *in, size_t len,
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index fe62c84ed5..0b21d98a57 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -660,10 +660,14 @@ camel_mime_message_foreach_part (CamelMimeMessage *msg, CamelPartFunc callback,
static gboolean
check_8bit (CamelMimeMessage *msg, CamelMimePart *part, void *data)
{
+ CamelMimePartEncodingType encoding;
int *has8bit = data;
/* check this part, and stop as soon as we are done */
- *has8bit = camel_mime_part_get_encoding (part) == CAMEL_MIME_PART_ENCODING_8BIT;
+ encoding = camel_mime_part_get_encoding (part);
+
+ *has8bit = encoding == CAMEL_MIME_PART_ENCODING_8BIT || encoding == CAMEL_MIME_PART_ENCODING_BINARY;
+
return !(*has8bit);
}
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 7e5eddb6a0..b2b31bb922 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -39,7 +39,6 @@
#undef MIN
#undef MAX
#include "camel-mime-filter-crlf.h"
-#include "camel-mime-filter-linewrap.h"
#include "camel-stream-filter.h"
#include "camel-smtp-transport.h"
#include "camel-mime-message.h"
@@ -1137,6 +1136,8 @@ static gboolean
smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, gboolean has_8bit_parts, CamelException *ex)
{
/* now we can actually send what's important :p */
+ CamelBestencRequired required = CAMEL_BESTENC_GET_ENCODING;
+ CamelBestencEncoding enctype = CAMEL_BESTENC_BINARY;
char *cmdbuf, *respbuf = NULL;
CamelStreamFilter *filtered_stream;
CamelMimeFilter *crlffilter;
@@ -1144,11 +1145,17 @@ smtp_data (CamelSmtpTransport *transport, CamelMimeMessage *message, gboolean ha
GSList *h, *bcc = NULL;
int ret;
- /* if the message contains 8bit mime parts and the server
- doesn't support it, encode 8bit parts to the best
- encoding. This will also enforce an encoding to keep the lines in limit */
+ /* if the message contains 8bit/binary mime parts and the server
+ doesn't support it, set our required encoding to be 7bit */
if (has_8bit_parts && !(transport->flags & CAMEL_SMTP_TRANSPORT_8BITMIME))
- camel_mime_message_encode_8bit_parts (message);
+ enctype = CAMEL_BESTENC_7BIT;
+
+ /* FIXME: should we get the best charset too?? */
+ /* Changes the encoding of any 8bit/binary mime parts to fit
+ within our required encoding type and also force any text
+ parts with long lines (longer than 998 octets) to wrap by
+ QP or base64 encoding them. */
+ camel_mime_message_set_best_encoding (message, required, enctype);
cmdbuf = g_strdup ("DATA\r\n");
>* Update to 5100.nobutaka2004-03-023-9/+8 * Fix build with ruby 1.8.knu2004-03-021-0/+19 * Change MAINTAINERship to submitter.nork2004-03-012-2/+2 * o Add new vfontcap.freetype and vfontcap.vflib file (obtained fromnork2004-03-018-278/+338 * o Update to 1.5.6.nork2004-03-014-22/+11 * - Hand over maintainership to submitterpav2004-02-292-2/+2 * - Fix rmdir linepav2004-02-292-2/+2 * Add stardict2-dict-ja, a english -> japanese, japanese -> englishpav2004-02-299-0/+85 * - Update to 22.40y1.1.21pav2004-02-298-28/+226 * - Update to version 0.3.4krion2004-02-293-6/+11 * - Update checksum. Affected archive contains TeX font files, so I don'tpav2004-02-292-12/+11 * - Assign maintainership to submitterkrion2004-02-278-8/+8 * BROKEN on !i386: Does not compilekris2004-02-251-1/+7 * BROKEN on !i386 and !sparc64: Does not compilekris2004-02-241-1/+7 * Create DOCSDIR before install the document.nobutaka2004-02-231-1/+2 * BROKEN on !i386: Does not compilekris2004-02-231-1/+7 * BROKEN on !i386: Does not buildkris2004-02-232-2/+14 * BROKEN: Checksum mismatchkris2004-02-232-0/+4 * Add WITH_DBSKKD knob.nobutaka2004-02-221-0/+4 * 1. Change the install location of elisp files.nobutaka2004-02-223-2/+13 * BROKEN: Checksum mismatchkris2004-02-221-0/+2 * BROKEN on 4.x: does not compilekris2004-02-221-0/+4 * BROKEN: Checksum mismatchkris2004-02-221-0/+2 * BROKEN: Checksum mismatchkris2004-02-221-0/+2 * Don't use perl to generate files that we already have (timestamps b0rk3dnectar2004-02-221-4/+20 * Update to 4.0.7: bugfix in handling roman-kana conversion in fence-mode.linimon2004-02-212-3/+3 * Update to 2.06.4: see CHANGES.jis and ChangeLog for details. Also:linimon2004-02-212-3/+8 * Remove BROKEN tag; this port now installs correctly.kris2004-02-182-8/+0 * Update to 20040209 version.kuriyama2004-02-182-3/+5 * BROKEN on 5.x: configure failskris2004-02-181-1/+7 * Mark as deprecated: either fails to fetch, and has done so for some time;linimon2004-02-171-0/+2 * BROKEN: Inconsistent dependencies (linux_base 7.x and 8.x)kris2004-02-171-0/+2 * Typo fix.max2004-02-173-6/+6 * BROKEN: Checksum mismatchkris2004-02-171-0/+2 * Fix the bug of a make rule in the install-links target that installsokazaki2004-02-161-2/+2 * RcNG'ize the startup script (and bump the port revision).max2004-02-1612-102/+168 * Update to version 4.0.6: revise handling of Dakuten and Han-dakuten inlinimon2004-02-132-2/+3 * Add pre-install message about a possibly desireable compile optionlinimon2004-02-132-0/+16 * - Use LATEST_LINKkrion2004-02-131-0/+2 * Update to 3.7p1max2004-02-1312-42/+69 * Upgrade to 2.04.max2004-02-135-9/+9 * Utilize USE_ICONV.okazaki2004-02-111-14/+20 * Sync with editors/emacs21:sumikawa2004-02-114-2/+184 * Update to release 0.21. See ChangeLog for details (linimon2004-02-114-8/+27 * SIZEify.matusita2004-02-112-0/+3 * Update to JNetHack-3.4.3-0.1.knu2004-02-098-62/+45 * BROKEN on 5.x: does not installkris2004-02-092-0/+8 * BROKEN on 5.x: Does not compilekris2004-02-091-0/+4 * Update to 0.2.8.nobutaka2004-02-085-33/+15 * Update to 0.17.nobutaka2004-02-083-4/+5 * Use PLIST_FILES (bento-tested, marcus-reviewed).trevor2004-02-0624-13/+13 * Use PLIST_FILES.trevor2004-02-0612-6/+6 * BROKEN on 5.x: Does not compilekris2004-02-051-1/+7 * Add NO_{PACKAGE,CDROM} because Motoya Co.,Ltd does not permitnork2004-02-051-1/+3 * Update to KDE 3.2.0lofi2004-02-0510-18/+26 * Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-0471-23/+71 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-049-20/+20 * - Update MASTER_SITESkrion2004-02-011-1/+2 * - Mark NOT_FOR_ARCHS for AMD64krion2004-02-011-1/+3 * - Mark BROKEN: Japanese patch not yet releasedkrion2004-02-011-0/+2 * patch fromtrevor2004-02-011-3/+1 * Fixed the bug password cannot be changed from a client.sumikawa2004-01-302-1/+27 * The linux-atk port was repo-copied into the accessibility category.trevor2004-01-301-1/+1 * Upgrade JLP to 0.2.1.sumikawa2004-01-303-2/+4 * SIZEify.trevor2004-01-2936-0/+57 * Add size data.trevor2004-01-281-0/+12 * Add size data.trevor2004-01-281-0/+1 * PR:maho2004-01-262-7/+38 * Now gettext 0.12.1 is gettext-old.trevor2004-01-249-11/+11 * - Update to 1.17krion2004-01-232-4/+4 * Use LS macro.trevor2004-01-231-1/+1 * - fix PKGORIGINeik2004-01-232-0/+4 * Update to 1.6.nork2004-01-233-2/+6 * Use the SORT macro from bsd.port.mk.trevor2004-01-225-7/+10 * - Change maintainer's emailkrion2004-01-2211-11/+11 * Reverse the MANLANG arguments to workaround a bug in make(1). This ismarcus2004-01-203-3/+3 * Update to 0.19arved2004-01-192-2/+2 * Unbreak for 501000maho2004-01-191-1/+1 * Update to 0.3.3.nork2004-01-182-7/+6 * Fix build. [1]nobutaka2004-01-184-29/+33 * - Fix buildkrion2004-01-161-2/+2 * Add a ebview-gtk2 0.3.1, which is a gtk2 based toolnork2004-01-168-109/+36 * - update to 2.1.3clement2004-01-164-4/+4 * o Remove unnecessary URL. [1]nork2004-01-161-2/+2 * Add RESTRICTED.nork2004-01-161-0/+2 * Add a motoya-ttfonts, Free Japanese TrueType fonts named 'MOTOYAnork2004-01-169-0/+124 * - fix *squirrelmail ports.clement2004-01-131-1/+1 * Update to 2004-01-11 snapshot of w3m 0.4.2.nobutaka2004-01-122-1/+5 * update to 0.32yoichi2004-01-122-2/+2 * I forgot to remove this obsolete patch with the upgrade to 0.9.nectar2004-01-111-12/+0 * Update to 0.2.4.nobutaka2004-01-112-2/+2 * Make this port compile clean when specifying another ${PREFIX}.petef2004-01-102-2/+14 * Update 0.8 -> 0.9nectar2004-01-084-8/+16 * New port: japanese/multiskkservedwin2004-01-086-0/+96 * Update to 4.0.5: adds keybindings; minor bugfixes.linimon2004-01-072-2/+2 * Unbreak by making this port a non-slave port and going back to 1.0.1.knu2004-01-068-17/+1029 * - Update to 200401pav2004-01-032-5/+3 * Update to 200401 version.yoichi2004-01-032-4/+4 * Update to 0.2.2.nobutaka2004-01-016-11/+33 * New port: japanese/wikickeredwin2003-12-2910-0/+360 * New Port: japanese/xlockmore - Xlockmore which supports the Japanese language.edwin2003-12-292-0/+18 * Fix build on -current. (Note: the maintainer/submitter claimed that itlinimon2003-12-291-6/+10 * Resurrect previous commit, pre-build to post-patch.nork2003-12-272-2/+2 * o Add CONFLICTS. [1]nork2003-12-272-2/+6 * Per bento logs, mark broken on recent versions of 5.x due to installlinimon2003-12-231-1/+5 * Mark as broken on 5.x due to gcc3.3 multiline string handling.linimon2003-12-221-0/+12 * - Support USE_LIBTOOL properlykrion2003-12-225-11/+30 * - Use canonical form (ports@FreeBSD.org) in MAINTAINER linesergei2003-12-216-6/+6 * Update ports: japanese/yc.eledwin2003-12-202-2/+2 * Minor update to 1.16, mainly fixes fetch.linimon2003-12-202-4/+4 * Chase mastersite and renaming of distfile.linimon2003-12-202-6/+3 * Mark as broken on 5.x due to gcc3.3's stricter handling of multilinelinimon2003-12-201-1/+7 * Update to latest patch. Adds Canna 3.7 Wide character API adaptation.linimon2003-12-204-4/+4 * Remove the OpenSSL distinfo entry.marcus2003-12-181-1/+0 * Update to 1.6b-langjajp-tm0.1(chase mozilla 1.6beta).nork2003-12-182-3/+3 * o Update to 20031208.kuriyama2003-12-164-10/+26 * - Update to 0.1.5krion2003-12-152-2/+2 * * Fix pkg-message generation on read-only filesystem.kuriyama2003-12-131-0/+1 * s/rpm2cpio/rpm2cpio.pl/ after the recent update of archivers/rpm2cpio (thenetchild2003-12-121-2/+2 * Update to 0.2.0.nobutaka2003-12-117-41/+27 * fix lockup problem on large-numbered anchor.sf2003-12-102-0/+15 * Update to 0.1.7.nobutaka2003-12-083-3/+4 * Update to 4.0.2: minor bugfixes.linimon2003-12-082-2/+2 * Update to 1.4.10perky2003-12-072-3/+2 * Update to 0.74arved2003-12-052-4/+4 * Upgrade to 2.03.max2003-12-045-15/+9 * Fix build by syncing with gaim-0.73.marcus2003-12-041-2/+2 * Unbreak by updating checksum as of 2003-11-08.kuriyama2003-11-272-2/+2 * List conflicts among japanese/linux-JM, japanese/samba,trevor2003-11-262-0/+4 * Add mpeg/utf8 functionality. This will unbreak ja-ruby-ming port.kuriyama2003-11-233-3/+9 * Increment PORTVERSION to 5.2, as the Japanese manual pagesokazaki2003-11-221-2/+1 * - Update to version 4.0.1krion2003-11-214-13/+53 * New version for original archive's version-up. Only the fontslinimon2003-11-212-2/+2 * new port japanese/squirrelmaileik2003-11-213-1/+32 * Define USE_PERL5_BUILD, not erroneous USE_PERL.trevor2003-11-203-3/+3 * Define USE_PERL to make Perl available for (mostly deprecated)trevor2003-11-203-0/+4 * Fix packing list.trevor2003-11-201-1/+2 * new Japanese-language, Linux/i386 binary port of Firebird Web browsertrevor2003-11-204-0/+37 * new port of Japanese Truetype fonts for use with Linux emulationtrevor2003-11-194-0/+47 * Describe this port.trevor2003-11-191-5/+8 * new Japanese-language, i386 Linux binary port of Firebird Web browsertrevor2003-11-194-0/+24 * USE_REINPLACE must be defined before REINPLACE_CMD may be used.trevor2003-11-171-0/+1 * Update to 0.1.5.nobutaka2003-11-162-3/+3 * Slave ports do not need to include the master category in CATEGORIES.linimon2003-11-152-4/+0 * Use the FIND and XARGS macros introduced in bsd.port.mk 1.391.trevor2003-11-1311-12/+14 * Hardcode PKGNAMEPREFIX.edwin2003-11-131-0/+2 * Add japanese/ruby-ming as a slave of graphics/ruby-ming. It dependsknu2003-11-132-0/+17 * Add CONFLICTS lines; ming and ja-ming conflict with each other.knu2003-11-131-0/+2 * Upgrade to 0.72.sumikawa2003-11-122-6/+4 * 1) Fix build on 5-current.maho2003-11-101-0/+26 * Update japanese/mplusfonts port for 2.1.0.jeh2003-11-094-4/+4 * japanese/cannadic to 0.95ajeh2003-11-094-5/+5 * OpenOffice -> OpenOffice.orgmaho2003-11-093-3/+3 * Update to 0.1.4.1.nobutaka2003-11-096-17/+32 * 1) update MASTER_SITEmaho2003-11-092-10/+6 * 1. update pkg-descrmaho2003-11-091-9/+5 * MASTER_SITE has been changed.maho2003-11-091-1/+1 * Update to 4700.nobutaka2003-11-094-10/+8 * MASTERDIR is now openoffice-1.0 after repocopymaho2003-11-081-1/+1 * change RUN_DEPENDS openoffice-devel -> openoffice-1.1maho2003-11-081-1/+1 * removemaho2003-11-081-2/+2 * repo copy has been done so:maho2003-11-082-35/+0 * Add another s/PORTDOCS/MYPORTDOCS/marcus2003-11-081-2/+2 * Fix it properly this time:edwin2003-11-072-3/+1 * One more instance of s/PORTDOCS/MYPORTDOCS/marcus2003-11-071-2/+2 * Rename PORTDOCS to MYPORTDOCS to avoid a conflict with the recently addedmarcus2003-11-071-2/+2 * add openoffice-1.0 and openoffice-1.1 directories.edwin2003-11-071-0/+2 * Update to 1.4b.nork2003-11-073-8/+6 * - Fix MASTER_SITESkrion2003-11-072-3/+6 * change RUN_DEPENDS openoffice-devel -> openoffice-1.1maho2003-11-061-1/+1 * change master dirmaho2003-11-061-1/+1 * Fix build on 5-currentmaho2003-11-061-0/+14 * This PR is basically a "japanese/kappa20 X11 bitmap font" port update.jeh2003-11-067-81/+143 * 1) update to 1.5 JLP 0.2maho2003-11-042-4/+3 * Take over maintainership to Fortune <fortune@n.jpn.ph>maho2003-11-041-1/+1 * Upgrade to 0.71.kuriyama2003-11-035-179/+72 * Restore previous maintainer per his requestkris2003-11-031-1/+1 * Mark BROKEN (see bento logs). These ports are scheduled for removalkris2003-11-031-0/+2 * Reset maintainer on ports maintained by the following non-ports committers,kris2003-11-031-1/+1 * Reset maintainer on ports owned by the following committers who havekris2003-11-036-6/+6 * ports with possibly unreachable MAINTAINERsedwin2003-11-024-4/+4 * ports with possibly unreachable MAINTAINERsedwin2003-11-023-3/+3 * * Sync with the master portmarcus2003-11-012-3/+6 * Update to 21 Oct 2003.nork2003-11-012-2/+2 * PORTVERSION should have been bumped via previous commit. Reportedlinimon2003-10-301-1/+1 * Chase new e-mail address as MAINTAINER.nork2003-10-301-1/+1 * KATO-san points out that I had overlooked the fact that a changelinimon2003-10-291-7/+1 * Move inclusion of bsd.port.pre.mk after the basic definitions.linimon2003-10-291-4/+4 * Mark as broken on 5.x due to gcc3.3 issues.linimon2003-10-291-1/+7 * Create a pid file and nohup.out in /var/run/esecanna/.knu2003-10-263-3/+10 * Fix build on 5.x.knu2003-10-251-0/+11 * utilize SITE_PERLijliao2003-10-2418-95/+91 * Fix many wrong "href"s in smb.conf.5.html.nork2003-10-232-1/+5631 * Respect CC and CFLAGSkris2003-10-231-0/+13 * Use ${MASTER_SITE_DEBIAN} instead of ${MASTER_SITE_GNU} for MASTER_SITESokazaki2003-10-222-6/+7