首页 运维 正文
Sendmail server 的启动

 2022-10-23    493  

sendmail Server 的启动

  sendmail Server 的启动是相当的简单的,在 Red Hat 的系统当中,你可以依序启动 sendmail 以及 POP3 这个服务喔:

Sendmail server 的启动

一、启动 sendmail

  [root@test root]# /etc/rc.d/init.d/sendmail start

  Starting sendmail:

  [ OK ]

二、启动 POP3 这个协定

  [root@test root]# cd /etc/xinetd.d

  [root@test xinetd.d]# vi ipop3

  # 找到下面这一行:

  disable = yes

  # 将他改成

  disable = no

  # 储存后离开!至于关于sendmail启动 更详细的说明,可以参考本文推荐的其他文章噢!

  [root@test cf]# /etc/rc.d/init.d/xinetd restart

  [root@test cf]# netstat -tl

  Active Internet connections (only servers)

  Proto Recv-Q Send-Q Local Address Foreign Address State

  tcp 0 0 *:pop3 *:* LISTEN

  tcp 0 0 *:smtp *:* LISTEN

  看到了吗?这样我们的 sendmail Serve 就已经启动了!

  他已经可以进行收信与送信的工作啰!事实上,如果您曾经以 vi 检查过 /etc/rc.d/init.d/sendmail 这个档案的话,你会发现他其实就是使用 /usr/sbin/sendmail 这支程序在工作的啦!

  sendmail通常的指令下达方式为:

  [root@test root]# /usr/sbin/sendmail -bd -q30m

  参数说明:

  -bd : 表示将 sendmail 以 daemon (可以想成常驻内存的类型) 的类型启动!

  -q : queue 的意思,后面接的是时间参数,时间参数有:

  s (秒) m(分) h(小时) 及 d(天)

  -q30m 表示每隔三十分钟,会将放置在邮件队列 ( 一般是在 /var/spool/mqueue )的sendmail邮件尝试寄出一次!所以,上面的例子当中,说的是将 sendmail 以 daemon 的类型启动之后,并且每 30 分钟去将sendmail邮件队列(为寄出的邮件)尝试寄出一次!

  而 Red Hat 针对sendmail邮件队列寄送邮件的时间,则是设定在 /etc/sysconfig/sendmail 这个档案里面喔!

  注:

  如果您在启动 sendmail 的时候,出现类似这段文字:

  *** Warning: File `virtusertable.db’ has modification time in the future (2003-01-13 11:57:26 > 2003-01-13 06:04:40)

  make: warning: Clock skew detected. Your build may be incomplete.

  这表示您在安装 Linux 的时候,可能发生一些时间上面的错误判断了!

  导致于你的 sendmail 相关的设定档竟然比目前的时间还要新,这个时候可以使用:

  touch /etc/mail/*

  来将档案的时间更新为目前的时间,那就可以顺利的启动 Sendmail 啰! ^_^

原文链接:https://77isp.com/post/9035.html

=========================================

https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。