国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 服務(wù)器 > Web服務(wù)器 > 正文

不同網(wǎng)段中的郵件服務(wù)器間的郵件轉(zhuǎn)發(fā)

2024-09-01 13:42:57
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
應(yīng)題目要求 需要一臺(tái)DNS服務(wù)器充當(dāng)2個(gè) mail服務(wù)器的域名解析服務(wù)器

1.設(shè)置DNS服務(wù)器  在DNS服務(wù)器上增加2塊網(wǎng)卡 并分別設(shè)置IP地址。

設(shè)置主DNS配置文件.
vim /var/named/chroot/etc/named.conf
options {
      directory "/var/named";
};
zone "hanfangzhou.com" {
      type master;
      file "hanfangzhou.com.zone";
};
zone "laohu.com" {
      type master;
     file "laohu.com.zone";
};


配置2個(gè)mail服務(wù)器的區(qū)域文件


vim /var/named/chroot/var/named/hanfangzhou.com.zone
@               IN SOA  @       root (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
hanfangzhou.com.        IN NS           mail.hanfangzhou.com.
mail                    IN A            192.168.18.48
hanfangzhou.com.        IN MX 10        mail.hanfangzhou.com.
vim /var/named/chroot/var/named/laohu.com.zone
@               IN SOA  @       root (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
laoyu.com.        IN NS            mail.laohu.com.
mail              IN A             10.1.1.2
laoyu.com.        IN MX 10         mail.laohu.com.

重啟DNS服務(wù)

service named restart

開(kāi)啟網(wǎng)卡轉(zhuǎn)發(fā)

 vim /etc/sysctl.conf
net.ipv4.ip_forward = 1

MAIL服務(wù)器1(mail.hanfangzhou.com)的設(shè)置

停止sendmail服務(wù) 關(guān)閉開(kāi)機(jī)加載項(xiàng) service sendmail stop  chkconfig sendmail off
安裝postfix      yum install postfix -y
修改配置文件 vim /etc/postfix/main.cf
69 myhostname = mail.hanfangzhou.com
77 mydomain = hanfangzhou.com
93 myorigin = $mydomain
107 inet_interfaces = all
155 mydestination = $myhostname, localhost.$mydomain, localhost
255 mynetworks = 192.168.18.0/24, 127.0.0.0/8
287 relay_domains = hanfangzhou.com
保存退出

設(shè)置SMTP認(rèn)證配置文件

vim /etc/sysconfig/saslauthd
   MECH=shadow

保存退出

service saslauthd restart

檢查防火墻和SElinux是否關(guān)閉
驗(yàn)證 建立用戶(hù)chaoyue
[root@hanfangzhou ~]# useradd chaoyue
[root@hanfangzhou ~]# passwd chaoyue
Changing password for user chaoyue.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@hanfangzhou ~]# testsaslauthd -u chaoyue -p '123'
0: OK "Success."

配置postfix服務(wù)與smtp關(guān)聯(lián)

vim /etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = ''
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous

保存退出

service postfix restart         chkconfig postfix on
驗(yàn)證
perl -MMIME::Base64 -e 'print encode_base64(chaoyue);'
Y2hhb3l1ZQ==
perl -MMIME::Base64 -e 'print encode_base64(123);'
MTIz
[root@hanfangzhou ~]# telnet mail.hanfangzhou.com 25
Trying 192.168.18.48...
Connected to mail.hanfangzhou.com (192.168.18.48).
Escape character is '^]'.
220 mail.hanfangzhou.com ESMTP Postfix
auth login
334 VXNlcm5hbWU6
Y2hhb3l1ZQ==
334 UGFzc3dvcmQ6
MTIz
235 2.0.0 Authentication successful

安裝dovecot服務(wù)  yum install dovecot -y

修改配置文件
vim /etc/dovecot.conf
protocols = pop3 pop3s
 protocol pop3 {
     listen = *:10100
#     ..
   }
service dovecot restart    chkconfig dovecot on

安裝cyrus

yum install cyrus-imapd cyrus-imapd-devel -y
修改postfix主配置文件  vim /etc/postfix/main.cf
修改 456行 去掉注釋符 mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
service cyrus-imapd restart  chkconfig cyrus-imapd on
修改cyrus密碼并建立chaoyue用戶(hù)郵箱
[root@hanfangzhou ~]# passwd cyrus
Changing password for user cyrus.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@hanfangzhou ~]# cyradm -u cyrus localhost
IMAP Password:
              localhost.localdomain> cm user.chaoyue
localhost.localdomain> cm user.chaoyue.Send
localhost.localdomain> cm user.chaoyue.Trash
localhost.localdomain> cm user.chaoyue.Drafts
安裝 webmail  squirrelmail   yum install squirrelmail -y
設(shè)置 wenmail   /usr/share/squirrelmail/config/conf.pl
重啟HTTPD服務(wù)
同理設(shè)置MAIL服務(wù)器2(mail.laohu.com) 
測(cè)試
不同網(wǎng)段中的郵件服務(wù)器間的郵件轉(zhuǎn)發(fā)
發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 柳林县| 温宿县| 武功县| 巢湖市| 广昌县| 乌拉特前旗| 滁州市| 莎车县| 横山县| 福清市| 株洲县| 盐池县| 三台县| 梨树县| 龙州县| 喀喇| 南开区| 七台河市| 锦屏县| 长顺县| 冷水江市| 佛坪县| 博湖县| 临高县| 松溪县| 庄河市| 基隆市| 拜城县| 乌鲁木齐市| 和顺县| 湘乡市| 大关县| 麻阳| 敖汉旗| 离岛区| 冷水江市| 阳曲县| 石嘴山市| 泗洪县| 和硕县| 南溪县|