차근차근/Linux
리눅스 메일서버 확인
검색어 : 리눅스 메일서버 확인
리눅스메일서버가 정상인지 확인을 해야하는데...
우선 퍼티 실행 시켜서
rpm -qa |grep sendmail
(|grep에서 '|'는 " shift + \ ")
이라고 치면 mail이 설치되어있는지 알 수 있다.
http://cafe24blog.tistory.com/m/post/1978
[L] CentOS 5.x 에서 sendmail 설치하기
CentOS 5.x에서 sendmail 설치하기
#설치환경
1. sendmail, dovecot 설치
- 먼저 rpm -qa |grep sendmail 명령으로 sendmail이 설치되어 있는지 확인 후 sendmail 패키지가 없으면 설치합니다
- Pop3를 사용할려면 imap 팩키지가 설치되어 있어야 합니다(dovecot). dovecot은 기존 imap에 비해 보안이 향상되었습니다.
[root@localhost /root]# rpm -qa | grep sendmail [root@localhost /root]# [root@localhost /root]# [root@localhost /root]# yum install sendmail-* Loaded plugins: fastestmirror Determining fastest mirrors * base: ftp.daum.net * extras: ftp.daum.net * updates: ftp.daum.net base | 1.1 kB 00:00 extras | 2.1 kB 00:00 r1soft | 951 B 00:00 updates | 1.9 kB 00:00 updates/primary_db | 1.0 MB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package sendmail.x86_64 0:8.13.8-8.1.el5_7 set to be updated ---> Package sendmail-cf.x86_64 0:8.13.8-8.1.el5_7 set to be updated ---> Package sendmail-devel.i386 0:8.13.8-8.1.el5_7 set to be updated ---> Package sendmail-devel.x86_64 0:8.13.8-8.1.el5_7 set to be updated ---> Package sendmail-doc.x86_64 0:8.13.8-8.1.el5_7 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Installing: sendmail x86_64 8.13.8-8.1.el5_7 base 637 k sendmail-cf x86_64 8.13.8-8.1.el5_7 base 306 k sendmail-devel i386 8.13.8-8.1.el5_7 base 128 k sendmail-devel x86_64 8.13.8-8.1.el5_7 base 133 k sendmail-doc x86_64 8.13.8-8.1.el5_7 base 665 k Transaction Summary ============================================================================= Install 5 Package(s) Upgrade 0 Package(s) Total download size: 1.8 M Is this ok [y/N]: y Downloading Packages: (1/5): sendmail-devel-8.13.8-8.1.el5_7.i386.rpm | 128 kB 00:00 (2/5): sendmail-devel-8.13.8-8.1.el5_7.x86_64.rpm | 133 kB 00:00 (3/5): sendmail-cf-8.13.8-8.1.el5_7.x86_64.rpm | 306 kB 00:00 (4/5): sendmail-8.13.8-8.1.el5_7.x86_64.rpm | 637 kB 00:00 (5/5): sendmail-doc-8.13.8-8.1.el5_7.x86_64.rpm | 665 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------ Total 2.2 MB/s | 1.8 MB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : sendmail 1/5 Installing : sendmail-devel 2/5 Installing : sendmail-cf 3/5 Installing : sendmail-doc 4/5 Installing : sendmail-devel 5/5 Installed: sendmail.x86_64 0:8.13.8-8.1.el5_7 sendmail-cf.x86_64 0:8.13.8-8.1.el5_7 sendmail-devel.i386 0:8.13.8-8.1.el5_7 sendmail-devel.x86_64 0:8.13.8-8.1.el5_7 sendmail-doc.x86_64 0:8.13.8-8.1.el5_7 Complete! [root@localhost /root]# |
[root@localhost /root]# rpm -qa | grep dovecot [root@localhost /root]# [root@localhost /root]# yum install dovecot Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: ftp.daum.net * extras: ftp.daum.net * updates: ftp.daum.net Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package dovecot.x86_64 0:1.0.7-7.el5_7.1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================== Package Arch Version Repository Size ======================================================================== Installing: dovecot x86_64 1.0.7-7.el5_7.1 base 1.7 M Transaction Summary ======================================================================== Install 1 Package(s) Upgrade 0 Package(s) Total download size: 1.7 M Is this ok [y/N]: y Downloading Packages: dovecot-1.0.7-7.el5_7.1.x86_64.rpm | 1.7 MB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : dovecot 1/1 Installed: dovecot.x86_64 0:1.0.7-7.el5_7.1 Complete! [root@localhost /root]# |
2. dovecot 설정
- /etc/dovecot.conf 파일을 다음과 같이 수정합니다.
# Base directory where to store runtime data. #base_dir = /var/run/dovecot/ # Protocols we want to be serving: imap imaps pop3 pop3s # If you only want to use dovecot-auth, you can set this to "none". protocols = imap imaps pop3 pop3s --> 주석제거 # IP or host address where to listen in for connections. It's not currently # possible to specify multiple addresses. "*" listens in all IPv4 interfaces. # "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4 # interfaces depending on the operating system. # # If you want to specify ports for each service, you will need to configure # these settings inside the protocol imap/pop3 { ... } section, so you can # specify different ports for IMAP/POP3. For example: # protocol imap { # listen = *:10143 # ssl_listen = *:10943 # .. # } # protocol pop3 { # listen = *:10100 # .. # } listen = [::] ---> 주석제거 # Disable LOGIN command and all other plaintext authentications unless # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP # matches the local IP (ie. you're connecting from the same computer), the # connection is considered secure and plaintext authentication is allowed. #disable_plaintext_auth = no |
- 저장 후 dovecot 데몬을 실행합니다. 실행 후 포트를 체크합니다.
[root@localhost /root]# /etc/rc.d/init.d/dovecot start Dovecot Imap (을)를 시작 중: [ OK ] [root@localhost /root]# netstat -nlpt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 364/dovecot tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 7377/httpd tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1766/vsftpd tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1730/sshd [root@localhost /root]# |
3. Sendmail 설정
- /etc/mail/sendmail.mc 파일을 아래와 같이 수정합니다. 약 52라인과 116번째 라인에 있습니다.
dnl # PLAIN is the preferred plaintext authentication method and used by . . . . dnl # The following causes sendmail to only listen on the IPv4 loopback address |
4. /etc/mail/local-host-names에 메일에서 사용될 도메인을 추가합니다
# local-host-names - include all aliases for your machine here. test.com |
5. /etc/mail/virtusertable 파일에 메일 주소와 연결할 계정을 추가합니다.
test@test.com kky |
6. makemap hash 적용
[root@localhost /root]# makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable |
7. sendmail을 시작합니다.
[root@localhost /etc/mail]# /etc/rc.d/init.d/sendmail start [root@localhost /etc/mail]# |
http://rockdrumy.tistory.com/200
'차근차근 > Linux' 카테고리의 다른 글
centOS 메일서버 작동안함 (0) | 2016.03.03 |
---|---|
[리눅스] 디렉토리 내부에 있는 파일들의 목록을 출력하는 프로그램 (0) | 2014.12.01 |
linux tomcat log 한글 깨짐현상 (0) | 2014.09.18 |
리눅스 /etc/hosts.conf (0) | 2014.09.18 |
톰캣 tomcat 재실행 재시작 (0) | 2014.09.17 |
'차근차근/Linux'의 다른글
- 현재글리눅스 메일서버 확인