- 论坛徽章:
- 0
|
之前这台服务器的IP为10.140.1.235,sendmail正常,可以正常发送邮件,然后上周因为需要调整网络环境,将其转换到别的网段,IP改为10.160.1.43,启动完其他服务之后,发觉无法发送邮件,经查,是sendmail的服务没有启动!在网上找到以下教程试图启动服务,但还是不行.具体操作步骤及结果如下:
(0) 获得root权限
# su -
(此处需要输入您的root密码。)
(1) 察看所有服务的状态
# svcs -a
(2) 察看sendmail这个服务的状态
# svcs sendmail
# svcs -l sendmail
bash-3.00# svcs sendmail
STATE STIME FMRI
offline 11:44:04 svc:/network/smtp:sendmail
bash-3.00# svcs -l sendmail
fmri svc:/network/smtp:sendmail
name sendmail SMTP mail transfer agent
enabled true
state offline
next_state none
state_time Mon Dec 24 11:44:04 2007
restarter svc:/system/svc/restarter:default
dependency require_all/refresh file://localhost/etc/mail/sendmail.cf (absent)
dependency require_all/refresh file://localhost/etc/nsswitch.conf (online)
dependency optional_all/none svc:/system/filesystem/autofs (online)
dependency require_all/none svc:/system/filesystem/local (online)
dependency require_all/none svc:/network/service (online)
dependency require_all/refresh svc:/milestone/name-services (online)
dependency optional_all/refresh svc:/system/identity:domain (online)
dependency optional_all/none svc:/system/system-log (online)
(3) 察看sendmail这个服务所依赖的其他服务的状态
# svcs -d sendmail
bash-3.00# svcs -d sendmail
STATE STIME FMRI
online Dec_21 svc:/system/identity:domain
online Dec_21 svc:/network/service:default
online Dec_21 svc:/milestone/name-services:default
online Dec_21 svc:/system/filesystem/local:default
online Dec_21 svc:/system/filesystem/autofs:default
online Dec_21 svc:/system/system-log:default
(4) 关闭sendmail这个服务
# svcadm disable sendmail
(5) 再次察看sendmail这个服务的状态
# svcs sendmail
# svcs -l sendmail
bash-3.00# svcadm disable sendmail
bash-3.00# svcs sendmail
STATE STIME FMRI
disabled 12:01:54 svc:/network/smtp:sendmail
bash-3.00# svcs -l sendmail
fmri svc:/network/smtp:sendmail
name sendmail SMTP mail transfer agent
enabled false
state disabled
next_state none
state_time Mon Dec 24 12:01:54 2007
restarter svc:/system/svc/restarter:default
dependency require_all/refresh file://localhost/etc/mail/sendmail.cf (absent)
dependency require_all/refresh file://localhost/etc/nsswitch.conf (online)
dependency optional_all/none svc:/system/filesystem/autofs (online)
dependency require_all/none svc:/system/filesystem/local (online)
dependency require_all/none svc:/network/service (online)
dependency require_all/refresh svc:/milestone/name-services (online)
dependency optional_all/refresh svc:/system/identity:domain (online)
dependency optional_all/none svc:/system/system-log (online)
(6) 启动sendmail这个服务
# svcadm enable sendmail
(7 )再次察看sendmail这个服务的状态
# svcs sendmail
# svcs -l sendmail
bash-3.00# svcadm enable sendmail
bash-3.00# svcs sendmail
STATE STIME FMRI
offline 12:03:17 svc:/network/smtp:sendmail
bash-3.00# svcs -l sendmail
fmri svc:/network/smtp:sendmail
name sendmail SMTP mail transfer agent
enabled true
state offline
next_state none
state_time Mon Dec 24 12:03:17 2007
restarter svc:/system/svc/restarter:default
dependency require_all/refresh file://localhost/etc/mail/sendmail.cf (absent)
dependency require_all/refresh file://localhost/etc/nsswitch.conf (online)
dependency optional_all/none svc:/system/filesystem/autofs (online)
dependency require_all/none svc:/system/filesystem/local (online)
dependency require_all/none svc:/network/service (online)
dependency require_all/refresh svc:/milestone/name-services (online)
dependency optional_all/refresh svc:/system/identity:domain (online)
dependency optional_all/none svc:/system/system-log (online)
(9) 重新启动sendmail这个服务
# svcadm restart sendmail
# svcs sendmail
bash-3.00# svcadm restart sendmail
bash-3.00# svcs sendmail
STATE STIME FMRI
offline 12:03:17 svc:/network/smtp:sendmail
bash-3.00# mconnect
connecting to host localhost (127.0.0.1), port 25
connect: Connection refused
=====================================================================
经过以上操作步骤,sendmail还是offline状态,请问应该再去哪里查询可能出错的原因???
[ 本帖最后由 蛮烦人乐 于 2007-12-24 16:34 编辑 ] |
|