Postfix on Debian Lenny
Debian lenny上でSMTPサーバ、Postfixを動かしました。
postfixとSMTP認証のためのsasl2モジュールをインストールします。
# apt-get install postfix # apt-get install libsasl2-modules
telnetでrelay先サーバのSMTP認証のタイプを確認します。
# telnet target-mail.sv 25 ... EHLO target-mail.sv ... 250-AUTH PLAIN LOGIN CRAM-MD5 ...
/etc/postfix/sasl/isp_passwdに認証のID/PASSを設定し、DBに加えます。
# cat /etc/postfix/sasl/isp_passwd target-mail.sv <ID>:<PASSWORD> # postmap /etc/postfix/sasl/isp_passwd
/etc/postfix/main.cfに以下を加えます。
smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl/isp_passwd smtp_sasl_security_options = smtp_sasl_mechanism_filter = plain, login, cram-md5
/etc/mailnameにDNSで引けるサーバ名を設定しておきます。
# cat /etc/mailname mymail.sv
postfixを再起動します。
# /etc/init.d/postfix restart
- 補足:ログは/var/log/syslogに出力されます。