  ¥ ѱ  (Korean-Encoding SendMail Preprocessor)

  , jhpark@entropy.kaist.ac.kr
  Version: 0.2  1997 4 5

  1.   α׷ 

  ¥ ѱ , ( ¥ sendmail Ǵ kesmpre)  ѱ
  sendmail ϴ ISO-2022-KR encoding , sendmail иϿ,
   α׷  Դϴ.

   E-mail ѱ decoding ̹ local mailer procmail ϰ
  procmail ͷ hcode ν ϰ Ǿ ֽϴ.

  ¥ sendmail procmail + hcode,  sendmail  ѱ sendmail
   ü  ְ ˴ϴ.

  ̷ ν,  sendmail ŵ  ׿  ѱ 
   ʿ䰡 , elm, pine, emacs, mailx  mail user
  agent(MUA) ѱ encoding  ߰ ʾƵ ˴ϴ.  ٸ,
  ѱ Է  ְ ణ ĥ ʿ ְ.

  ׷, ѱ  ִ E-mail ۽ϱ   encodingϴ
   ٶ  ƴմϴ.   α׷  ȭ mail
  transport agent  , ӽ÷ ѱ  óϱ ؼ
    Ͻñ ٶϴ.

  2.  

  2.1.  UNIX Mail Transport Agent( ó)

  UNIX ȣƮ ġǾ ִ ¥ sendmail,  ȣƮ MUA ¥
  sendmail   ߿, ѱ κ encoding ݴϴ.

  ¥ sendmail  ʰ, MUA  ؼ MUA  ѱ
  encodeϰ <http://pantheon.cis.yale.edu/~jshin/faq/qa9.html>  
  ֽϴ.

  ¥ sendmail        ϴ
  ֽϴ.  ¥ sendmail , mailx  α׷ I/O
  redirection̳ pipe ѱ ѱ ϵ encode  ֽϴ.

  2.2.  SMTP ( ó)

  Windows Ʈó, SMTP  Ἥ   α׷
  ֽϴ.  ׷ α׷ SMTP  ¥ ѱ sendmail 
   ֽϴ.

  ׷ ϸ,  ѱ encodeϴ   α׷ε,
  ѱ  ִ    ֽϴ.   ׷ Ϸ ¥
  sendmail ġ UNIX ȣƮ ־ մϴ.

  3.  Encoding

  3.1.  Encoding Ѱ 

  Ͽ 8 bit ڰ ִٰ  ѱ̶   ϴ.
  ¥ sendmail encoding θ   ִ   
  մϴ.

  ù° ȯ  KESMPRE ϴ Դϴ.  Encodingϰ ϴ
  character set ̸ `:' иؼ  ˴ϴ.  
   charset EUC-KR  charset    encodingϰ
  Ϸ, Bourne shell

       $ export KESMPRE=euc-kr:none

  ϰ C shell

       $ setenv KESMPER euc-kr:none

  ϸ ˴ϴ.

  ° ~/.kesmpre /etc/kesmpre ̿ϴ Դϴ.  ~/.kesmpre
  κ  ̰ /etc/kesmpre ý ü  Դϴ.
   ӿ character set ̳ ๮ڷ ؼ ϴ.
    charset EUC-KR̳ ISO-2022-KR  encodingϰ Ϸ
   ӿ

       euc-kr
       iso-2022-kr

  ̶  ָ ˴ϴ.   ӿ comment   ϴ.

  3.2.  Encoding  

  ¥ sendmail ־  encoding ,    ϴ 
  ణ մϴ.

  o   ׻ encodeմϴ.

  o  8b ̰ cc ̸   , ü(body) encodeմϴ.
     ƴϸ    ʰ, ü ׳ Ӵϴ.

  o  8b, `ü 8bit character ִ' Դϴ.

  o  cc, `Content-Type ʵ忡 ִ charset, encode charset 
     ϳ̴' Դϴ.

  o  Encode charset, ȯ  KESMPRE, ~/.kesmpre, /etc/kesmpre
      ã ,      մϴ.   
      EUC-KR, ISO-2022-KR, ISO-8859-1, NONE  մϴ.

  3.3.    

  ¥ sendmail ü encode   뵵 ٲߴϴ.

  o  MIME-Version ʵ尡  ϳ մϴ.

  o  Content-Type ʵ尡 

       Content-Type: text/plain; charset=iso-2022-kr

   ߰ϰ,  charset iso-2022-kr ٲߴϴ.

  o  Content-Transfer-Encoding ʵ尡 

       Content-Transfer-Encoding: 7bit

   ϰ,    8bit̸ 7bit ٲߴϴ.

  4.    ý 

  ¥ ѱ sendmail ġѴٰ ѱ    ִ 
  ƴմϴ.  UNIX ȯ濡 ѱ  ְ   
  α׷ ġؾ մϴ.

      sendmail.
        翬 ̱.  <http://www.sendmail.org/> ʽÿ.

     hcode 2.1 mailpatch 2.
        <ftp://ftp.kaist.ac.kr/hangul/code/hcode/>   ֽϴ.

     procmail
        hcode ͷ   ִ local mailer ġؾ մϴ.
        ׷ mailerδ procmail θ ̰ ֽϴ.  Procmail
        hcode ̿ؼ,   decodeϴ  ˰ ,
        <http://pantheon.yale.edu/~jshin/faq/procmail.html> ñ
        ٶϴ.

  5.   

   , /tmp 丮 Ʒ,   ũ⸸ŭ 뷮
   ־ մϴ.

  6.  ۵ 

  κ MUA E-mail ۽ , MTA  , 
  Ÿ MTA ǳ ݴϴ.

      +-------+         +-------+
      |  MUA  |  ---->  |  MTA  |
      +-------+         +-------+

    Ÿ ϴ  pipe ϴ.  MUA MTA ̿
  ѱ encode ִ α׷  , MTA  sendmail
  , MUA   ڵ encode   Դϴ.

           +-------+         +-------+         +-------+
           |  MUA  |  ---->  |  MEA  |  ---->  |  MTA  |
           +-------+         +-------+         +-------+

   MEA   mail encoding agent(?) Դϴ.  ̷ MEA
  elm, mailx  ܹ pipe  MUA   , pine
   smtp protocol Ἥ MTA `ȭ'ϴ MUA   ϴ.

  ׷  piping ָ鼭 MUA->MTA Ÿ ϰ
  encodingϴ α׷   ֽϴ.

           +-------+      +--------------+      +-------+
           |       |      |              |      |       |
           |       |  <----- (verbatim) <-----  |       |
           |  MUA  |      |              |      |  MTA  |
           |       |  -----> (encoding) ----->  |       |
           |       |      |              |      |       |
           +-------+      +--------------+      +-------+
                                MEA

  ¥ sendmail  ̸ ٸ  ٲٰ, ¥ sendmail, 
  ¥ sendmail  ִ  ̸ ġϸ, MUA MTA ̿
  ¥ sendmail   ְ ˴ϴ.  MUA ¥ sendmail
  ϸ, ¥ ¥ sendmail fork-exec , ڱ ڽ stdin,
  stdout, stderr ¥ sendmail װó ϰ մϴ.  ,
  stdin  Ÿ  ѱ  encode  ¥
  ѱϴ.

  Smtp protocol  쿡 DATAɰ . ̿  Ÿ
  encodeմϴ.  [RFC821]

  7.   ڵ

     hmconv1.0pl3.c
        ̰,  ̸   ֵ, Ĵ
        <mailto:jshin@minerva.cis.yale.edu> hmconv 1.0 pl3  
        Դϴ.  ¥ sendmail ϱ ؼ Լ   ణ
        Ͽϴ.

     mail_hcode2.1mp2.c
        ̰ ؿ <mailto:jylee@math.kaist.ac.kr> hcode 2.1
        mail-patch2   Դϴ.  ¥ sendmail ϱ ؼ
        Լ   ణ Ͽϴ.

     invoke.c writen.c
        ̰ Richard Stevens  Advanced Programming in the UNIX
        Environment    Դϴ.

  8.  ˷ 

  o  RFC 2047( RFC 1522) Ȯ Ű ʽϴ.  ׷ κ(!)
     쿡   ϴ.  (¥) ѱ sendmail RFC 2047
      Ű ʴ´ٰ մϴ.

  9.  , , å

  `` ڵ''  ڵ   ڵ鿡 ۱ ֽϴ.
    ڵ  <mailto:jhpark@entropy.kaist.ac.kr> ϴ.

  Ʒ  α׷  Ǹ å ϴ.  Ʒ `
  α׷'̶  , ¥ ѱ sendmail   κи
  մϴ.

  1. 

      α׷,  Ӱ ϰ Ͻ  ֽϴ.

  2. 

      α׷ /ϴ  ƹ  ϴ.

  3. 

      α׷   ° ϴ Ϳ  ϴ.
      α׷    ٰ Ͻø 
     patch ChangeLog entry  ֽø ڽϴ.

      α׷  ϼŵ ϴٸ ׷   ݵ:

     a. ڸ  ֽð,  ؼ  κ 
        Ǿ, README  ȳ ؽƮ ϰ ҽ,
        Ͻñ ٶϴ.

     b. α׷ ̸ `¥ ѱ sendmail' kesmpre ٸ 
        ٲٽõ,  ̸  ֽñ ٶϴ.

  4. ع å

      α׷ ڴ,

  o   α׷ ϴٰ ߻  ( ,  
     ٵ,    ٵ)

  o   α׷   ø ٰ ߻ 

  o  Ÿ  α׷ õ   ߻  (Ȼ
      ܼ ũŷ ߴٵ, ǻͰ 峪
     عȴٵ,   ´µ  ¾Ҵٵ)

       ~ å  ϴ.  Ҿϸ  ñ
     ٶϴ.
  10.   ڷ

  o  E-mail ѱ ޽ ȯϴ   Ϲ 
     <http://pantheon.cis.yale.edu/~jshin/faq/qa9.html>  
     ֽϴ.

  o  ѱ Ͽ    α׷
     <ftp://ftp.kaist.ac.kr/hangul/mail>   ֽϴ.

  o   о  ʾҽϴٸ, ѱ E-mail encodingϴ  
     RFC1557 <ftp://ftp.kornet.nm.kr/pub/rfc/rfc1557.txt>  ִٰ
     մϴ.

