码迷,mamicode.com
首页 > 其他好文 > 详细

Postfix与Dovecot

时间:2020-01-10 23:51:47      阅读:106      评论:0      收藏:0      [点我收藏+]

标签:get   use   sys   cat   log   linux   table   slaves   ln -s   

配置主机名称

oot@localhost ~]# vim /etc/hostname

mail.linuxprobe.com

oot@localhost ~]# hostname

mail.linuxprobe.com

[root@localhost ~]# iptables -F

[root@localhost ~]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

 

 

安装DNS服务

[root@localhost ~]# yum install bind-chroot

[root@localhost ~]# vim /etc/named.rfc1912.zones

zone "linuxprobe.com" IN {

        type master;

        file "linuxprobe.com.zone";

        allow-update { none; };

}

 

[root@localhost ~]# cd /var/named

[root@localhost named]# ls

chroot  dynamic   named.empty      named.loopback

data    named.ca  named.localhost  slaves

 

[root@localhost named]# cp -a named.localhost linuxprobe.com.zone

[root@localhost named]# vim linuxprobe.com.zone

$TTL 1D

@       IN SOA  @ linuxprobe.com. root.linuxprobe.com. (

                                        0       ; serial

                                        1D      ; refresh

                                        1H      ; retry

                                        1W      ; expire

                                        3H )    ; minimum

        NS      ns.linuxprobe.com.

ns      IN A    192.168.10.10

@       IN MX   10 mail.linuxprobe.com.

mail    IN A    192.168.10.10

 

[root@localhost named]# systemctl restart named

~[root@localhost named]# systemctl enable named

ln -s ‘/usr/lib/systemd/system/named.service‘ ‘/etc/systemd/system/multi-user.target.wants/named.service‘

 

[root@localhost named]# vim /etc/postfix/main.cf

75 myhostname = mail.linuxprobe.com

83 mydomain = linuxprobe.com

98 myorigin = $mydomain

115 inet_interfaces = all

163 mydestination = $myhostname, $mydomain

 

[root@localhost named]# systemctl restart postfix

[root@localhost named]# systemctl enable postfix

 

[root@localhost named]# useradd xiaoguo

[root@localhost named]# su - xiaoguo

[xiaoguo@mail ~]$ exit

logout

t@localhost named]# passwd xiaoguo

 

 

[root@localhost named]# yum install dovecot

[root@localhost named]# vim /etc/dovecot/dovecot.conf

24 protocols = imap pop3 lmtp

25 disable_plaintext_auth=no

48 login_trusted_networks = 192.168.10.0/24

 

[root@localhost named]# vim /etc/dovecot/conf.d/10-mail.conf

25    mail_location = mbox:~/mail:INBOX=/var/mail/%u

 

[root@localhost named]# su - xiaoguo

Last login: Tue Aug 13 22:14:52 CST 2019 on pts/0

[xiaoguo@mail ~]$ mkdir -p mail/.iamp/INBOX

[xiaoguo@mail ~]$ exit

logout

 

[root@localhost named]# systemctl restart dovecot

[root@localhost named]# systemctl enable dovecot

ln -s ‘/usr/lib/systemd/system/dovecot.service‘ ‘/etc/systemd/system/multi-user.target.wants/dovecot.service‘

[root@localhost named]# iptables -F

 

Postfix与Dovecot

标签:get   use   sys   cat   log   linux   table   slaves   ln -s   

原文地址:https://www.cnblogs.com/dinghailong128/p/12178409.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!