[Mimedefang] Email in Korean language becomes clutterd andunreadable when received.

Kevin A. McGrail kmcgrail at pccc.com
Wed Nov 11 10:22:24 EST 2009


Stephen already replied as well but making a number of assumptions, it's
possible you have a FalsePositive issue with your SpamAssassin setup.  In
short, while MD uses SA, the culprit is likely SA and more specifically that
you are tagging foreign language emails as Spam.

The numbers in the report below add up to 8.5.  What is your threshold in
SpamAssassin for marking an email as Spam?

Assuming it is below 8.5, (The default is 5.0), the email was likely mangled
because it was treated as Spam.

Try adding these lines to disable those rules to your sa-mimedefang.cf and
restart MD.


Assuming this works, what you might want to do instead is exclude your
internal network from being scanned by SpamAssassin.  Because MD is calling
SA, I use a routine like the following:

sub is_authorized_sender {
  my ($sender, $RelayAddr, $helo) = @_;
  my ($auth, $popauthdb);

  $auth = 0;

  if ($RelayAddr =~ /^127\.0\.0\.1$/) {
    return 1;

  if ($RelayAddr =~ /^192\.168\.1\.\d{1,3}$/) {
    return 1;

  return $auth;

Then add a loop around your SA calls that utilizes this test:

if (($Features{"SpamAssassin"} and $authorized_sender < 1) {

The is_authorized_user can be extended greatly to test for use of SMTP AUTH,
etc.  My routine has quite a few bells and whistles so it's a great

----- Original Message ----- 
From: "Aniruddha Barua" <zmrif at yahoo.com>
To: <mimedefang at lists.roaringpenguin.com>
Sent: Wednesday, November 11, 2009 5:26 AM
Subject: Re: [Mimedefang] Email in Korean language becomes clutterd
andunreadable when received.

> Sorry, the headers are unavailable. The Korean buyer left a few days ago. 
> Before leaving, he had switched to
> his domain's SMTP server for further correspondences. His Operating System 
> (Win XP) was entirely set in
> Korean language.
> However, I have some lines from Spamassasin report:
> 3.2 CHARSET_FARAWAY_HEADER A foreign language charset used in headers
> 1.0 BAYES_60               BODY: Bayesian spam probability is 60 to 80%
>                            [score: 0.7083]
> 0.0 HTML_MESSAGE           BODY: HTML included in message
> 1.8 MIME_BASE64_TEXT       RAW: Message text disguised using base64 
> encoding
> 2.5 MIME_CHARSET_FARAWAY   MIME character set indicates foreign language
> Someday other Korean or Chinese or Japanese people will visit our 
> customers and send mails using our SMTP.
> So, need to be prepared. Where/how do I set charset in mimedefang 
> configuration?

More information about the MIMEDefang mailing list