๐ป Linux
20220425
- -
๋ฐ์ํ
<aside> ๐ก - ๋ฉ์ผ ํด๋ผ์ด์ธํธ ( MUA ) : Mail User Agent
- ๋ฉ์ผ ํ ( ์ ์ ์ ์ถ ) FIFO : ๋ฉ์ผ์ด ๋๊ธฐํ๋ ๋๊ธฐ์ : ๋ฉ์ผ ์ ์กํ๋ ์ชฝ์๋ง ์กด์ฌ
- ์๋๋ฉ์ผ ( MTA ) : Mail Transfer Agent
- dovecot ( MRA ) : Mail Retrieval Agent
- SMTP : 25๋ฒ ํฌํธ ์ฌ์ฉ
</aside>
# ๋ฉ์ผ ์๋ฒ ๊ตฌ์ถ
# First DNS Second-Client / Second / Third First-Client
##### Centos7_First
[root@localhost ~]
yum -y install sendmail # ๋ฉ์ผ ์๋ฒ ์ค์น
vim /etc/hostname
> mail.chaen.com
vim /etc/sysconfig/network
> HOSTNAME=mail.chaen.com
vim /etc/hosts
> 192.168.111.100 mail.chaen.com
vim /etc/mail/local-host-names
> mail.chaen.com
------ ์ ์ฉํ๊ธฐ ์ํด REBOOT ํ๊ธฐ
[root@mail ~] ๋ก ๋ณ๊ฒฝ๋๊ฑฐ ํ์ธํ๊ธฐ
##### Centos7_Second
[root@localhost ~]
yum -y install sendmail # ๋ฉ์ผ ์๋ฒ ์ค์น
vim /etc/hostname
> mail.john.com
vim /etc/sysconfig/network
> HOSTNAME=mail.john.com
vim /etc/hosts
> 192.168.111.100 mail.john.com
vim /etc/mail/local-host-names
> mail.john.com
------ ์ ์ฉํ๊ธฐ ์ํด REBOOT ํ๊ธฐ
[root@mail ~] ๋ก ๋ณ๊ฒฝ๋๊ฑฐ ํ์ธํ๊ธฐ
##### CentOs7_First
[root@mail ~] yum -y install bind bind-chroot
vim /etc/named.conf
> 13 listen-on port 53 { any; };
14 listen-on-v6 port 53 { none; };
21 allow-query { any; };
zone "chaen.com" IN {
type master;
file "chaen.zone";
allow-update{none;};
};
zone "john.com" IN {
type master;
file "john.zone";
allow-update{none;};
};
[root@mail ~] named-checkconf
[root@mail ~] cd /var/named
vim chaen.zone
$TTL 3H
@ SOA @ root. (220425 1D 1H 1W 1H)
IN NS @
IN A 192.168.111.100
IN MX 10 mail.chaen.com. # mail exchaenge 10(10์ด ์ ์ผ ์ฐ์ ์์)
www IN A 192.168.111.100
mail IN A 192.168.111.100
~
cp chaen.zone john.zone
vim john.zone
$TTL 3H
@ SOA @ root. (220425 1D 1H 1W 1H)
IN NS @
IN A 192.168.111.100
IN MX 10 mail.john.com.
mail IN A 192.168.111.200
named-checkzone chaen.com chaen.zone
named-checkzone john.com john.zone
systemctl stop firewalld
systemctl disable firewalld
systemctl restart named
systemctl enable named
[root@mail named]# vim /etc/resolv.conf
> search chaen.com
nameserver 192.168.111.100
vim /etc/sysconfig/network-scripts/ifcfg-ens33 # DNS 100์ค์
systemctl restart network
nslookup
> server mail.john.com 192.168.111.200 > ํ์ธ
# CentOS7_Second
[root@mail named]# vim /etc/resolv.conf
> search chaen.com
nameserver 192.168.111.100
vim /etc/sysconfig/network-scripts/ifcfg-ens33 # DNS 100์ค์
systemctl restart network
~~~~nslookup
> server mail.john.com 192.168.111.200 > ํ์ธ
# CentOS7_First ๋ฉ์ผ์๋ฒ ๊ตฌ์ถ
yum -y install sendmail-cf dovecot
vim /etc/mail/sendmail.cf # ์ค์ ํ์ผ
:set nu / 85
85 Cwchaen.com
264 O DaemonPortOptions=Port=smtp, Name=MTA
systemctl restart sendmail
vim /etc/mail/access # ๋ฉ์ผ ์ก์์ ํ์ฉ ๋ฒ์
chaen.com RELAY
john.com RELAY
192.168.111 RELAY
makemap hash /etc/mail/access < /etc/mail/access # ์ปดํ์ผํ๋ค๊ณ ์๊ฐํ๊ธฐ
vim /etc/dovecot/dovecot.conf # ์ค์ ํ์ผ
24 protocols = imap pop3 lmtp # ์ฃผ์ํด์
30 listen = *, :: # IPv4,6 ๊ตฌ์ ๋ฐ์ง์๊ณ ๋ฐ๊ฒ ๋ค
33 base_dir = /var/run/dovecot/
vim /etc/dovecot/conf.d/10-ssl.conf
8 ssl = yes # ์์ฒญํ ๋๋ง๋ค๊ฐ ์๋ ํญ์ ์ผ์ ธ์๋๋ก ์ค์
vim /etc/dovecot/conf.d/10-mail.conf
25 mail_location = mbox:~/mail:INBOX=/var/mail/%u
121 mail_access_groups = mail
166 lock_method = fcntl
vim /etc/dovecot/conf.d/10-auth.conf
10 disable_plaintext_auth = no # ํ๋ฌธ ๋ค์ด์ค๋๊ฑฐ ๋ง์์ง ์ค์
useradd chaen
passwd chaen
systemctl restart sendmail
systemctl restart dovecot
systemctl enable sendmail
systemctl enable dovecot
# CentOS7_Third
yum -y install thunderbird
ํ๋ก๊ทธ๋จ - ์ธํฐ๋ท - thunderbird
configure manual
# incoming
pop3
none
nomal password
# out
no authentication
#re-test
Window ์์ Thunderbird ๋ฉ์ผ ๋ฐ๊ธฐ
- ๋ธ๋ฆฟ์ง ์ค์ - CentOS7_First์์ ๋คํธ์ํฌ ์ด๋ํฐ ๋ธ๋ฆฟ์ง๋ก ์ค์
yum -y install bind bind-chroot
vim /etc/sysconfig/network-scripts/ifcfg-ens33
> IPADDR=192.168.0.45
NETMASK=255.255.255.0
GATEWAY=192.168.0.1 # ์๋์ฐ ์๋ฒ๋ ๊ฒ์ดํธ์จ์ด ๋ง์ถฐ์ ์ฌ์ฉ
DNS1=192.168.0.45
vim /etc/resolv.conf
> nameserver=192.168.0.45
systemctl restart network
- CentOS7_First DNS ์ค์
- ์๋์ฐ DNS ์ค์
์ ์ดํ - ๋คํธ์ํฌ ๋ฐ ์ธํฐ๋ท - ๋คํธ์ํฌ ๋ฐ ๊ณต์ ์ผํฐ - ์ด๋ํฐ ์ค์ ๋ณ๊ฒฝ -
์ด๋๋ท > ์์ฑ - ์ธํฐ๋ท ํ๋กํ ์ฝ ๋ฒ์ - DNS์๋ฒ 192.168.0.45๋ก ์ค์
- ์ค์น ๋ฐ ์ค์
yum -y install sendmail sendmail-cf
๋ฐ์ํ
'๐ป Linux' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
220426 (0) | 2022.04.29 |
---|---|
CentOS7 ํ๋ก์ ์๋ฒ (0) | 2022.04.21 |
CentOS7 DHCP ์๋ ํ ๋น, ์๋ ํ ๋น (0) | 2022.04.21 |
CentOS7 Samba Ubuntu Window (0) | 2022.04.21 |
CentOS7 Samba ์ด๊ธฐ์ข ๊ณต์ ํด๋ (0) | 2022.04.21 |
Contents
๋น์ ์ด ์ข์ํ ๋งํ ์ฝํ ์ธ
์์คํ ๊ณต๊ฐ ๊ฐ์ฌํฉ๋๋ค