精華區beta FreeBSD 關於我們 聯絡資訊
※ 引述《[email protected] (會會歌的羊咩咩~~~咩~)》之銘言: : : 然後回到主機去查看/var/log/maillog時 : : 發現了以下的文字(前面的部份應該可以省略吧!) : : warning: SASL authentication failure: no user in db : smtp_sasl_password_maps = hash:/usr/local/etc/postfix/saslpass : 是不是把它加到main.cf中就可以了? 應該不是 smtp_sasl_password_maps 的問題, 你的問題看起來像是 你設定 SASL 使用 sasl 自己的資料庫 (/usr/local/etc/sasldb2) 試試執行 saslpasswd2 -c abcdefg, 加入一個使用者, 然後在 outlook 的 密碼輸入畫面輸入你加入的使用者和密碼看看 如果你是想用主機裡面的使用者做資料庫的話, 可以參考 /usr/local/share/doc/postfix/SASL_README 和 sample-auth.cf 在 postfix.conf 裡面, 應該是只需要這兩行就夠了 smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous 記得在 /usr/local/lib/sasl2/ 裡面要加入 smptd.conf 這個檔, 不過你看起來 已經搞定這些部份了..:).. 至於下面的內容, 我沒辦法跟你保證是對的..:P.. 1. 使用 PAM 檢查 /usr/local/etc/rc.d/saslauthd.sh 有沒有這行 sasl_saslauthd_flags="-a pam" smtpd.conf 的內容: pwcheck_method: saslauthd 在 /etc/pam.conf 裡面加入: smtpd auth required pam_unix.so try_first_pass smtpd auth required pam_cleartext_pass_ok.so smtpd account required pam_unix.so smtpd session required pam_permit.so 如何測試: cd /usr/ports/security/cyrus-sasl2/; make configure cd work/cyrus-sasl-2.1.12/saslauthd; make testsaslauthd 執行 ./testsaslauthd -u YOUR_USERNAME -p YOUR_PASSWD -s smtpd 如果結果是 0: OK "Success.", 那就成功了..:).. 2. 直接使用 shadow passwd 編輯 /usr/local/etc/rc.d/saslauthd.sh, 把 sasl_saslauthd_flags 改成 "-a shadow", 重新啟動 saslauthd smtpd.conf 的內容: 同上 如何測試: 同上 -- ※ Origin: 鳥窩 (BirdNest.twbbs.org) ◆ From: eagle.seed.net.tw