우분투 mailutils 설치

  다른 뜻에 대해서는 CentOS mailx 설치 문서를 참조하십시오.

1 개요[ | ]

우분투 mailutils 설치
메일 클라이언트와 서버가 함께 설치되는 것

2 확인[ | ]

root@zetawiki:~# mail -V
The program 'mail' is currently not installed. You can install it by typing:
apt-get install mailutils

3 설치[ | ]

root@zetawiki:~# apt-get install mailutils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  guile-2.0-libs libgsasl7 libkyotocabinet16 libltdl7 liblzo2-2 libmailutils4
  libmysqlclient18 libntlm0 libunistring0 mailutils-common mysql-common
  postfix
Suggested packages:
  mailutils-mh mailutils-doc procmail postfix-mysql postfix-pgsql postfix-ldap
  postfix-pcre sasl2-bin dovecot-common postfix-cdb mail-reader postfix-doc
The following NEW packages will be installed:
  guile-2.0-libs libgsasl7 libkyotocabinet16 libltdl7 liblzo2-2 libmailutils4
  libmysqlclient18 libntlm0 libunistring0 mailutils mailutils-common
  mysql-common postfix
0 upgraded, 13 newly installed, 0 to remove and 71 not upgraded.
Need to get 5,460 kB of archives.
After this operation, 26.9 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main liblzo2-2 amd64 2.06-1.2ubuntu1.1 [46.1 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ trusty/universe libkyotocabinet16 amd64 1.2.76-4 [288 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ trusty/main libltdl7 amd64 2.4.2-1.7ubuntu1 [35.0 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main mysql-common all 5.5.49-0ubuntu0.14.04.1 [12.9 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libmysqlclient18 amd64 5.5.49-0ubuntu0.14.04.1 [596 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ trusty/universe libntlm0 amd64 1.4-1 [15.3 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ trusty/main libunistring0 amd64 0.9.3-5ubuntu3 [271 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty/main guile-2.0-libs amd64 2.0.9+1-1ubuntu1 [2,127 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ trusty/universe libgsasl7 amd64 1.8.0-2ubuntu2 [117 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ trusty/universe mailutils-common all 1:2.99.98-1.1 [245 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu/ trusty/universe libmailutils4 amd64 1:2.99.98-1.1 [398 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main postfix amd64 2.11.0-1ubuntu1 [1,084 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu/ trusty/universe mailutils amd64 1:2.99.98-1.1 [225 kB]
Fetched 5,460 kB in 4s (1,146 kB/s)
Preconfiguring packages ...
┌--------------------------┤ Postfix Configuration ├--------------------------┐          
│ Please select the mail server configuration type that best meets your needs.  │          
│                                                                               │          
│  No configuration:                                                            │          
│   Should be chosen to leave the current configuration unchanged.              │          
│  Internet site:                                                               │          
│   Mail is sent and received directly using SMTP.                              │          
│  Internet with smarthost:                                                     │          
│   Mail is received directly using SMTP or by running a utility such           │          
│   as fetchmail. Outgoing mail is sent using a smarthost.                      │          
│  Satellite system:                                                            │          
│   All mail is sent to another machine, called a 'smarthost', for delivery.    │          
│  Local only:                                                                  │          
│   The only delivered mail is the mail for local users. There is no network.   │          
│                                                                               │          
│ General type of mail configuration:                                           │          
│                                                                               │          
│                            No configuration                                   │          
│                            Internet Site                                      │          
│                            Internet with smarthost                            │          
│                            Satellite system                                   │          
│                            Local only                                         │          
│                                                                               │          
│                                                                               │          
│                     <Ok>                         <Cancel>                     │          
│                                                                               │          
└-------------------------------------------------------------------------------┘
→ (기본값) Internet Site Enter
┌---------------------------------┤ Postfix Configuration ├----------------------------------┐   
│ The "mail name" is the domain name used to "qualify" _ALL_ mail addresses without a domain   │   
│ name. This includes mail to and from <root>: please do not make your machine send out mail   │   
│ from root@example.org unless root@example.org has told you to.                               │   
│                                                                                              │   
│ This name will also be used by other programs. It should be the single, fully qualified      │   
│ domain name (FQDN).                                                                          │   
│                                                                                              │   
│ Thus, if a mail address on the local host is foo@example.org, the correct value for this     │   
│ option would be example.org.                                                                 │   
│                                                                                              │   
│ System mail name:                                                                            │   
│                                                                                              │   
│ example.com_________________________________________________________________________________ │   
│                                                                                              │   
│                          <Ok>                              <Cancel>                          │   
│                                                                                              │   
└----------------------------------------------------------------------------------------------┘
Selecting previously unselected package liblzo2-2:amd64.
(Reading database ... 61451 files and directories currently installed.)
Preparing to unpack .../liblzo2-2_2.06-1.2ubuntu1.1_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.06-1.2ubuntu1.1) ...
... (생략)
After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
 * Stopping Postfix Mail Transport Agent postfix                     [ OK ] 
 * Starting Postfix Mail Transport Agent postfix                     [ OK ] 
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up mailutils (1:2.99.98-1.1) ...
update-alternatives: using /usr/bin/frm.mailutils to provide /usr/bin/frm (frm) in auto mode
update-alternatives: using /usr/bin/from.mailutils to provide /usr/bin/from (from) in auto mode
update-alternatives: using /usr/bin/messages.mailutils to provide /usr/bin/messages (messages) in auto mode
update-alternatives: using /usr/bin/movemail.mailutils to provide /usr/bin/movemail (movemail) in auto mode
update-alternatives: using /usr/bin/readmsg.mailutils to provide /usr/bin/readmsg (readmsg) in auto mode
update-alternatives: using /usr/bin/dotlock.mailutils to provide /usr/bin/dotlock (dotlock) in auto mode
update-alternatives: using /usr/bin/mail.mailutils to provide /usr/bin/mailx (mailx) in auto mode
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...

4 확인 2[ | ]

root@zetawiki:~# mail -V
mail (GNU Mailutils) 2.99.98
Copyright (C) 2010 Free Software Foundation, inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@zetawiki:~# ps -ef | grep postfix | grep -v grep
root       383     1  0 13:19 ?        00:00:00 /usr/lib/postfix/master
postfix    385   383  0 13:19 ?        00:00:00 pickup -l -t unix -u -c
postfix    386   383  0 13:19 ?        00:00:00 qmgr -l -t unix -u
root@zetawiki:~# netstat -tnlp | grep master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      383/master      
tcp6       0      0 :::25                   :::*                    LISTEN      383/master

5 (Optional) 메일 발송 테스트[ | ]

root@zetawiki:~# echo "Hello, this is $(hostname). --- $(date)" | mail -s "Mail Test $(date)" example@gmail.com
root@zetawiki:~# echo "안녕하세요? $(hostname)입니다. --- $(date)" | mail -s "메일 테스트 $(date)" example@gmail.com
→ Gmail에서 확인해보니 메일이 잘 도착했다... 스팸함으로 ㅠ
→ 발신자는 root <root@zetawiki.com>
→ 한글(UTF-8)은 이상없이 전달되었다.

6 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}