新浦京81707con > 注册购买 > Mail服务器的搭建,Sendmail邮件服务器

原标题:Mail服务器的搭建,Sendmail邮件服务器

浏览次数:60 时间:2019-12-04

sendmail-8.13.8-2.el5.i386.rpm:sendmail服务的主程序包,服务器端必得安装该软件包。sendmail-cf-8.13.8-2.el5.i386.rpm:sendmail宏...

tcp   0    0 0.0.0.0:25       0.0.0.0:*      LISTEN  3739/sendmail: acce 

发邮件报错

意气风发》.Sendmail服务软件包 sendmail-8.13.8-2.el5.i386.rpm:sendmail服务的主程序包,服务器端必得安装该软件包。 sendmail-cf-8.13.8-2.el5.i386.rpm:sendmail宏文件包 sendmail-devel-8.13.8-2.el5.i386.rpm:sendmail服务器开荒工具软件包 sendmail-doc-8.13.8-2.el5.i386.rpm:sendmail服务器的验证文档m4-1.4.5-3.el5.1.i386.rpm:宏管理过虑软件包 dovecot-1.0-1.2.rc15.el5.i386.rpm:接纳邮件软件包,安装时必要注意安装顺序 二》.Sendmail相关配置文档 sendmail.cf:sendmail大旨配置文件,坐落于/etc/mail/sendmail/sendmail.cf sendmail.mc:sendmail提供sendmail文件模板,通过编写制定此文件后再使用m4工具将结果导入sendmail.cf达成陈设sendmail核心配置文件,裁减配置复杂度,坐落于/etc/mail/sendmail.mc local-host-name:定义收发邮件服务器的域名和主机别名,坐落于/etc/mail/local-host-name access.db:用来设置sendmail服务器为怎么着主机实行中转邮件,位于/etc/mail/access.db aliases.db:用来定义邮箱外号,坐落于/etc/mail/aliases.db virtusertable.db:用来安装设想账户,坐落于/etc/mail/virtusertable.db 三》.邮件效能组件 MUA:邮件客户代理Mail User Agent) MTA:邮件传输代理Mail Transfer Agent) MDA:邮件投递代理Mail Delivery Agent) 四》.Sendmail常规服务器配置 搭建Sendmail服务器流程: 1)配置sendmail.mc文件 2)使用m4工具将sendmail.mc文件导入sendmail.cf文件 3)配置local-host-names文件 4)建构客商帐号 5)重新起动服务使配置生效 五》.案例剖析与安顿 案例拓扑图: 澳门新葡亰平台游戏 1 实施指标: 在同网段中,差异区域的mail邮件服务器举办互相转载通信 试验步骤: 风华正茂、搭建DNS境遇与系统情形 [[email protected] Server]# vim /etc/sysconfig/network改过主机名称】 澳门新葡亰平台游戏 2 [[email protected] Server]# vim /etc/hosts将hosts文件改正为暗中同意值】 澳门新葡亰平台游戏 3 [[email protected] Server]# yum install -y bind-9.3.6-4.P1.el5.i386.rpm bind-chroot-9.3.6-4.P1.el5.i386.rpm caching-nameserver-9.3.6-4.P1.el5.i386.rpm –nogpgcheck安装dns服务器相应的3个软件】 [[email protected] ~]# cd /var/named/chroot/etc/ [[email protected] etc]# cp –p named.caching-nameserver.conf named.conf [[email protected] etc]#vim named.conf listen-on port 53 { any; }; allow-query { any; }; allow-query-cache { any; }; match-clients { any; }; match-destinations { any; }; :wq [[email protected] etc]# vim named.rfc1912.zones 澳门新葡亰平台游戏 4 [[email protected] etc]# cd ../var/named/ [[email protected] named]# cp -p localhost.zone 163.com.zone [[email protected] named]# vim 163.com.zone 澳门新葡亰平台游戏 5 [[email protected] named]# service named restart Stopping named: [ OK ] Starting named: [ OK ] [[email protected] named]#澳门新葡亰平台游戏, chkconfig named on [[email protected] named]# chkconfig --list |grep named 编辑DNS服务器指向 [[email protected] named]# vim /etc/resolv.conf 澳门新葡亰平台游戏 6 [[email protected] named]# init 6 重启机器后,主机名变为mail 二、安装并安排sendmail服务 [[email protected] Server]# rpm -ivh sendmail-cf-8.13.8-2.el5.i386.rpm [[email protected] Server]# cd /etc/mail [[email protected] mail]# ll [[email protected] mail]# vim sendmail.mc 澳门新葡亰平台游戏 7 [[email protected] mail]# vim access 澳门新葡亰平台游戏 8 [[email protected] mail]# vim local-host-names 澳门新葡亰平台游戏 9 [[email protected] mail]# service sendmail restart Shutting down sm-client: [ OK ] Shutting down sendmail: [ OK ] Starting sendmail: [ OK ] Starting sm-client: [ OK ] 三、服务器安装dovecot进行邮件的收受 下边做接收劳务器端: [[email protected] Server]# yum install dovecot-1.0.7-7.el5.i386.rpm [[email protected] Server]#vim /etc/dovecot.conf 澳门新葡亰平台游戏 10 [[email protected] Server]# service dovecot restart Stopping Dovecot Imap: [ OK ] Starting Dovecot Imap: [ OK ] [[email protected] Server]#chkconfig dovecot on 四、创设测量试验账号: [[email protected] Server]# useradd user1 [[email protected] Server]# passwd user1 [[email protected] Server]# useradd user2 [[email protected] Server]# passwd user2 五、在长途主机举办测量试验域名解析 澳门新葡亰平台游戏 11 澳门新葡亰平台游戏 12 六、搭建SINAmail服务器 依照163.com服务器举办搭建,只须求当心下列文件主机名相关新闻填写为sina就可以 [[email protected] ~]# vim /etc/sysconfig/network改善主机名文件】 [[email protected] ~]# vim /etc/hosts修改为私下认可值】 [[email protected] ~]# cd /var/named/chroot/走入该目录中,进行铺排】 [[email protected] chroot]# cd etc/ [[email protected] etc]# vim named.conf [[email protected] etc]# vim named.rfc一九一二.zones配置区域文书档案】 [[email protected] chroot]# cd var/named/ [[email protected] named]# cp -p localhost.zone sina.com.zone [[email protected] named]# vim sina.com.zone [[email protected] named]# cd /etc/mail [[email protected] mail]# vim access [[email protected] mail]# vim sendmail.mc [[email protected] mail]# vim local-host-names 创建测量试验账号user5并设置密码 七、搭建实现 对sina地区开展测量检验 澳门新葡亰平台游戏 13 试验完了,进行两岸测量试验 发送方: 澳门新葡亰平台游戏 14 接收方: 澳门新葡亰平台游戏 15 八、观看服务器日志 Sina.com Jul 16 19:53:57 mail sendmail[3425]: q6GNru1H003425: from=<[email protected]>, size=423, class=0, nrcpts=1, msgid=<[email protected]>, proto=SMTP, daemon=MTA, relay=[192.168.100.21] Jul 16 19:54:00 mail sendmail[3427]: q6GNru1H003425: to=<[email protected]>, ctladdr=<[email protected]> (502/502), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120423, relay=mail.163.com. [192.168.100.123], dsn=2.0.0, stat=Sent (q6GNrwbl012707 Message accepted for delivery卡塔尔(قطر‎ 163.com服务器的日记: Jul 16 19:54:00 mail sendmail[12707]: q6GNrwbl012707: from=<[email protected]>, size=581, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA, relay=[192.168.100.124] Jul 16 19:54:00 mail sendmail[12866]: q6GNrwbl012707: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30749, dsn=2.0.0, stat=Sent Jul 16 19:54:17 mail dovecot: pop3-login: Login: user=<user1>, method=PLAIN, rip=::ffff:192.168.100.20, lip=::ffff:192.168.100.123 Jul 16 19:54:17 mail dovecot: POP3(user1卡塔尔国: Disconnected: Logged out top=0/0, retr=1/882, del=1/1, size=866 ps:卓殊的对象们得以Q395061796

客户端: MUA        web client       outlook express    foxmail     evolution  mutt

系  统

域  名

服务器

客户端

RedHat 5.4

mail.163.com

172.16.1.253

172.16.1.10

本文出自 “学则不固” 博客,请必得保留此出处

Mda  投递员   postfix   (mailproc)  sendmail默认带mda

 

NETWORKING_IPV6=yes

[[email protected] named]# pwd

2.宣称区域:[root@localhost etc]# vim named.rfc1912.zones 

Changing password for user user3.

Connected to 192.168.20.88 (192.168.20.88).

Transaction failed

Escape character is '^]'.

 37         match-clients      { any; };

[root@localhost etc]# vim named.conf 

  1. Languages

(2)大家再用相近的不二秘籍配置东京的mail服务器

-rw-r----- 1 root named  113 Dec 18 05:48 rndc.key

        listen-on port 53 { any; };  改善监听范围

lrwxrwxrwx 1 root root     45 Dec 18 06:42 config_local.php -> ../../../../etc/squirrelmail/config_local.php

quit

[[email protected] named]# cp -p localhost.zone 163.com.zone

                                      3600000    ; Expire

drwxr-xr-x  2 root root 4096 Dec 18 06:42 images

ns              IN A            192.168.20.88

安装邮件服务器, postfix squirrelmail rhat 5.4 下测验,本实验指标是,在服务器与客商端之间相互收发邮件和转载邮件; 650卡塔尔(قطر‎this...

221 2.0.0 mail.bj.com closing connection

Squirrelmail基于web的邮件客商端)

暗中同意sendmail是设置的,这里大家设置允许telnet连接服务器的其它省方的25号口进行收发邮件,所以我们需求在主配置文件中改造

 

Cc:      退出

total 4

                IN NS           ns.sh.com.

BAD PASSWORD: it does not contain enough DIFFERENT characters

2.声称区域:[root@localhost etc]# vim named.rfc1912.zones 

total 88

options {

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

        listen-on-v6 port 53 { ::1; };

drwxr-xr-x  2 root root 4096 Dec 18 06:42 config

250 2.1.0 hhh@hh.com... Sender ok

 31 };

  caching-nameserver-9.3.6-4.P1.el5_4.2.i386.rpm

修改:

        statistics-file "/var/named/data/named_stats.txt";

Main Menu --

在/etc/mail目录下的access文件是一个连接文件

   1:bind-chroot            ########################################### [100%]     

此处被驳倒了,所以我们供给在主配置文件中更换

                                        15M             ; retry

@     IN   SOA  localhost.   root.localhost.  (   “本机正是该反向dns的劳务”器

pop3            IN CNAME        mail

2.永久    退回

 

我们须要把那多少个包七个个的安装

[[email protected] mail]# ll

zone "20.168.192.in-addr.arpa" IN {

[[email protected] html]# cd mail/

Connect:localhost.localdomain     RELAY

   1:postfix                ########################################### [100%]

[root@mail Server]# vim /etc/dovecot.conf   编写翻译它的主配置文件

8、创造客商

做完以往重启sendmail ,然后在客商端便得以向服务器本地发了

 

telnet: connect to address 192.168.20.99: Connection refused

:wq

 windows  电子邮件服务(二零零二 2002卡塔尔(英语:State of Qatar)  二〇一〇 (唯有发送,无接收卡塔尔(قطر‎    exchange server(微软)     软件:lotus notes  mdaemon 

7、安装postfix

首先大家先安装服务器端的pop3

-rw-r--r-- 1 root root  29548 May 21  2009 config_default.php

sendmail-cf-8.13.8-8.el5.i386.rpm  生成易配置的配备文件跟脚本

[[email protected] etc]# ll

221 2.0.0 mail.bj.com closing connection

                                        3H              ; refresh

/var/named/chroot/var/named

;; WHEN: Tue Dec 18 06:12:41 2012

1111111   内容

修改

[root@mail Server]# yum install dovecot

111 : 鎷掔粷杩炴帴

[root@localhost named]# cp -p localhost.zone bj.com.db

77 #mydomain = domain.tld   

ns              IN A            192.168.20.99

   1:bind                   ########################################### [100%]

/etc/mail/local-host-names 记录当地域名,必需清楚本身担当的域

New UNIX password:

bj.com       增添本地域名

drwxr-xr-x  3 root root 4096 Dec 18 06:42 include

                                        1D )            ; minimum

Shutting down postfix:                                     [  OK  ]

nameserver 192.168.20.88

系统遇到:

2.第三防软件 apache  spamassassin

 

mail from:hhh@hh.com   发送邮件(这里是不未有邮箱验证的,名字能够随意写)

[[email protected] etc]# cp -p named.caching-nameserver.conf named.conf

sh.com                 RELAY      

Retype new UNIX password:

        recursion yes;

drwxr-xr-x 47 root root 4096 Dec 18 06:42 locale

Connect:127.0.0.1                RELAY

-rw-r----- 1 root named 1230 Jul 30  2009 named.caching-nameserver.conf

任何邮件发送方法telnet

163.com.                86400   IN      MX      10 mail.163.com.

m4-1.4.5-3.el5.1.i386.rpm     转变工具包

 38         match-destinations { any; };

250 mail.bj.com Hello [192.168.20.99], pleased to meet you

-r--r--r-- 278 root root   51012 Aug 14  2008 postfix-pflogsumm-2.3.3-2.1.el5_2.i386.rpm

[root@mail ~]# netstat -tupln |grep 25

      最终输入s保存以上纠正,再输入q退出(校正的文件同不经常间保留卡塔尔(英语:State of Qatar)

[root@localhost named]# pwd

[[email protected] ~]# vim /etc/hosts 

-rw-rw---- 1 user1 mail     0 Aug  6 09:30 user1 在user1的信箱中从不邮件了(已取走)

Preparing...                ########################################### [100%]

-rw-rw---- 1 user1 mail   651 Aug  6 09:08 user1  再度翻开采现该客户已经采用到邮件了

passwd: all authentication tokens updated successfully.

首先搭建dns服务器:

93 #myorigin = $mydomain

sendmail-8.13.8-8.el5

-rw-r--r--  1 root root  684 May 21  2009 index.php

[root@localhost named]# vim /etc/hosts

 

hekkllll

[[email protected] config]# ll

                                      1997022700 ; Serial

127.0.0.1       mail.163.com

@               IN SOA  ns.bj.com.       root (

;; ADDITIONAL SECTION:

 

 

防病毒邮件  linux暗中认可不享有

[[email protected] Server]# useradd user3

2.生成主配置文件:

                                        42              ; serial (d. adams)

        type master;

双重登陆:OK

214 2.0.0 End of HELP info

 30         allow-update { none; };

220 mail.bj.com ESMTP Sendmail 8.13.8/8.13.8; Sat, 6 Aug 2011 11:19:35  0800

 28         allow-query-cache { any; };

[root@mail user1]# vim /var/named/chroot/etc/named.rfc1912.zones 

[[email protected] Server]# netstat -tupln |less

Divecot安装后默许情形下打开了pop3,pop3s,imap ,imaps

修改为

每创造叁个账户就能创制二个邮箱,该邮筒除了本顾客能够访谈,mail组也能访问,系统私下认可意况下是设置了sendmail的

747 AddDefaultCharset UTF-8

4.启动dns  service named start,并改变dns指向

BAD PASSWORD: it does not contain enough DIFFERENT characters

quit

[[email protected] ~]# cd /mnt/Server/

        include "/etc/named.rfc1912.zones";

[[email protected] config]# service httpd restart

[root@localhost etc]# vim named.conf 

 

-rw------- 1 root  root 10351 Aug  6 09:07 root

passwd: all authentication tokens updated successfully.

在文件/etc/syslog.conf中大家得以查出Mial服务所发生的具有日志会在/var/log/maillog中呈现

nameserver 172.16.1.253

[root@localhost Server]# cd /var/named/chroot/etc/

2、配置主机名:mail.163.com

214-2.0.0 For more info use "HELP <topic>".

BAD PASSWORD: it does not contain enough DIFFERENT characters

smtp            IN CNAME        mail

[[email protected] named]# rndc reload

-rw------- 1 user1 user1 662 Aug  6 09:30 mbox   产生二个mbox,保存邮件

;; Got answer:

rcpt to :user1@mail.bj.com   收件人@服务器

在255 mynetworks = 127.0.0.0/8方面增添如下:#使用SMTP认证

[root@mail ~]# telnet 192.168.20.88 25  再一次连接

 

1.安装包:bind-9.3.6-4.P1.el5_4.2.i386.rpm

4.  General Options

3.成立数据库:

5.  Themes

214-2.0.0  EXPN VERB ETRN DSN AUTH

      输入d,然后输入cyrus内定IMAP服务器类型)

        memstatistics-file "/var/named/data/named_mem_stats.txt";

Shutting down sm-client:                                   [  OK  ]

Smtps(smtp ssl)利用证书在出殡和下葬的时候做加密,分段加密,未有表明就一点都不大概加密

;; MSG SIZE  rcvd: 95

NETWORKING_IPV6=yes

      输入4.  采摘General Options然后输入5修正Usernames in Lowercase :为 true

Connect:localhost                   RELAY

 

3.开立数据库:

客商登录报错

[root@mail Server]# netstat -tupln |grep dov

[[email protected] ~]# hostname mail.163.com

        channel default_debug {

 

subject:hello

server reload successful

};

[[email protected] Server]# passwd user1

.

/var/named/chroot/var/named

[root@mail user1]# cd /var/named/chroot/var/named/

5、配置YUM

mail.sh.com         加多本地服务器名

[[email protected] ~]# vim /etc/resolv.conf

options {

[[email protected] named]# service sendmail stop

total 16

broken_sasl_auth_clients = yes

   账号认证  sendmail私下认可未有  依靠cyrus-sasl(开源工具)实现

smtpd_sasl_security_options = noanonymous

$TTL    86400

   1:caching-nameserver     ########################################### [100%]  

[root@localhost Server]# rpm -qa |grep sendmail

2.  Server Settings

        listen-on port 53 { any; };

Preparing...                ########################################### [100%]

信件查看之后会放在家目录下的mbox中

[[email protected] Server]# service postfix start

                                      86400 )    ; Minimum

[[email protected] Server]# passwd user2

mail            IN A            192.168.20.88

smtpd_sasl_auth_enable = yes

@               IN NS           ns.bj.com.

DovecotPOP/IMAP协议,用于选择邮件)

        file "sh.com.db";

262 mynetworks = 127.0.0.0/8

        file "bj.com.db";

New UNIX password:

Connect:localhost                 RELAY

 

};

155 #mydestination = $myhostname, localhost.$mydomain, localhost

};

;163.com.                       IN      MX

  caching-nameserver-9.3.6-4.P1.el5_4.2.i386.rpm

[[email protected] config]# service dovecot restart

Connect:192.168.20.        RELAY    即便顾客端处于分裂网段,必定要为其丰硕中继

 

[root@localhost named]# vim /etc/sysconfig/network

;; Query time: 5 msec

再选用user1的邮件便足以选择了:

3、配置DNS文件

@               IN MX 10         mail   创造邮件交流器,便于外人向本地点投送

Starting named:                                            [  OK  ]

total 20

料定sendmail是或不是已关闭,并不自由运转恐怕卸载

From: root <root@localhost.localdomain>     发送者


特点:1.快捷 2.安全 3.多样性

张开squirrelmail配置工具

(3)基本的对发

[[email protected] ~]# vim /etc/sysconfig/network

};

[[email protected] named]# service named restart

        directory       "/var/named";

@               IN MX 10        mail

-rw------- 1 root  root 10351 Aug  6 09:07 root

 

214-2.0.0  STARTTLS

lrwxrwxrwx 1 root root     39 Dec 18 06:42 config.php -> ../../../../etc/squirrelmail/config.php

1111111   内容

 

        listen-on-v6 port 53 { ::1; };

                                                           [  OK  ]

系统暗中同意已经设置了sendmail的,它只可以兑现mta

:wq

        match-destinations { any; };  改为any

连年IMAP服务器现身谬误:localhost。

本条小名在/etc/aliases中布局,由于m4会将aliases的变改进正到aliases.db中,系统真正使用的是aliases.db数据库

收发邮件成功!**

127.0.0.1          mail.bj.com  localhost.localdomain localhost    添加

[[email protected] Server]# service saslauthd start

本文由新浦京81707con发布于注册购买,转载请注明出处:Mail服务器的搭建,Sendmail邮件服务器

关键词: 新浦京81707con

上一篇:InnoDB锁,

下一篇:没有了