diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/attention qmail-scanner-1.25/locale/ja_JP.EUC/attention
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/attention	2003-10-16 10:51:57.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/attention	2005-04-08 00:12:54.000000000 +0900
@@ -1,2 +1 @@
-
-Attention
\ No newline at end of file
+ÍÍ
\ No newline at end of file
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_automated_mail_note qmail-scanner-1.25/locale/ja_JP.EUC/recips_automated_mail_note
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_automated_mail_note	2003-10-16 10:51:57.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_automated_mail_note	2004-08-12 08:54:24.000000000 +0900
@@ -1,5 +1,5 @@
 
 
-[È¯¿®¼Ô¤¬¥á¥¤¥ê¥ó¥°¥ê¥¹¥È¤Þ¤¿¤ÏÂ¾¤Î¼«Æ°²½¥á¥Ã¥»¡¼¥¸¤Ê¤Î¤Ç¡¢
+[È¯¿®¸µ¤¬¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ê¤É¼«Æ°²½¥·¥¹¥Æ¥à¤Î¤è¤¦¤Ê¤Î¤Ç¡¢
 ¤³¤Î¥á¥Ã¥»¡¼¥¸¤ÏÈ¯¿®¼Ô¤Î¥¢¥É¥ì¥¹¤Ë¤ÏÁ÷¤é¤ì¤Æ¡²¤¤¤Þ¤»¤ó¡²¡£]
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_content qmail-scanner-1.25/locale/ja_JP.EUC/recips_content
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_content	2003-10-16 10:51:57.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_content	2005-04-08 21:50:12.000000000 +0900
@@ -2,13 +2,14 @@
 
 %%quarantine_description
 
-¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤Ï¾ðÊóµ»½ÑÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
+¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤ÏITÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
 
 ¤¢¤Ê¤¿¤ØÁ÷¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹:
 
-MAIL FROM: %%returnpath
+MAIL FROM: %%header_from
 RCPT TO:   %%recips 
+SUBJECT:   %%subj_conved
 
-... ¤½¤·¤Æ°Ê²¼¤Î¥Ø¥Ã¥À¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹:
+¤Ê¤ª¡¢¥Ø¥Ã¥À¡¼¤Ï°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤·¤¿:
 
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_explanation qmail-scanner-1.25/locale/ja_JP.EUC/recips_explanation
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_explanation	2003-10-16 10:51:57.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_explanation	2005-04-08 21:49:56.000000000 +0900
@@ -1,4 +1,4 @@
-%%destring ¤¬¡¢¤¢¤Ê¤¿°¸¤ÎemailÃæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿¡£
-email¤Î¥¹¥­¥ã¥Ê¡¼¤¬¤½¤ì¤òÊáÂª¤·¡¢
-¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤¬¤¢¤Ê¤¿¤ËÇÛÁ÷¤µ¤ì¤ëÁ°¤ËÄä»ß¤µ¤»¤Þ¤·¤¿¡£
+¤¢¤Ê¤¿°¸¤Î¥á¡¼¥ë¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿¡£
+¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬¥¦¥¤¥ë¥¹¤òÊáÂª¤·¡¢
+¤¢¤Ê¤¿¤ËÇÛ¿®¤µ¤ì¤Ê¤¤¤è¤¦¡¢¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤ò¥¹¥È¥Ã¥×¤·¤Þ¤·¤¿¡£
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_msg_description qmail-scanner-1.25/locale/ja_JP.EUC/recips_msg_description
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_msg_description	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_msg_description	2005-04-08 21:49:32.000000000 +0900
@@ -2,13 +2,14 @@
 
 %%quarantine_description
 
-¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤Ï¾ðÊóµ»½ÑÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
+¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤ÏITÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
 
-¤¢¤Ê¤¿¤ØÁ÷¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹:
+¤¢¤Ê¤¿¤ØÁ÷¤é¤ì¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿:
 
-MAIL FROM: %%returnpath
+MAIL FROM: %%header_from
 RCPT TO:   %%recips 
+SUBJECT:   %%subj_conved
 
-... ¤½¤·¤Æ°Ê²¼¤Î¥Ø¥Ã¥À¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹:
+¤Ê¤ª¡¢¥Ø¥Ã¥À¡¼¤Ï°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤·¤¿:
 
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_not_automated_mail_note qmail-scanner-1.25/locale/ja_JP.EUC/recips_not_automated_mail_note
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_not_automated_mail_note	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_not_automated_mail_note	2004-08-12 08:48:18.000000000 +0900
@@ -1,4 +1,4 @@
 
-[È¯¿®¼Ô°¸¤Ë¡¢Èà¤¬¤¢¤Ê¤¿¤ËÁ÷¤Ã¤¿emailÃæ¤Ë¥¦¥¤¥ë¥¹¤¬Â¸ºß¤·¤Æ¤¤¤¿»Ý¤Î
-¥á¥Ã¥»¡¼¥¸¤òÁ÷¤ê¤Þ¤·¤¿¡£¤¢¤Ê¤¿¤ÎÂ¦¤Ç¤Ï¤³¤ì°Ê¾å¤Îºî¶È¤ÏÉ¬Í×¤¢¤ê¤Þ¤»¤ó¡£]
+[¤¢¤Ê¤¿¤ËÁ÷¤Ã¤¿¥á¡¼¥ë¤ÎÃæ¤Ë¥¦¥¤¥ë¥¹¤¬Â¸ºß¤·¤Æ¤¤¤¿¤È¤¤¤¦»Ý¤Î¥á¥Ã¥»¡¼¥¸¤ò¡¢
+È¯¿®¼Ô°¸¤ËÁ÷¤ê¤Þ¤·¤¿¡£¤¢¤Ê¤¿¤ÏÆÃ¤Ë²¿¤â¤¹¤ëÉ¬Í×¤Ï¤¢¤ê¤Þ¤»¤ó¡£]
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_quarantine qmail-scanner-1.25/locale/ja_JP.EUC/recips_quarantine
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_quarantine	2004-01-13 08:43:46.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_quarantine	2004-08-12 08:45:30.000000000 +0900
@@ -1,12 +1,12 @@
 
 
-¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
+%%V_FROMNAME ¤Ë¤è¤ë¾ÜºÙ¤ÊÊ¬ÀÏ¤¬¤Ç¤­¤ë¤è¤¦¡¢
+¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î¾ì½ê¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
 
   %%hostname:%%scandir/%%vmaildir/new/%%file_id
 
-¤½¤³¤Ç¡¡%%V_FROMNAME ¤¬¤µ¤é¤Ë¿ÇÃÇ¤Ç¤­¤Þ¤¹¡£.
 
-¤½¤Î¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿¤È¤­¡¢email¥¹¥­¥ã¥Ê¡¼¤Ï°Ê²¼¤Î¤è¤¦¤ËÊó¹ð¤·¤Þ¤·¤¿:
+¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿ºÝ¤Ë¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬ÊÖ¤·¤¿Êó¹ð¤Ï²¼µ­:
 
 --- 
 %%description
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_subject qmail-scanner-1.25/locale/ja_JP.EUC/recips_subject
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/recips_subject	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/recips_subject	2004-08-12 11:15:30.000000000 +0900
@@ -1,2 +1,2 @@
-¤¬¼õ¤±¼è¤Ã¤¿¥á¥Ã¥»¡¼¥¸Ãæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿
+¤¢¤Ê¤¿°¸¤Î¥á¥Ã¥»¡¼¥¸¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_automated_mail_note qmail-scanner-1.25/locale/ja_JP.EUC/sender_automated_mail_note
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_automated_mail_note	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_automated_mail_note	2004-08-12 09:01:58.000000000 +0900
@@ -1,4 +1,4 @@
 
 
-[È¯¿®¼Ô¤¬¥á¥¤¥ê¥ó¥°¥ê¥¹¥È¤Þ¤¿¤ÏÂ¾¤Î¼«Æ°²½¥á¥Ã¥»¡¼¥¸¤Ê¤Î¤Ç¡¢
+[È¯¿®¸µ¤¬¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤Ê¤É¼«Æ°²½¥·¥¹¥Æ¥à¤Î¤è¤¦¤Ê¤Î¤Ç¡¢
 ¤³¤Î¥á¥Ã¥»¡¼¥¸¤ÏÈ¯¿®¼Ô¤Î¥¢¥É¥ì¥¹¤Ë¤ÏÁ÷¤é¤ì¤Æ¡²¤¤¤Þ¤»¤ó¡²¡£]
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_explanation qmail-scanner-1.25/locale/ja_JP.EUC/sender_explanation
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_explanation	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_explanation	2004-08-12 09:01:18.000000000 +0900
@@ -1,7 +1,7 @@
 
-%%destring ¤¬¡¢¤¢¤Ê¤¿¤¬Á÷¤Ã¤¿emailÃæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿¡£
-email¤Î¥¹¥­¥ã¥Ê¡¼¤¬¤½¤ì¤òÊáÂª¤·¡¢
-¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤¬°¸Àè¤ËÇÛÁ÷¤µ¤ì¤ëÁ°¤ËÄä»ß¤µ¤»¤Þ¤·¤¿¡£
+¤¢¤Ê¤¿¤ÎÁ÷¤Ã¤¿¥á¡¼¥ë¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿¡£
+¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬¥¦¥¤¥ë¥¹¤òÊáÂª¤·¡¢
+°¸Àè¤ËÇÛÁ÷¤µ¤ì¤Ê¤¤¤è¤¦¡¢¤½¤Î¥á¥Ã¥»¡¼¥¸Á´ÂÎ¤ò¥¹¥È¥Ã¥×¤·¤Þ¤·¤¿¡£
 
 ¸¡½Ð¤µ¤ì¤¿ %%destring ¤Ï:
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_msg_description qmail-scanner-1.25/locale/ja_JP.EUC/sender_msg_description
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_msg_description	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_msg_description	2005-04-08 21:00:04.000000000 +0900
@@ -1,11 +1,11 @@
 
+¤¢¤Ê¤¿¤ÎÁ÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤·¤¿:
 
-¤¢¤Ê¤¿¤¬Á÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î°¸Ì¾½ñ¤­¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹:
-
-MAIL FROM: %%returnpath
+MAIL FROM: %%header_from
 RCPT TO:   %%recips 
+SUBJECT:   %%subj_conved
 
-... ¤½¤·¤Æ°Ê²¼¤Î¥Ø¥Ã¥À¡¼¤¬ÉÕ¤¤¤Æ¤¤¤Þ¤¹:
+¤Ê¤ª¡¢¥Ø¥Ã¥À¡¼¤Ï°Ê²¼¤Î¤è¤¦¤Ê¤â¤Î¤Ç¤·¤¿:
 
 
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_other_content qmail-scanner-1.25/locale/ja_JP.EUC/sender_other_content
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_other_content	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_other_content	2005-04-08 21:48:16.000000000 +0900
@@ -1,3 +1,3 @@
 
-¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤Ï¾ðÊóµ»½ÑÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
+¤³¤ÎÊý¿Ë¤Ë¤Ä¤¤¤Æ¤Ê¤Ë¤«¼ÁÌä¤¬¤¢¤ë¾ì¹ç¤ÏITÃ´Åö¼Ô¤ËÁêÃÌ¤·¤Æ¤¯¤À¤µ¤¤¡£
 
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_quarantine qmail-scanner-1.25/locale/ja_JP.EUC/sender_quarantine
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_quarantine	2004-01-13 08:43:46.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_quarantine	2004-08-12 08:58:40.000000000 +0900
@@ -1,12 +1,12 @@
 
 
-¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
+%%V_FROMNAME ¤Ë¤è¤ë¾ÜºÙ¤ÊÊ¬ÀÏ¤¬¤Ç¤­¤ë¤è¤¦¡¢
+¸µ¤Î¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î¾ì½ê¤ËÊÝ´É¤µ¤ì¤Æ¤¤¤Þ¤¹:
 
   %%hostname:%%scandir/%%vmaildir/new/%%file_id
 
-¤½¤³¤Ç¡¡%%V_FROMNAME ¤¬¤µ¤é¤Ë¿ÇÃÇ¤Ç¤­¤Þ¤¹¡£.
 
-¤½¤Î¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿¤È¤­¡¢email¥¹¥­¥ã¥Ê¡¼¤Ï°Ê²¼¤Î¤è¤¦¤ËÊó¹ð¤·¤Þ¤·¤¿:
+¥á¥Ã¥»¡¼¥¸¤ò¥¹¥­¥ã¥ó¤·¤¿ºÝ¤Ë¥á¡¼¥ë¥¹¥­¥ã¥Ê¡¼¤¬ÊÖ¤·¤¿Êó¹ð¤Ï²¼µ­:
 
 --- 
 %%description
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_subject qmail-scanner-1.25/locale/ja_JP.EUC/sender_subject
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_subject	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_subject	2004-08-12 11:16:54.000000000 +0900
@@ -1 +1 @@
-¤¬Á÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸Ãæ¤ËÈ¯¸«¤µ¤ì¤Þ¤·¤¿
+¤¢¤Ê¤¿¤ÎÁ÷¤Ã¤¿¥á¥Ã¥»¡¼¥¸¤ÎÃæ¤Ë %%destring ¤¬È¯¸«¤µ¤ì¤Þ¤·¤¿
diff -urN qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_virus_content qmail-scanner-1.25/locale/ja_JP.EUC/sender_virus_content
--- qmail-scanner-1.25.org/locale/ja_JP.EUC/sender_virus_content	2003-10-16 10:51:58.000000000 +0900
+++ qmail-scanner-1.25/locale/ja_JP.EUC/sender_virus_content	2005-04-08 21:47:32.000000000 +0900
@@ -1,5 +1,5 @@
 
-Â¨¹ï¤¢¤Ê¤¿¤Î¥¦¥¤¥ë¥¹¸¡½Ð¥½¥Õ¥È¤ò¹¹¿·¤¹¤ë¤«¡¢
-¤¢¤Ê¤¿¤Î¥·¥¹¥Æ¥à¤Ë¥¦¥¤¥ë¥¹¤¬´¶À÷¤·¤Æ¤¤¤ë»Ý¤ò
-¾ðÊóµ»½ÑÃ´Åö¼Ô¤ËÏ¢Íí¤·¤Æ¤¯¤À¤µ¤¤¡£
+¤¹¤°¤Ë¤¢¤Ê¤¿¤Î¥¦¥¤¥ë¥¹¸¡½Ð¥½¥Õ¥È¤ò¹¹¿·¤¹¤ë¤«¡¢
+¤¢¤Ê¤¿¤Î¥·¥¹¥Æ¥à¤¬¥¦¥¤¥ë¥¹¤Ë´¶À÷¤·¤Æ¤¤¤ë»Ý¤ò
+ITÃ´Åö¼Ô¤ËÏ¢Íí¤·¤Æ¤¯¤À¤µ¤¤¡£
 
diff -urN qmail-scanner-1.25.org/qmail-scanner-queue.template qmail-scanner-1.25/qmail-scanner-queue.template
--- qmail-scanner-1.25.org/qmail-scanner-queue.template	2005-01-28 07:51:58.000000000 +0900
+++ qmail-scanner-1.25/qmail-scanner-queue.template	2005-04-09 00:30:31.000000000 +0900
@@ -279,6 +279,9 @@
 
 use Getopt::Std;
 
+use Jcode;
+use MIME::Base64;
+
 #my ($opt_v,$opt_h,$opt_g,$opt_r,$opt_z);
 
 getopts('vhgrz');
@@ -1864,6 +1867,17 @@
   print "\n\n\n";
 }
 
+sub to_jis {
+  my $str = shift;
+  my $jopt = shift;
+  my $j = jcode($str);
+  if ( $jopt eq 'mime') {
+    $str = $j->mime_encode();
+  } else {
+    $str = $j->jis;
+  }
+  return $str;
+}
 
 sub email_sender {
   #Don't e-mail bounced mail messages/etc!
@@ -1874,7 +1888,8 @@
   $polstring='policy' if (&notify_addr('nmlvadm'));
 
   open(SM,"|$qmailinject -h -f ''")||&error_condition("cannot open $qmailinject for sending quarantine report - $!");
-  print SM "From: \"$V_FROMNAME\" <$V_FROM>\n";
+  my $msg_fromname = &to_jis($V_FROMNAME);
+  print SM "From: \"$msg_fromname\" <$V_FROM>\n";
   if ($addr_type =~ /sender/) {
     $addr_type='psender' if ($NOTIFY_ADDRS =~ /psender/);
     if ($addr_type eq "sender") {
@@ -1905,8 +1920,15 @@
       &debug("e_s: don't notify admin");
     }
   }
-  $tmpsubj="$destring LOCALE_sender_subject \"$headers{'subject'}\"";
+  my $subj_conved = $headers{'subject'};
+  if ( $subj_conved =~ /=\?.+-jp\?.*\?=/i ) {
+    $subj_conved =~ s/(\r|\0|\n)/ /g;
+    my $j = jcode($subj_conved);
+    $subj_conved = $j->mime_decode->euc;
+  }
+  $tmpsubj = "LOCALE_sender_subject \"$subj_conved\"";
   $tmpsubj =~ s/(\r|\0|\n)/ /g;
+  $tmpsubj = &to_jis($tmpsubj,'mime');
   print SM "Subject: $tmpsubj\n";
   print SM "Message-ID: <".&uniq_id."\@$hostname>\n";
   print SM "X-Tnz-Problem-Type: 40\n";
@@ -1916,7 +1938,7 @@
     print SM "References: ",$headers{'message-id'},"\n";
   }
   print SM "MIME-Version: 1.0\n";
-  print SM "Content-type: text/plain\n";
+  print SM "Content-type: text/plain; charset=\"ISO-2022-JP\"\n";
   if ( $descriptive_hdrs ) {
     print SM "${V_HEADER}-Mail-From: $returnpath via $hostname\n";
     print SM "${V_HEADER}-Rcpt-To: $recips\n" if ($descriptive_hdrs eq "2");
@@ -1925,25 +1947,43 @@
   }
   print SM "\n";
   if (&is_unreplyable_email('sender')) {
-    print SM "LOCALE_attention: $V_FROMNAME.\n";
-    print SM "LOCALE_sender_automated_mail_note\n";
+    my $attention = "$V_FROMNAME LOCALE_attention";
+    $attention = &to_jis($attention);
+    my $sender_auto_note = "LOCALE_sender_automated_mail_note";
+    $sender_auto_note = &to_jis($sender_auto_note);
+	print SM "\n$attention\n";
+    print SM "$sender_auto_note\n";
     print SM "\n---------------------------------------\n\n";
   } else {
-    print SM "LOCALE_attention: $returnpath\n";
-  }
-  print SM "\nLOCALE_sender_explanation\n";
+    my $attention = "$returnpath LOCALE_attention";
+    $attention = &to_jis($attention);
+    print SM "\n$attention\n";
+  }
+  my $sender_explain = "LOCALE_sender_explanation";
+  $sender_explain = &to_jis($sender_explain);
+  print SM "\n$sender_explain\n";
   if ($destring eq "virus") {
-    print SM "\nLOCALE_sender_virus_content\n";
+    my $sender_vir_cont = "LOCALE_sender_virus_content";
+    $sender_vir_cont = &to_jis($sender_vir_cont);
+    print SM "\n$sender_vir_cont\n";
   } else {
-    print SM "\nLOCALE_sender_other_content\n";
-  }
-  print SM "\nLOCALE_sender_msg_description\n\n";
+    my $sender_other_cont = "LOCALE_sender_other_content";
+    $sender_other_cont = &to_jis($sender_other_cont);
+    print SM "\n$sender_other_cont\n";
+  }
+  my $header_from = $headers{'MAILFROM'};
+  $header_from = &to_jis($header_from);
+  my $sender_msg_desc = "LOCALE_sender_msg_description";
+  $sender_msg_desc = &to_jis($sender_msg_desc);
+  print SM "\n$sender_msg_desc\n\n";
   print SM "---\n";
-  print SM "MAILFROM: $headers{'MAILFROM'}\n";
+  print SM "MAILFROM: $header_from\n";
   print SM "$HEADERS\n";
   print SM "---\n";
   if ($addr_type ne "sender" ) {
-    print SM "\nLOCALE_sender_quarantine\n";
+    my $sender_quarant = "LOCALE_sender_quarantine";
+    $sender_quarant = &to_jis($sender_quarant);
+    print SM "\n$sender_quarant\n";
   }
   close(SM);
   if ($log_details) {
@@ -1966,13 +2006,21 @@
   my($tmpmsgid)= &uniq_id() . "-" . $V_FROM;
 
   open(SM,"|$qmailinject -h -f ''")||&error_condition("cannot open $qmailinject for sending quarantine report - $!");
-  print SM "From: \"$V_FROMNAME\" <$V_FROM>\n";
+  my $msg_fromname = &to_jis($V_FROMNAME);
+  print SM "From: \"$msg_fromname\" <$V_FROM>\n";
   if (!&is_unreplyable_email('recips')) {
     &debug("e_r: sending quarantine report via: $qmailinject to recip address ($recip)");
     print SM "To: $recip\n";
   }
-  $tmpsubj= "$destring LOCALE_recips_subject \"$headers{'subject'}\"";
+  my $subj_conved = $headers{'subject'};
+  if ( $subj_conved =~ /=\?.+-jp\?.*\?=/i ) {
+    $subj_conved =~ s/(\r|\0|\n)/ /g;
+    my $j = jcode($subj_conved);
+    $subj_conved = $j->mime_decode->euc;
+  }
+  $tmpsubj = "LOCALE_recips_subject \"$subj_conved\"";
   $tmpsubj =~ s/(\r|\0|\n)/ /g;
+  $tmpsubj = &to_jis($tmpsubj,'mime');
   print SM "Subject: $tmpsubj\n";
   print SM "Message-ID: <".&uniq_id."\@$hostname>\n";
   print SM "X-Tnz-Problem-Type: 40\n";
@@ -1982,26 +2030,38 @@
   }
   print SM "Auto-Submitted: auto-replied\n";
   print SM "MIME-Version: 1.0\n";
-  print SM "Content-type: text/plain\n";
+  print SM "Content-type: text/plain; charset=\"ISO-2022-JP\"\n";
   if ( $descriptive_hdrs ) {
     print SM "${V_HEADER}-Mail-From: $returnpath via $hostname\n";
     print SM "${V_HEADER}-Rcpt-To: $recip\n" if ($descriptive_hdrs eq "2");
     print SM "$V_HEADER: $VERSION ($SCANINFO $destring Found. \n";
     print SM " Processed in ",tv_interval($start_time,[gettimeofday])," secs)\n";
   }
+  my $attention = "$recip LOCALE_attention";
+  $attention = &to_jis($attention);
   print SM "\n";
-  print SM "LOCALE_attention: $recip\n";
+  print SM "\n$attention\n";
   if (!&is_unreplyable_email('recips')) {
     if (&notify_addr('sender')) {
-      print SM "LOCALE_recips_not_automated_mail_note\n";
+      my $rcps_noauto_note = "LOCALE_recips_not_automated_mail_note";
+      $rcps_noauto_note = &to_jis($rcps_noauto_note);
+      print SM "$rcps_noauto_note\n";
     }
   } else {
-    print SM "LOCALE_recips_automated_mail_note\n";
-  }
-  print SM "\nLOCALE_recips_explanation\n";
-  print SM "\nLOCALE_recips_msg_description\n\n";
+    my $rcps_auto_note = "LOCALE_recips_automated_mail_note";
+    $rcps_auto_note = &to_jis($rcps_auto_note);
+    print SM "$rcps_auto_note\n";
+  }
+  my $rcps_explain = "LOCALE_recips_explanation";
+  $rcps_explain = &to_jis($rcps_explain);
+  my $header_from = $headers{'MAILFROM'};
+  $header_from = &to_jis($header_from);
+  my $rcps_msg_desc = "LOCALE_recips_msg_description";
+  $rcps_msg_desc = &to_jis($rcps_msg_desc);
+  print SM "\n$rcps_explain\n";
+  print SM "\n$rcps_msg_desc\n\n";
   print SM "---\n";
-  print SM "MAILFROM: $headers{'MAILFROM'}\n";
+  print SM "MAILFROM: $header_from\n";
   print SM "$HEADERS\n";
   print SM "---\n";
   #print SM "\nLxOCALE_recips_quarantine\n";
