外部からのメールは受信するが、送信ができなかった。
ISPのOP25Bのため。
これの対策としてプロバイダから指定されている中継専用SMTPサーバ(587番ポート)を利用する。
以下、参考サイトをほぼ転載。
==============================================================================
/etc/postfix/main.cf書き換え。というか追記というか。
#add for op25b
relayhost = [smtp.nifty.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/nifty.auth
smtp_sasl_security_options = noanonymous
リレー先とポート、認証情報を書き足す。認証情報はこの場合、nifty.authってファイルに書いてあるよ、ってことを書いてある。もちろん、ファイル名がnifty.authである必要は無い。
/etc/postfix/master.cf書き換え。というかこれも追記か。
submission inet n - - - - smtpd
-o smtpd_tls_security_level=may
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
たぶん先頭のほうにあるsmtpエントリの直下あたりにsubmission設定を書き足す。。。というか、実はデフォルトではコメントアウトされてるけどsubmission設定は記述されてたりする。
が、今回は参考にしたサイトの記述と違ったので、参考サイトの記述をそのまま書き込んでみた。
/etc/postfix/nifty.authの作成
[smtp.nifty.com]:587 username:password
ユーザーネームとパスワードはもちろん自分の契約してるアカウントのものを使う。
保存したら
postmap /etc/postfix/nifty.auth
ってコマンドを打って/etc/postfix/nifty.auth.dbを生成する。
で、あとはpostfixを再起動してやればOK。
==============================================================
ISPのOP25Bのため。
これの対策としてプロバイダから指定されている中継専用SMTPサーバ(587番ポート)を利用する。
以下、参考サイトをほぼ転載。
==============================================================================
/etc/postfix/main.cf書き換え。というか追記というか。
#add for op25b
relayhost = [smtp.nifty.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/nifty.auth
smtp_sasl_security_options = noanonymous
リレー先とポート、認証情報を書き足す。認証情報はこの場合、nifty.authってファイルに書いてあるよ、ってことを書いてある。もちろん、ファイル名がnifty.authである必要は無い。
/etc/postfix/master.cf書き換え。というかこれも追記か。
submission inet n - - - - smtpd
-o smtpd_tls_security_level=may
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
たぶん先頭のほうにあるsmtpエントリの直下あたりにsubmission設定を書き足す。。。というか、実はデフォルトではコメントアウトされてるけどsubmission設定は記述されてたりする。
が、今回は参考にしたサイトの記述と違ったので、参考サイトの記述をそのまま書き込んでみた。
/etc/postfix/nifty.authの作成
[smtp.nifty.com]:587 username:password
ユーザーネームとパスワードはもちろん自分の契約してるアカウントのものを使う。
保存したら
postmap /etc/postfix/nifty.auth
ってコマンドを打って/etc/postfix/nifty.auth.dbを生成する。
で、あとはpostfixを再起動してやればOK。
==============================================================