[[Postfix]]

*手順(GUI管理なし) [#pa397fb8]
 # yum install cyrus-sasl*
 # vi /etc/postfix/main.cf
 myhostname = mail.hogemuge.com
 mydomain = hogemuge.com
 myorigin = $mydomain
 smtpd_banner = $myhostname ESMTP unknown
 inet_interfaces = all
 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain <--使用するドメインが複数の場合はドメイン名を全て記述。
 home_mailbox = Maildir/   <-- 多くのドメインやユーザーを管理する場合はmbox。そうでない場合は基本Maildir
 
 **追加
 smtpd_sasl_auth_enable = yes
 smtpd_sasl_local_domain = $mydomain
 smtpd_recipient_restrictions = 
         permit_mynetworks
         permit_sasl_authenticated
         reject_unauth_destination
 
 broken_sasl_auth_clients=yes
 
 # 匿名ユーザーのログイン禁止
 smtpd_sasl_security_options = noanonymous
 
 smtpd_client_restrictions = 
         permit_mynetworks,
         reject_rbl_client all.rbl.jp,
         #reject_rbl_client list.dsbl.org,
         reject_rbl_client bl.spamcop.net,  
         reject_rbl_client relays.ordb.org, 
         reject_rbl_client sbl-xbl.spamhaus.org,
 permit
 
 # vi /etc/postfix/master.cf
 smtp
   -o smtpd_sasl_auth_enable=yes		<-- saslauthを有効にする
   -o smtpd_client_restrictions=permit_sasl_authenticated,reject saslauthを有効にする
 
 # service postfix reload <-- postfixの設定を再読み込みする。
 
check:クライアントのメールソフトにてSMTP-AUTHで認証されるかを確認する。~
check:SMTP-AUTHを解除した場合(pop before smtp)で送信できないことを確認する。
 
***sbumissionポートを有効にする。 [#r6c42bc9]
 # vi /etc/postfix/master.cf
 smtp
 submission inet n       -       n       -       -       smtpd
   -o smtpd_sasl_auth_enable=yes
   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
 
 # service postfix reload <-- postfixの設定を再読み込みする。
 # netstat -l  <-- 以下のようにsubmissionで待受になっていることを確認する。
 tcp        0      0 *:submission                *:*                         LISTEN
 
***dovecotの設定 [#c3999f96]
 # vi /etc/dovecot/dovecot.conf
 protocols = imap pop3     <--変更。lmtpを削除。
 disable_plaintext_auth = no  <--追加。暗号化されていないパスワードの認証を許可
 mail_location = maildir:~/Maildir
  
 # service dovecot restart
 
 
 
 
 
 
 (2)SMTP-Auth設定
 SMTP-Auth用ユーザ名、パスワードにシステムのユーザ名、パスワードを使用する場合)
 
 # vi /etc/saslauthd/smtpd.conf
 pwcheck_method: saslauthd
 mech_list: plain login
 # service saslauthd start
 # chkconfig saslauthd on

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS