ÀÌ Ç׸ñ¿¡¼´Â º¸Åë»ç¿ëÀÚ°¡ Å¥¸ÞÀÏÀ» »ç¿ëÇÏ´Â ¹ýÀ» ´Ù·ì´Ï´Ù. Å¥¸ÞÀϽýºÅÛ¿¡¼ ¸áÀ» Àаųª º¸³½´Ù¸é, ¿©±â¿¡¼ ¾î¶»°Ô Å¥¸ÞÀÏÀ» ÀÌ¿ëÇÏ´Â Áö¸¦ ¾Ë°Ô µÉ°Ì´Ï´Ù.
»ç¿ëÀÚ¸áÀÇ Àü´ÞÀº ´ë°³ .qmailÆÄÀÏÀÌ ÅëÁ¦Çϴµ¥, À̰͵éÀº »ç¿ëÀÚ È¨µð·ºÅ丮¿¡ .qmail·Î ½ÃÀÛÇÏ´Â À̸§À¸·Î µÇ¾îÀÖ½À´Ï´Ù. dot-qmail¸ÇÆäÁö¿¡ .qmailÆÄÀÏ »ç¿ë¹ýÀ» ¼³¸íÇØ ³õ¾Ò½À´Ï´Ù.
.qmailÆÄÀÏ¿¡´Â Àü´ÞÁö½Ã»çÇ×ÀÌ ÇÑ ÁÙ¿¡ Çϳª¾¿ µé¾îÀÖ½À´Ï´Ù. ÁÙÀÇ Ã³À½¹®ÀÚ´Â Àü´Þ¹æ¹ýÀ» °áÁ¤ÇÕ´Ï´Ù.
¹®ÀÚ Àü´ÞÇüÅ °ª # ¾ø½¿ (ÄÚ¸àÆ®) ¹«½Ã | ÇÁ·Î±×·¥ ¼ÐÀÌ ½ÇÇàÇÒ ¸í·É¾î / ¶Ç´Â . mbox (¸¶Áö¸·±ÛÀÚ°¡ mbox °æ·Î (/³ª .¸¦ Æ÷ÇÔ) /ÀÌ ¾Æ´Ï¸é) / ¶Ç´Â . maildir (¸¶Áö¸· mbox °æ·Î (/³ª .¸¦ Æ÷ÇÔ) ±ÛÀÚ°¡ /À̸é) & Æ÷¿öµå ¸Þ¼¼Áö¸¦ Æ÷¿öµåÇÒ ÁÖ¼Ò ±ÛÀÚ ¶Ç´Â ¼ýÀÚ Æ÷¿öµå ¸Þ¼¼Áö¸¦ Æ÷¿öµåÇÒ ÁÖ¼Ò (ù±ÛÀÚ¸¦ Æ÷ÇÔ)
ÇÁ·Î±×·¥Àü´ÞÁö½Ã¸¦ ¸¸³ª¸é Å¥¸ÞÀÏÀº ¼Ð(/bin/sh)À» °¡µ¿Çؼ ¸í·ÉÀ» ½ÇÇàÇϴµ¥, µé¾î¿À´Â ¸Þ¼¼Áö¸¦ º¹»çÇؼ ¸í·É¿¡ Ç¥ÁØÀÔ·ÂÀ¸·Î ³Ö½À´Ï´Ù. qmail-command¸ÇÆäÁö¿¡ ÀÌ ÀýÂ÷¸¦ ÀÚ¼¼È÷ ¼³¸íÇØ ³õ¾Ò½À´Ï´Ù.
ÇÁ·Î±×·¥Àü´ÞÀº ¸Å¿ì °·ÂÇÏ°í ¸Å¿ì ³ÐÀº ±â´ÉÀ» ±¸ÇöÇÒ ¼ö Àִµ¥, ¸Þ¼¼ÁöÇÊÅ͸µ, ¸Þ¼¼Áö¿¡ ÀÚµ¿À¸·Î ´äÇϱâ, procmail µî Á¦3ÀÚ Àü´ÞÀÚ¸¦ ÅëÇØ Àü´ÞÇÏ´Â °ÍµîÀÔ´Ï´Ù.
¿¹) |preline /usr/ucb/vacation djb
ÀÌ·¸°Ô Çϸé Å¥¸ÞÀÏÀº prelineÀ» °¡µ¿Çؼ /usr/ucb/vacation°ú djb¸¦ Àμö·Î ÁÖ°í, ¸Þ¼¼Áöº¹»çº»À» Ç¥ÁØÀÔ·ÂÀ¸·Î Á¦°øÇÕ´Ï´Ù.
Mbox´Â Å¥¸ÞÀÏ ¿ë¾î·Î¼ Ç¥ÁØ À¯´Ð½º ¸áº¹½º ÇüÅÂÀε¥, ´ÙÁ߸޼¼Áö¸¦ ´ÜÀÏÆÄÀÏ¿¡ ÀúÀåÇÏ°í, ¸Þ¼¼Áö¿¡´Â "From "ÁÙÀÌ ¸Ó¸®¿¡ ÀÖ½À´Ï´Ù. ÀÌ ÁÙÀº Çì´õÇʵ尰ÀÌ º¸ÀÌÁö¸¸ ¾Æ´Õ´Ï´Ù. ÀÌ°ÍÀº ´Ù¸¸ Àü´ÞÀÚ°¡ ÷°¡Çؼ ¸áÀ» Àд »ç¶÷ÀÌ ÇØ´ç¸Þ¼¼Áö°¡ ½ÃÀÛÇÏ´Â °÷À» ¾Ë°ÔÇÏ´Â °Í»ÓÀÔ´Ï´Ù.
¿¹: ./Mailbox
ÀÌ·¸°Ô Çϸé "From "ÁÙÀ» ¾Õ¿¡ ºÙ¿©¼ $HOME/Mailbox¿¡ Ãß°¡ÇÕ´Ï´Ù. ´ÜÀÏ ¸Þ¼¼Áö¸¦ º¸À¯ÇÑ °£´ÜÇÑ mbox¸áº¹½º´Â ´ÙÀ½°ú °°½À´Ï´Ù.
From user1@example.net Thu May 13 18:34:50 1999 Received: (qmail 1287205 invoked from network); 13 May 1999 18:34:49 -0000 From: user1@example.net To: user2@example.com Subject: hey What's up?
ùÁÙÀº Å¥¸ÞÀÏÀÌ Àü´ÞÇÏ¸é¼ Ã·°¡ÇÑ °ÍÀÔ´Ï´Ù.
"Maildir"´Â Dan BernsteinÀÌ ¸¸µç ¸áº¹½ºÇüÅ·μ mboxÇüÅÂÀÇ °áÁ¡À» ¸»ÇØÁÝ´Ï´Ù. maildir¸áº¹½º¿¡´Â µð·ºÅ丮·Î¼ ¼·µð·ºÅ丮°¡ ¼¼°³ Àִµ¥, new, cur, tmp µîÀÔ´Ï´Ù. maildir¸áº¹½º¿¡ ÀÖ´Â °¢ ¸Þ¼¼Áö´Â »óÅ¿¡ µû¶ó ºÎµð·ºÅ丮Áß Çϳª¿¡ º°°³ÆÄÀÏ·Î µÇ¾îÀִµ¥, new´Â ÀÐÁö ¾ÊÀº ¸Þ¼¼Áö°¡, cur´Â ÀÐÀº ¸Þ¼¼Áö°¡, tmp´Â Àü´ÞÁßÀÎ ¸Þ¼¼Áö°¡ µé¾î ÀÖ½À´Ï´Ù. maildir¸ÇÆäÁö¿¡ maildirÇü½Ä¿¡ ´ëÇØ ÀÚ¼¼È÷ ¼³¸íÇÏ¿´½À´Ï´Ù.
maildirÀÇ ÀÌÁ¡Áß Çϳª´Â ´Ù¸¥ Àü´ÞÀÚ°¡ µ¿½Ã¿¡ ¾÷µ¥ÀÌÆ®ÇÏ´Â °ÍÀ» ¸·±âÀ§ÇØ ÇÏ´Â ·ÏÅ·À» »ç¿ëÇÏÁö ¾Ê¾Æµµ È®½ÇÇÏ´Ù´Â °Ì´Ï´Ù. ÀÌ°ÍÀº maildir¸áº¹½º´Â NFS¸¦ ¸¶¿îÆ®ÇÑ ÆÄÀϽýºÅÛ¿¡ ¾ÈÀüÇÏ°Ô »ç¿ëÇÒ ¼ö ÀÖ´Ù´Â °ÍÀ» ¶æÇÕ´Ï´Ù.
¿¹: ./Maildir/
ÀÌ°ÍÀº ¸Þ¼¼Áö¸¦ maildirÇüÅÂÀÇ ¸áº¹½ºÀÎ $HOME/Maildir¿¡ ÀúÀåÇÕ´Ï´Ù.
------------------------------------------------------------------------------ À¯ÀÇÁ¡: maildir¸áº¹½º´Â Å¥¸ÞÀÏ°ú °°ÀÌ Á¦°øÇÏ´Â maildirmakeÇÁ·Î±×·¥À¸·Î ¸¸µì´Ï´Ù. ¿¹) maildirmake ~/Maildir ------------------------------------------------------------------------------
Æ÷¿öµåÀü´ÞÀº ¸í½ÃÁÖ¼Ò·Î ¸Þ¼¼Áö¸¦ ´Ù½Ãº¸³À´Ï´Ù. .qmailÆÄÀÏ¿¡ ¸í½ÃÇÑ ÁÖ¼Ò´Â ¿ÏÀüÀÚ°ÝÀ̾î¾ß Çϸç, Ä¿¸àÆ®Çʵå¿Í ¿©¹éÀÌ ¾ø¾î¾ß ÇÕ´Ï´Ù.
´ÙÀ½Àº Ʋ·È½À´Ï´Ù.
&<user@example.com> & user@example.com &Joe User <user@example.com> &user
´ÙÀ½°ú °°ÀÌ ÇؾßÇÕ´Ï´Ù.
&user@example.com user@example.com
±×·¯¸é ¸Þ¼¼Áö»çº»À» user@example.com·Î º¸³À´Ï´Ù.
Å¥¸ÞÀÏ¿¡¼´Â »ç¿ëÀÚÅëÁ¦ ¿¬ÀåÁÖ¼Ò¸¦ Áö¿øÇÕ´Ï´Ù. ±âº»ÁÖ¼ÒÀÎ username@hostname.domain¿Ü¿¡ »ç¿ëÀÚ´Â username-extension@hostname.domainÀ¸·Î ¸áÀ» ¹ÞÀ» ¼ö ÀÖ½À´Ï´Ù. ¿ì¸®´Â Áö±Ý ·ÎÄýýºÅÛ¿¡¼ ÀϾ´Â ÇൿÀ» °í·ÁÇÏ°í ÀÖÀ¸¹Ç·Î, ¾ÕÀ¸·Î À̹ø Ç׸ñ¿¡¼´Â "@hostname.domain"ºÎºÐÀº ÀûÁö ¾Ê±â·Î ÇÕ´Ï´Ù.
username-extension¿¡ ´ëÇÑ Àü´ÞÁö½Ã»çÇ×Àº username/.qmail-extension¿¡ ÀÖ½À´Ï´Ù.
¿¹¸¦ µé¸é, dave-lwq@sparge.example.comÀº spargeÈ£½ºÆ®¿¡ ÀÖ´Â dave/.qmail-lwq°¡ ÅëÁ¦ÇÕ´Ï´Ù.
¿¬ÀåÀº º¹¼öÇʵå·Î µÉ ¼ö ÀÖ½À´Ï´Ù. ¿¹¸¦ µé¸é dave-list-qmailÀε¥, dave/.qmail-list-qmailÀÌ ÅëÁ¦ÇÕ´Ï´Ù. À̹ø ¿¹¿¡¼ dave-list-qmailÀº Å¥¸ÞÀÏ ¸á¸µ¸®½ºÆ®¿¡ °¡ÀÔÇß°í, dave/.qmail-list-qmailÀº ¸®½ºÆ®¸Þ¼¼Áö¸¦ º°µµÀÇ ¸áº¹½º¿¡ ÆÄÀϺ¸°üÇÕ´Ï´Ù.
.qmailÆÄÀϵéÀº -default¸¦ ¿ÍÀϵåÄ«µå·Î ¾¹´Ï´Ù. ±×·¡¼ dave-list-qmailÀº /.qmail-list-default·Îµµ ó¸®ÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌ·¸°Ô ÇÏ¸é ¸ðµç dave-list-whateverÁÖ¼ÒµéÀ» ´Ù·ç´Âµ¥ ÀÖ¾î¼ .qmailÆÄÀÏÀº Çϳª¸¸ À־ Á·ÇÕ´Ï´Ù. ±×·¯³ª dave-list´Â dave/.qmail-list-default°¡ ÅëÁ¦ÇÏÁö ¸øÇϴµ¥, list´ÙÀ½¿¡ "-"ÀÌ ¾ø±â ¶§¹®ÀÓÀ» À¯ÀÇÇϽʽÿÀ.
Å¥¸ÞÀÏÀº ã´Â °ÍÁß¿¡¼ Á¦ÀÏ °¡±î¿î °ÍÀ» ¾¹´Ï´Ù. ¿¹¸¦ µé¾î¼, dave-list-qmailÀÇ ÁÖ¼Ò·Î ¸Þ¼¼Áö°¡ ¿Ô´Ù¸é, ´ÙÀ½°ú °°ÀÌ Ã£Àº °ÍÁß¿¡¼ ù¹ø°°ÍÀ» ¾¹´Ï´Ù.
ÀÏÄ¡ÇÏ´Â .qmailÆÄÀÏÀÌ ¾øÀ¸¸é Àü´ÞÀº ½ÇÆÐÇÏ°í ¸Þ¼¼Áö´Â º¸³½ÀÌ¿¡°Ô µÇµ¹·ÁÁý´Ï´Ù.
¸á»ç¿ëÀÚ´Â ¸Þ¼¼Áö¸¦ º¸³»´Â µ¥ ÀÖ¾î¼ MTA¸¦ º¸Åë Á÷Á¢ »ç¿ëÇÏÁö ¾Ê½À´Ï´Ù. ´ëü·Î Mail User Agent (MUA)ÀÎ pineÀ̳ª mutt µîÀ» ½á¼ ¸Þ¼¼Áö¸¦ ÀÛ¼ºÇÏ°í º¸³»´Âµ¥, MUA´Â MTA¸¦ È£ÃâÇؼ ¸Þ¼¼Áö¸¦ Àü´ÞÇÕ´Ï´Ù. MTA·Î ¸Þ¼¼Áö¸¦ °Ç³×Áִ ó¸®°úÁ¤À» injectionÀ̶ó°í ÇÕ´Ï´Ù.
´ëºÎºÐÀÇ MTA·Î ¸Þ¼¼Áö¸¦ injectÇÏ´Â ¹æ¹ý¿¡´Â µÎ °¡Áö°¡ ÀÖ½À´Ï´Ù. Simple Mail Transfer Protocol (SMTP)°ú ÀÌ ¸ñÀûÀ¸·Î MTA°¡ Á¦°øÇÏ´Â ÇÁ·Î±×·¥À» ÀÌ¿ëÇÏ´Â °ÍÀÔ´Ï´Ù.
MUA´Â ·ÎÄÃÈ£½ºÆ®³ª ÁöÁ¤ÇÑ ¸á¼¹ö¿¡ Àִ ǥÁØ SMTPÆ÷Æ®ÀÎ 25¹ø Æ÷Æ®·Î TCP ¿¬°áÀ» ¿±´Ï´Ù. ±× ´ÙÀ½, MUA¿Í MTA´Â ´ÙÀ½°ú °°ÀÌ ³¡³ª´Â ´ëÈÁß Çϳª¸¦ ÇÕ´Ï´Ù.
SMTP¿¡´Â ÀÎÁõÀåÄ¡°¡ ¾øÀ¸¹Ç·Î ¸Þ¼¼Áö¸¦ º¸³»´Âµ¥ À¯Àú³×ÀÓÀ̳ª Æнº¿öµå°¡ ÇÊ¿ä¾ø½À´Ï´Ù. ±×·¸Áö¸¸ ¸¹Àº MTA´Â ·ÎÄûç¿ëÀÚ°¡ º¸³»°Å³ª ¹Þ´Â °Í°°Áö ¾ÊÀº ¸Þ¼¼Áö¸¦ °ÅÀýÇÕ´Ï´Ù. Á¦´ë·ÎµÈ ¸Þ¼¼Áö°¡ rejectµÇ¸é ¸±·¹ÀÌÁ¦ÇÑÀÌ ±× ¿øÀÎÀÏ °æ¿ì°¡ Á¦ÀÏ ¸¹½À´Ï´Ù. ¸±·¹À̼³Á¤¿¡ ´ëÇÑ Á¤º¸´Â ¸±·¹ÀÌÇ׸ñÀ» º¸½Ê½Ã¿À.
¿À·£ ¼¼¿ùµ¿¾È SendmailÀÌ À¯´Ð½º MTA¿´½À´Ï´Ù. ¾î´À °÷¿¡³ª ±×°ÍÀÌ ÀÖ¾ú±â¿¡ ¸¹Àº ÇÁ·Î±×·¡¸ÓµéÀº ÀÇ·Ê ±×°ÍÀÌ MTA¶ó°í ¿©°å½À´Ï´Ù. ±× °á°ú, SendmailÀÇ ·ÎÄà ÀÎÁ§¼Ç ÀåÄ¡°¡ ·ÎÄøáÀÎÁ§¼Ç¿¡ ´ëÇÑ Ç¥ÁØ Application Programmer's Interface (API)°¡ µÇ¾ú½À´Ï´Ù. Å¥¸ÞÀÏ°ú ±âŸ ºñSendmail MTA´Â sendmailÇÁ·Î±×·¥À» °ø±ÞÇؼ ·ÎÄÃÀÎÁ§¼Ç¿¡ ´ëÇؼ ÁøÂ¥ SendmailÀÇ sendmail°¡ ¶È±ùÀÌ ÀÛµ¿Çϵµ·Ï ÇÕ´Ï´Ù.
Å¥¸ÞÀÏÀÇ sendmailÀº º¸Åë /var/qmail/bin/sendmail¿¡ Àִµ¥, ´ë°³ Å¥¸ÞÀϽýºÅÛ¿¡¼ SendmailÀÇ sendmailÀ» ´ëüÇÕ´Ï´Ù. ÈçÈ÷ sendmailÇÁ·Î±×·¥Àº ´ÙÀ½¿¡ ÀÖ½À´Ï´Ù.
Å¥¸ÞÀϽýºÅÛ¿¡¼ "ls -l path-to-sendmail"Çϸé sendmailÀÌ /var/qmail/bin/sendmail·Î ½Éº¼¸¯¸µÅ©µÇ¾îÀÖ½¿À» º¸¿©ÁÝ´Ï´Ù.
$ ls -l /usr/lib/sendmail lrwxrwxrwx 1 root root 29 Feb 19 11:04 /usr/lib/sendmail \ -> /var/qmail/bin/sendmail
sendmail API¿Ü¿¡ Å¥¸ÞÀÏ¿¡´Â qmail-inject¶ó´Â ÀÚü ÀÎÁ§¼ÇÇÁ·Î±×·¥ÀÌ ÀÖ½À´Ï´Ù. »ç½Ç sendmailÀº qmail-injectÀÇ wrapperÀÔ´Ï´Ù.
APIÀÌÁö¸¸ sendmailÀº ¸Å¿ì ³Î¸® ¾²À̹ǷΠ´õ ³ªÀº µíÇÕ´Ï´Ù. qmail-inject°¡ Á¦°øÇϴ ť¸ÞÀÏ API´Â Å¥¸ÞÀÏÀ» ¼³Ä¡ÇÑ ½Ã½ºÅÛÀ̼¸¸ ÀÛµ¿ÇÏÁö¸¸, sendmail ÀÎÅÍÆ佺´Â °ÅÀÇ ¾îµð¿¡³ª ÀÖ½À´Ï´Ù.
¿¹¸¦ µé¸é, joe@example.com¿¡°Ô ºó ¸Þ¼¼Áö¸¦ º¸³»·Á¸é ´ÙÀ½°ú °°ÀÌ ÇÕ´Ï´Ù. echo To: joe@example.com | /var/qmail/bin/qmail-inject
Å¥¸ÞÀÏÇÁ·Î±×·¥ÀÌ È¯°æº¯¼ö¸¦ Á¤Çϰųª »ç¿ëÇϱ⵵ ÇÕ´Ï´Ù. ´ÙÀ½ÀÇ Å×ÀÌºí¿¡ º¯¼ö¸¦ ¿°ÅÇÏ°í »ç¿ë¹ýÀ» Àû¾ú½À´Ï´Ù.
º¯¼ö¸í ÇØ´ç ¸ÇÆäÁö ¼³Á¤ »ç¿ë¸ñÀû DATABYTES qmail-smtpd used Overrides control/databytes Portion of address matching DEFAULT qmail-command set "-default" in a .qmail file name. DTLINE qmail-command set Delivered-To header field EXT qmail-command set The address extension EXT2 qmail-command set Portion of EXT following first dash EXT3 qmail-command set Portion of EXT following second dash EXT4 qmail-command set Portion of EXT following third dash HOME qmail-command set The user's home directory HOST qmail-command set The domain part of the recipient address HOST2 qmail-command set Portion of HOST preceding last dot. HOST3 qmail-command set Portion of HOST preceding second-to-last dot HOST4 qmail-command set Portion of HOST preceding third-to-last dot LOCAL qmail-command set The local part of the recipient address LOGNAME qmail-inject used User name in From header field (4) MAILHOST qmail-inject used Host name in From header field (2) MAILNAME qmail-inject used Personal name in From header field (2) MAILUSER qmail-inject used User name in From header field (2) NAME qmail-inject used Personal name in From header field (3) NEWSENDER qmail-command set Forwarding sender address (see "man dot-qmail") QMAILDEFAULTDOMAIN qmail-inject used Overrides control/defaultdomain QMAILDEFAULTHOST qmail-inject used Overrides control/defaulthost QMAILHOST qmail-inject used Host name in From header field (1) QMAILIDHOST qmail-inject used Overrides control/idhost QMAILINJECT qmail-inject used Specify various options (see next table) File containing list of mailing QMAILMFTFILE qmail-inject used list addresses for Mail-Followup-To generation QMAILNAME qmail-inject used Personal name in From header field (1) QMAILPLUSDOMAIN qmail-inject used Overrides control/plusdomain QMAILSHOST qmail-inject used Host name in envelope sender address QMAILSUSER qmail-inject used User name in envelope sender address QMAILUSER qmail-inject used User name in From header field (1) RECIPIENT qmail-command set Envelope recipient address Ignore control/rcpthosts and RELAYCLIENT qmail-smtpd used append value to recipient address RPLINE qmail-command set Return-Path header field SENDER qmail-command set Envelope sender address UFLINE qmail-command set UUCP-style "From " line USER qmail-command set The current user USER qmail-inject used User name in From header field (3) QMAILINJECT Flags Letter Purpose c Use address-comment style for the From field s Do not look at any incoming Return-Path field f Delete any incoming From field i Delete any incoming Message-ID field r Use a per-recipient VERP m Use a per-message VERP