Solaris 11 ブログトップ

sendmail LISTENソケットの変更 [Solaris 11]

Solaris10,Solaris11では、sendmail はループバックアドレスでしか 25/tcpで
LISTENしていないので、外部からもメールが受けれるように変更する。 
偶にしかやらないため忘れるのでmemo

root@solaris11:/etc/mail# svccfg -s sendmail
svc:/network/smtp:sendmail>
svc:/network/smtp:sendmail>
svc:/network/smtp:sendmail> [tab]
addpg delhash editprop extract listpg refresh selectsnap validate
apply delpg end help listprop repository set
cleanup delprop exit import listsnap revert setprop
delete describe export inventory quit select unselect
svc:/network/smtp:sendmail>
svc:/network/smtp:sendmail> listprop config
config application
config/include_info boolean false
config/local_only boolean true    ・・・ここをfalseに変えたい。
config/path_to_sendmail_mc astring
config/value_authorization astring solaris.smf.value.sendmail
svc:/network/smtp:sendmail>
svc:/network/smtp:sendmail> setprop config/local_only=false
svc:/network/smtp:sendmail>
svc:/network/smtp:sendmail> end
root@solaris11:/etc/mail#
root@solaris11:/etc/mail# svcprop sendmail |grep local_only
config/local_only boolean true        ・・・変わった。
root@solaris11:/etc/mail#
root@solaris11:/etc/mail# svcadm -v restart sendmail
Action restart set for svc:/network/smtp:sendmail.
root@solaris11:/etc/mail#
root@solaris11:/etc/mail# netstat -an|grep 25
*.25 *.* 0 0 128000 0 LISTEN    ・・・繁栄されました。
root@solaris11:/etc/mail#

※Solaris10では、/var/svc/manifest/network/ 配下に
 マニフェストのXMLファイルがあったと思ったのだが、
 Solaris11では/lib/svc/manifest/network/ 配下にあった。(探しちゃったよ)

 svcs コマンドに-l をつけて実行するとマニフェストのパスも表示されるのが分かった。
 こんな感じ。

root@solaris11:/etc/mail/cf/cf# svcs -l sendmail
fmri svc:/network/smtp:sendmail
name sendmail SMTP mail transfer agent
enabled true
state online
next_state none
state_time 2012年08月31日 12時57分47秒
logfile /var/svc/log/network-smtp:sendmail.log
restarter svc:/system/svc/restarter:default
contract_id 196
manifest /etc/svc/profile/generic.xml manifest /lib/svc/manifest/network/smtp-sendmail.xml
dependency require_all/refresh file://localhost/etc/mail/sendmail.cf (online)
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)
root@solaris11:/etc/mail#

現在のプロパティを確認する場合はこちら。

root@solaris11:/etc/mail/cf/cf# svcprop sendmail
config/include_info boolean false
config/path_to_sendmail_mc astring ""
config/value_authorization astring solaris.smf.value.sendmail
config/local_only boolean false
config-file/entities fmri file://localhost/etc/mail/sendmail.cf
config-file/grouping astring require_all
config-file/restart_on astring refresh
    ・
    ・
    ・
<以下省略>

solaris 11 で固定IPアドレス設定 [Solaris 11]

そろそろSolaris11をしっかり覚えたいのでメモ。


・Network Auto-Magicを無効化し、defaultを有効化する。
  root@solaris:~# svcadm disable svc:/network/physical:nwam
  root@solaris:~# svcadm enable svc:/network/physical:default

・netadmコマンドでDHCPを無効化
  root@solaris:~# netadm enable -p ncp DefaultFixed

・インターフェースnet0を作り直す。
root@solaris:~# ipadm create-ip net0
確認
root@solaris:~# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0

・IPアドレスの設定
root@solaris:~# ipadm create-addr -T static -a 10.0.1.11/16 net0/staticIPv4

※net0の後につける識別子はハイフンやアンダースコアが使えなかった。

・確認
root@solaris:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/staticIPv4 static ok 10.0.1.11/16
lo0/v6 static ok ::1/128

・疎通確認
root@solaris:~# ping 10.0.0.1            
10.0.0.1 is alive ・・・相変わらず -s をつけないとpingを打ち続けない。。

・デフォルトゲートウェイを追加
root@solaris:~# route -p add default 10.0.0.1
add net default: gateway 10.0.0.1
add persistent net default: gateway 10.0.0.1





タグ:Solaris 11
Solaris 11 ブログトップ

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。