Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388745 - mail-filter/maildrop: reformime sometimes fails with "C" locale (qmail-scanner!)
Summary: mail-filter/maildrop: reformime sometimes fails with "C" locale (qmail-scanner!)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL: http://sourceforge.net/mailarchive/fo...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 08:48 UTC by Peter Gantner (a.k.a. nephros)
Modified: 2011-10-28 20:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gantner (a.k.a. nephros) 2011-10-28 08:48:48 UTC
reformime can be triggered to output the following error message:

   malloc: Invalid or incomplete multibyte or wide character

This causes qmail-scanner to detect an error in the reformime run and reject mail (qq temporary problem (#4.3.0))

The qmail-scanner script forces the locale to "C", apparently to make the scans more reliable. Settting the locale to "C" and running reformime with an affected MIME message triggers this. utf8-enables locale settings do not have this problem.

According to this thread, this is a maildrop bug:

http://sourceforge.net/mailarchive/forum.php?thread_name=4B7842D9.9090303%40trimble.co.nz&forum_name=qmail-scanner-general

Reproducible: Always

Steps to Reproduce:
1. create a MIME message (not ALL messages have this problem, some do) I have had the most "luck" with Excel attachments to messages created in Thunderbird on Windows.
2. Send the message to a qmail-scanner equipped SMTP server
3. observe the mail delivery fail and see the following in the qmail logs:
 qmail-scanner-queue.pl: X-Qmail-Scanner-2.08st:[server131979063879220926] d_m: output spotted from /usr/bin/reformime  -x/var/spool/qscan/tmp/server131979063879220926/ (malloc: Invalid or incomplete multibyte or wide character
) - that shouldn't happen!
4. export the bad message in thunderbird ("view source, save as file")
5. see command line examples in "Additional information" section below.



chalice qscan [157] # cat /home/nephros/mimefail.msg | env LC_ALL="C" LANG="C" /usr/bin/reformime -x`mktemp -d` 2>&1
malloc: Invalid or incomplete multibyte or wide character
chalice qscan [158] # cat /home/nephros/mimefail.msg | env LC_ALL="C" LANG="C" /usr/bin/reformime -x`mktemp -d` 2>&1
malloc: Invalid or incomplete multibyte or wide character
chalice qscan [158] # cat /home/nephros/mimefail.msg | env LC_ALL="C" LANG="en_IE.utf8" /usr/bin/reformime -x`mktemp -d` 2>&1
malloc: Invalid or incomplete multibyte or wide character
chalice qscan [159] # cat /home/nephros/mimefail.msg | env LC_ALL="en_IE.utf8" LANG="en_IE.utf8" /usr/bin/reformime -x`mktemp -d` 2>&1
chalice qscan [160] # ^^^ NO ERROR HERE
Comment 1 Eray Aslan gentoo-dev 2011-10-28 20:58:32 UTC
(In reply to comment #0)
> According to this thread, this is a maildrop bug:

No.  That bug was fixed in maildrop-2.4.1 with the following Changelog:

2010-02-14  Sam Varshavchik  <mrsam@courier-mta.com>
	* mailbot, reformime: Default to ISO-8859-1 in case of an unknown
	default charset (probably we are in the C locale).

Please see the following link for a workaround:
http://sourceforge.net/mailarchive/message.php?msg_id=24606798

Upgrading qmail-scanner might also help.