Mar 282006
Sunがなかなかsendmailのパッチを提供してくれないので、MTAをCSWパッケージのEximに変更しました。
sendmailデーモンの停止
# svcadm disable network/smtp:sendmail
eximパッケージのインストール
# pkg-get -i exim : Found an existing sendmail installation. You have following choices with for installing exim: 1. Send mail only, without changing existing sendmail installation. 2. Rename existing sendmail binaries to *.OFF and replace them with binaries provided by exim. Enter your choice [1,2] (default 1): 2 ## Processing package information. ## Processing system information. 16 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. The following files are being installed with setuid and/or setgid permissions: /opt/csw/sbin/exim <setuid root> Do you want to install these as setuid/setgid files [y,n,?,q] y This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of <cswexim> [y,n,?] y Installing exim - The Exim Mail Transfer Agent as <cswexim> ## Executing preinstall script. adding group exim adding user exim ## Installing part 1 of 1. /etc/init.d/cswexim : /opt/csw/share/man/man8/exim.8 [ verifying class <none> ] ## Executing postinstall script. Stopping MTA: cat: cannot open /var/run/exim.pid Setting up config-files... Copying /opt/csw/etc/exim/aliases.CSW to /opt/csw/etc/exim/aliases Checking for newaliases... /usr/sbin/newaliases Moving /usr/sbin/newaliases to newaliases.OFF Moving /usr/lib/sendmail to sendmail.OFF Moving /usr/bin/mailq to mailq.OFF Starting MTA:2006-03-28 14:51:00 non-existent configuration file(s): /opt/csw/etc/exim/exim.conf If you do *NOT* want to start exim during system-boot rm /opt/csw/etc/exim/exim.conf or mv /opt/csw/etc/exim/exim.conf /opt/csw/etc/exim/exim.conf.OFF --------------------------------------------------------------- Please take the time to read /opt/csw/share/doc/exim/README.CSW --------------------------------------------------------------- Installation of <cswexim> was successful. #
/opt/csw/etc/exim/exim.conf作成
/opt/csw/etc/exim/exim.conf.CSWをベースに以下を変更。
local_domains設定
/etc/mail/local-host-namesに列挙してあるドメイン名をdomainlist local_domains
に記述(“:”区切り)。
domainlist local_domains = localhost : example.jp
Maildir配送に変更
local_delivery定義を変更して、デフォルトをMaildir配送にします。
local_delivery: driver = appendfile directory = $home/Maildir maildir_format = true mode_fail_narrower = false delivery_date_add envelope_to_add return_path_add # group = mail # mode = 0660
/opt/csw/etc/exim/aliases作成
/etc/mail/aliasesをコピーします。sendmailと違ってnewaliasesは不要です。
eximデーモン起動
# cd /;env -i /etc/init.d/cswexim start
動作確認
不正中継チェック
以下のチェックサービスで不正中継動作しないことを確認。
以前、とあるサイトにtelnetすると、SMTPポートに接続してきてチェック、ってサービスがあったと思うのですが、なくなっちゃったのですかね。普通にログインプロンプトが出てきて驚いちゃいました。
ローカル配送確認
tcp/25に直接接続してローカル配送の確認。
$ telnet localhost 25 :
最後にリモートからメール受信できることを確認して終了。
Sorry, the comment form is closed at this time.