1. まずpam_smtpauthのインストールを行います。
2. 設定ファイルを編集します。
#%PAM-1.0 auth sufficient /lib/security/pam_smtpauth.so account sufficient /lib/security/pam_smtpauth.so
/usr/sbin/alternatives --install /etc/pam.d/smtp mta-pam /etc/pam_smtpauth/pam.smtp 90
/usr/sbin/alternatives --remove mta-pam /etc/pam_smtpauth/pam.smtp echo "" | /usr/sbin/alternatives --config mta
# PasswordPrompt specifies the string of the password prompt. PasswordPrompt = Password: # SMTPServer_<n> specifies the string of SMTP Authentication server. # <n> is the number of server order. SMTPServer_0 = mail.example.com:25 SMTPServer_1 = smtps:mail.example.com:465 # Timeout specifies the timeout seconds of connection to SMTP # Authentication server. (default is 30 seconds) Timeout = 60 # SSLCertificateFile specifies the path of a PEM encoded certificate file. SSLCertificateFile = /usr/share/ssl/certs/ca-bundle.crt # BlockedUserListFile specifies the path of a file that the unacceptable # users is written. #BlockedUserListFile = /etc/pam_smtpauth.blockedusers # DebugLevel specifies the debugging output level. # This parameter is available if it was configured with --enable-debug=yes #DebugLevel = 0
パラメータ名 | 説明 |
SMTPServer_N | 認証を転送するSMTPサーバー名(サーバー名:ポート番号の形式で) Nは0、複数指定の場合は、1,2,3... |