참고서적 : 이것이 리눅스다-우재남
리눅스 서버관리 바이블-정철
호스트네임 변경
# vim /etc/hostname
mail.myhomepage.com
:wq
# vim /etc/hosts
192.168.111.100 mail.myhomepage.com
:wq
# vim /etc/sysconfig/network
HOSTNAME=mail.myhomepage.com
# yum -y install sendmail
# vim /etc/mail/local-host-names
mail.myhomepage.com
:wq
# reboot
# yum -y install bind bind-chroot
# vi /etc/named.conf
13번째 ( => 변경)
listen-on port 53{ 127.0.0.1; }; => listen-on port 53{ any; };
listen-on-v6 port 53 { ::1;} ; => listen-on-v6 port 53 { none;} ;
allow-query { localhost; } ; => allow-auery { any; } ;
\
54번째
zone "." IN {
type hint;
file "named.ca";
};
변경
zone "myhomepage.com" IN {
type master;
file "myhomepage.ca";
allow-update {none;};
};
:wq
# named-checkconf
# cd /var/named/
# ll
# vim myhoepage.zone
$TTL 10H
@ SOA @ root. (20230913 1D 1H 1W 1H)
IN NS @
IN A 192.168.0.100
IN MX 10 mail.myhomepage.com.
mail IN A 192.168.0.100
www IN A 192.168.0.100
:wq
# name-checkzone myhomepage.com myhomepage.zone
# systemctl restart named
# systemctl enable named
# systemctl stop firewalld
# systemctl disable firewalld
# setenforce 0
#nslookup
> server mail.myhomeage.com
> vim /etc/sysconfig/networt-scripts/ipcfg-ens32
#나 자신으로 변경
DNS1 = 192.168.111.100
# systemctl restat network
# nslookup
> server mail.myhomepage.com
메일서버 설치
# yum -y install sendmail sendmail-cf dovecot
# vin /etc/mail/sendmail.cf
85번째
Cwlocalhost => Cwmyhomepage.com
264번째
DaemonPort0ptions=Port=smtp,Addr=127.0.0.1, Name=MTA => DaemonPort0ptions=Port=smtp, Name=MTA
:wq
systemctl restart sendmail
# vim /etc/mail/access
#추가
myhomepage.com RELAY
192.168.111 RELAY
:wq
# makemap hash /etc/mail/access < /etc/mail/access
# vim /etc/dovecot/dovecot.conf
24행
#protocols = imap pop3 lmtp => protocols = imap pop3 lmtp
30행
#listen = *, :: => listen = *, ::
33행
#base_dir /var/run/dovecot/ => base_dir /var/run/dovecot/
:wq
# vim /etc/dovecot/conf.d/10-ssl.conf
8행
ssl = required => ssl=yes
:wq
#vim /etc/dovecot/conf.d/10-mail.conf
25번째
# mail_location = mbox: ~mail:INBOX=/var/mail/% => 주석 제거 mail_location = mbox: ~mail:INBOX=/var/mail/%
121번째
# mail_access_griups = => mail_access_griups = mail
166번째
# locak_method = fcntl => locak_method = fcntl
:wq
# vim /etc/dovecot/conf.d/10-auth.conf
10번
disable_plaintext_auth yes => disable_plaintext_auth = no
:wq
# useradd 아이디
# passwd 아이디
# systemctl restart sendmail
# systemctl enable sendmail
# systemctl restart dovecot
# systemctl enable dovecot
메일 웹 페이지 설치
# yum -y install thunderbird