Chinaunix
标题:
[已解决]solaris10上的Sendmail无法启动,内有详情!
[打印本页]
作者:
蛮烦人乐
时间:
2007-12-24 12:21
标题:
[已解决]solaris10上的Sendmail无法启动,内有详情!
之前这台服务器的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 编辑
]
作者:
abel
时间:
2007-12-24 15:05
沒用過 solaris 的 svcs, 通常我都是直接重裝 sendmail 的 tar.gz 不用他自帶的 sendmail
所以幫不到你
(那個自帶的 sendmail 的設定檔個人不習慣)
作者:
蛮烦人乐
时间:
2007-12-24 15:14
因为我现在仅仅只是需要用java调用smtp外发邮件到域内指定邮箱而已~~~
所以只需要sendmail online即可!
可是转换网段之前没有问题,换了个IP之后,再开机,就起不来了~~~
作者:
蛮烦人乐
时间:
2007-12-24 16:33
问题已解决~~~~~~原来是sendmail.cf的问题,将原来bak的覆盖过去就好了!
谢谢大家关注!
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2