0806作业
搭建邮件服务器,在foxmail上使用xiaoming@example.com给wuneng@ceshi.com用户发一封邮件,内容为biechile。
yum install postfix -y
yum install dovecot -y
yum install mailx -y
yum install cyrus-sasl* -y
vim /etc/postfix/main.cf
myhostname = mail.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $ myhostname, localhost.$ mydomain, localhost,$ mydomain
mynetworks = 127.0.0.0/8,192.168.136.0/24
relay_domains = $mydestination
broken_sasl_auth_clients=yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
vim /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp submission
login_trusted_networks =192.168.136.0/24
vim /etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/mail/%u
systemctl stop firewalld
setenforce 0
systemctl restart postfix
systemctl restart dovecot
systemctl restart saslauthd