warning: SASL authentication failure
postfix PostfixAdmin MySQL Cyrus-sasl Courier-authlib Dovecot
使用outlook連接時候反覆要求輸入密碼, 就是連接不上
Sep 26 13:43:54 mail pop3-login: Disconnected [::ffff:192.168.77.11]
Sep 26 13:44:05 mail last message repeated 5 times
Sep 26 13:44:06 mail postfix/smtpd: connect from unknown
Sep 26 13:44:06 mail postfix/smtpd: warning: SASL authentication failure: cannot connect to Courier authdaemond: Permission denied
Sep 26 13:44:06 mail postfix/smtpd: warning: unknown: SASL LOGIN authentication failed
Sep 26 13:44:06 mail postfix/smtpd: lost connection after AUTH from unknown
Sep 26 13:44:06 mail postfix/smtpd: disconnect from unknown
我參照的手冊 後面防垃圾和OPENSSL WEBMAIL 沒做 其他都照做了:
RedHat Postfix + MySQL + Cyrus-sasl + Dovecot 用RPM方式實現
RedHat Enterprise Linux Server 4.2 + Postfix + PostfixAdmin + MySQL + Cyrus-sasl + Courier-authlib + Dovecot + Antivir-Mailgate + MailScanner + OpenSSL + Extmail
作者:Fandy
電子郵箱:cbbc@163.com、cbbc@avl.com.cn
QQ號碼:332018422
建立日期:2006年01月01日,最後修改日期:2006年01月12日
版本號:v 0.2
版權說明:本文章的內容歸作者版權所有,同時也接受大家的轉貼,但一定要保存作者信息和出處,多謝!
近來網上流行的熱門文章「在RHEL 4 上配置全功能的Postfix 伺服器」,是不份相當不錯的好文章。但是也存在著一些操作和配置說明不清晰的地方,本人看了一些配置過程后就有一種衝動就是想寫一編更加完整和功能更加強大的文章。
文章的特色就是採用「圖文並茂」和軟體包安裝環境使用詳盡說明的方式,目的就是令讀者更加容易了解全功能郵件系統的安裝和配置。可以做到初學Linux的新手也能配置一個功能強大Postfix郵件伺服器!
不足的地方:小弟Linux水平有限所以會存在錯誤的地方請大家加以改正錯誤,以方便及時改正錯誤和完善文章的內容,多謝!(注在配置以下的信息前,以下的操作請使用root用戶來操作)
Setp0、參考資料:
1、 在RHEL 4 上配置全功能的Postfix 伺服器;
2、 Red Hat 企業版4.1 + F-Prot Antivirus + MailScanner 4.46.2-2安裝筆記;
3、 Red Hat 企業版4.2 + Master DNS + Slave DNS安裝筆記;
Setp1、RedHat Enterprise Linux Server 4.2系統安裝截圖說明:
磁碟配置:
設備 類型 大小
/ ext3 39911
swap 1024
網路基本配置:
etho IP/Gateway:192.168.1.253/255.255.255.0
主機名:mail.easy.com
網關:192.168.1.1
主/次DNS:192.168.1.254/192.168.1.253/202.96.128.68
防火牆基本配置:
⊙ 無防火牆
⊙ 是否啟用 SELinux:已禁用
安裝方式的選項:
⊙ 定製要安裝的軟體包(C)
桌面選項:
(√) X窗口系統 (選取全部)
(√) GNOME桌面環境 (選取全部)
應用程序選項:
(√) 工程和科學 (選取默認)
(√) 圖形化互聯網 (選取默認)
(√) 基於文本的互聯網 (選取默認)
(√) 辦公/生產率 (選取默認)
伺服器選項:
(√) 伺服器配置工具 (選取全部)
(√) 萬維網伺服器 (選取全部)
(√) 郵件伺服器(自行選全部)
(√) Windows文件伺服器 (選取全部)
(√) DNS名稱伺服器 (選取全部)
(√) SQL資料庫 (選取全部)
郵件伺服器的細節選項:
(√) perl-Cyrus - Cyrus IMAP server utility Perl modules.
(√) spamassassin - Spam filter for email which can be invoked from mail delivery age...
開發選項:
(√) 開發工具 (選擇全部)
系統選項:
(√) 管理工具 (選取默認)
(√) 列印支持 (選取默認)
雜項選項:
全部不要選擇;
Step2、OpenSSL詳細配置過程:
特別說明:因為使用rpm方式來安裝,所以openssl.cnf配置文件存放地址為:/usr/share/ssl/
修改/usr/share/ssl/目錄下openssl.cnf文件,詳細內容如下:
詳細內容:
default_days= 365 (設定憑證可使用之天數)
更改為:
default_days= 3650
default_bits= 1024 (設定金鑰長度(bits))
更改為:
default_bits= 2048
Step3、PostfixAdmin軟體源代碼安裝和配置過程:
軟體包格式:postfixadmin-2.1.0.tgz
軟體包的大小(KB):157KB
下載地址:http://high5.net/postfixadmin/do ... tfixadmin-2.1.0.tgz
PostfixAdmin軟體包安裝過程如下:
詳細操作:
# tar -zxvf postfixadmin-2.1.0.gz -C /var/www/html
# cd /var/www/html
# mv postfixadmin-2.1.0 postfixadmin
修改Apache系統的/etc/http/conf/httpd.conf配置文件:
詳細內容:
ServerAdmin you@example.com
更改為:
ServerAdmin fandy@easy.com
#ServerName www.example.com:80
更改為:
ServerName mail.easy.com:80
AddDefaultCharset utf-8
更改為:
AddDefaultCharset GB2312
DirectoryIndex index.html index.html.var
更改為:
DirectoryIndex index.html index.html.var index.php index.cgi
啟動 Apache、MySQL 伺服器:
詳細操作:
# service httpd start
# service mysqld start
設定Mysql伺服器root管理員的密碼:
詳細操作:
# mysqladmin -u root password 『jinbiao』
測試Mysql伺服器是否正常運行:
詳細操作:
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.17-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
測試Apache是否正常運行,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址:
詳細操作:
http://mail.easy.com
建立 PostfixAdmin 所需要的數據表和config.inc.php文件:
詳細操作:
# cd /var/www/html/postfixadmin
# mysql -u root -p < DATABASE_MYSQL.TXT
Enter password:jinbiao (輸入mysqladmin管理員root的密碼)
# cp config.inc.php.sample config.inc.php
# sed -i "s/\@change-this-to-your.domain.tld/\@easy.com/g" config.inc.php
# sed -i "s/change-this-to-your.domain.tld/mail.easy.com/g" config.inc.php
修改/usr/local/apache/htdocs/postfixadmin/config.inc.php文件的相關內容:
詳細內容:
$CONF['default_language'] = 'en';
更改為:
$CONF['default_language'] = 'cn';
測試PostfixAdmin檢查是否通過,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址:
詳細操作:
http://mail.easy.com/postfixadmin/index.php
詳細操作:
http://mail.easy.com/postfixadmin/setup.php
測試PostfixAdmin檢查通過後,為了系統安全著想請刪除或者是移除setup.php文件:
詳細操作:
# cd /usr/local/apache/htdocs/postfixadmin
# mv setup.php backup-setup.php
移除setup.php文件后,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址:
詳細操作:
http://mail.easy.com/postfixadmin/login.php
移除setup.php文件后,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址:
詳細操作:
http://mail.easy.com/postfixadmin/admin/
進入PostfixAdmin的admin介面后,根據頁面提示信息需要刪除或者是移除以下三個文件:
詳細操作:
# /usr/local/apache/htdocs/postfixadmin
# mv motd.txt backup-motd.txt
# mv motd-admin.txt backup-motd-admin.txt
# mv motd-users.txt backup-motd-users.txt
移除motd.txt、motd-admin.txt、motd-users.txt文件后,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址,然後就可以正常的建立和刪除域名、用戶郵箱:
詳細操作:
http://mail.easy.com/postfixadmin/admin/index.php
利用PostfixAdmin的admin介面新建easy.com和fandy.com域名,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址:
詳細操作:
http://mail.easy.com/postfixadmin/admin/create-domain.php
利用PostfixAdmin的admin介面為easy.com和fandy.com域名分別新建一個用戶郵箱,打開Mozilla Firefor或者Internet Explorer等瀏覽器輸入以下地址:
詳細操作:
http://mail.easy.com/postfixadmin/admin/create-mailbox.php
將Apache、Mysql伺服器設置為開機自動啟動:
詳細操作:
# chkconfig --level 33 httpd on (設置Apache伺服器為開機自啟動)
# chkconfig --level 33 mysqld on (設置MySQL伺服器為開機自啟動)
Step4、Postfix軟體源代碼安裝和配置過程:
軟體包格式:postfix-2.2.5-1.mysql.sasl2.vda.rhel4.i386.rpm
特別說明:本軟體包默認以支持MySQL、SASL、VDA、TLS等功能;
軟體包的大小(KB):3408KB
下載地址:http://www.proficuous.com/postfi ... /index_4_2.2.5.html
安裝Postfix前,請先刪除系統安裝時所自帶的Sendmail軟體包:
詳細操作:
# service sendmail stop (停止sendmail系統的運行)
# rpm -e sendmail --nodeps (從操作系統中刪除sendmail軟體包)
Postfix軟體包詳細安裝過程:
詳細操作:
# rpm -ivh postfix-2.2.5-1.mysql.sasl2.vda.rhel4.i386.rpm (安裝postfix軟體包)
Preparing... ###########################################
1:postfix ###########################################
建立存放用戶郵件目錄和設置相關許可權:
詳細操作:
# mkdir /home/mailbox (建立存放用戶郵件目錄)
# chown -R postfix.postfix /home/mailbox (分配存放用戶電子郵件目錄的用戶許可權)
查詢postfix用戶和所屬組的ID資料:
詳細操作:
# id postfix (查詢postfix用戶、所屬組的ID)
uid=102(postfix) gid=103(postfix) groups=103(postfix),12(mail)
用戶ID:102 所屬組ID:103
使用postalias命令建立aliases.db文件:
詳細操作:
# cd /etc/
# postalias aliases (建立aliases.db文件)
修改/etc/postfix/mail.cf文件,以下為完整文件的詳細內容::
詳細配置內容:
#=====================BASE=========================#
myhostname = mail.easy.com
mydomain = easy.com
myorigin = $mydomain
mydestination = $myhostname localhost localhost.$mydomain
mynetworks = 192.168.1.0/24 127.0.0.0/8
inet_interfaces = all
#=====================Vritual Mailbox settings=========================#
virtual_mailbox_base = /home/mailbox (輸入存放用戶郵件目錄)
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:102 (輸入postfix用戶的ID)
virtual_gid_maps = static:103 (輸入postfix用戶組的ID)
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
#====================QUOTA========================#
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, \
please try again later. (請在一行內輸寫完)
virtual_overquota_bounce = yes
繼續main.cf文件內容:
詳細配置內容:
#====================SASL========================#
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = (可以在一行內輸寫完,也可以按以下的輸寫方法)
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
reject_unauth_destination,
permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP "Version not Available"
#====================OTHER========================#
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/local/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
在/etc/postfix/目錄下建立mysql_virtual_alias_maps.cf配置文件,以下為完整文件的詳細內容:
詳細內容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address
在/etc/postfix/目錄下建立mysql_virtual_domains_maps.cf配置文件,以下為完整文件的詳細內容:
詳細內容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
在/etc/postfix/目錄下建立mysql_virtual_mailbox_maps.cf配置文件,以下為完整文件的詳細內容:
詳細內容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username'
在/etc/postfix/目錄下建立mysql_virtual_mailbox_limit_maps.cf配置文件,以下為完整文件的詳細內容:
詳細內容:
user = postfix
password = postfix
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
在/usr/local/lib/sasl2/目錄下修改smtpd.conf用戶認證文件,詳細內容如下(註:如果/usr/local/lib/
sasl2/目錄下沒有smtpd.conf可能新建),以下為完整文件的詳細內容:
詳細內容:
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path: /var/spool/authdaemon/socket
複製/usr/local/lib/sasl2/目錄下smtpd.conf到/usr/local/lib/sasl/目錄:
詳細操作:
# cp /usr/local/lib/sasl2/smtpd.conf /usr/local/lib/sasl/
啟動Postfix伺服器:
詳細操作:
# service postfix start
測試SMTP伺服器下easy.com域是否正常:
詳細內容:
# telnet localhost 25 (遠程連接到localhost埠為25)
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.easy.com ESMTP "Version not Available"
ehlo easy.com (測試easy.com是否正常)
250-mail.easy.com
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
quit (退出本次測試)
221 Bye
Connection closed by foreign host.
測試SMTP伺服器下fandy.com域是否正常:
詳細內容:
# telnet localhost 25 (遠程連接到localhost埠為25)
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.easy.com ESMTP "Version not Available"
ehlo fandy.com (測試fandy.com是否正常)
250-mail.easy.com
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250 8BITMIME
quit (退出本次測試)
221 Bye
Connection closed by foreign host.
Step5、Courier-authlib軟體包安裝和配置過程:
軟體包格式: courier-authlib-0.58-1.ce4.i386.rpm
courier-authlib-devel-0.58-1.ce4.i386.rpm
courier-authlib-mysql-0.58-1.ce4.i386.rpm
軟體包的大小(KB):121KB、32KB、13KB
下載地址:http://www.phantom.atknet.ru/archives/cat_1011941725.html
安裝Courier-authlib軟體包安裝過程如下(註:請嚴格按照以下的安裝順序來安裝軟體包):
詳細操作:
# rpm -ivh courier-authlib-0.58-1.ce4.i386.rpm (安裝courier-authlib軟體包)
# rpm -ivh courier-authlib-devel-0.58-1.ce4.i386.rpm (安裝courier-authlib-devel軟體包)
# rpm -ivh courier-authlib-mysql-0.58-1.ce4.i386.rpm (安裝courier-authlib-mysql軟體包)
更改authdaemon文件夾的屬性:
詳細操作:
# chmod 755 /var/spool/authdaemon
修改/etc/authlib/目錄下的authdaemonrc文件,修改內容以下:
詳細內容:
authmodulelist=" authpam authpgsql authldap authmysql authcustom authpipe"
更改為:
authmodulelist="authmysql"
authmodulelistorig="authpam authpgsql authldap authmysql authcustom authpipe"
更改為:
authmodulelistorig="authmysql"
daemons=5
更改為:
daemons=10
修改/etc/authlib/目錄下的authmysqlrc文件,以下為完整文件的詳細內容:
詳細內容:
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '102' (輸入postfix用戶的ID)
MYSQL_GID_FIELD '103' (輸入postfix用戶組的ID)
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD concat('/home/mailbox/',maildir)
MYSQL_MAILDIR_FIELD concat('/home/mailbox/',maildir)
MYSQL_NAME_FIELD name
將Courier-authlib設置為開機自動啟動:
詳細操作:
# chkconfig --level 33 courier-authlib on
# service courier-authlib start
Step6、Dovecot軟體包安裝和配置過程:
軟體包格式: dovecot-0.99.14-1.2.el4.rf.i386.rpm
軟體包的大小(KB):604KB
下載地址:http://distro.ibiblio.org/pub/li ... th/devel/repo/RPMS/
安裝Dovecot軟體包安裝過程如下(註:也可以使用系統自帶軟體,看個人喜歡啦(^_^)):
詳細操作:
# rpm -ivh dovecot-0.99.14-1.2.el4.rf.i386.rpm (安裝Dovecot軟體包)
修改/etc/目錄下dovecot.conf文件,以下為完整文件的詳細內容:
詳細內容:
base_dir = /var/run/dovecot/
protocols = imap pop3
imap_listen = [::]
pop3_listen = [::]
login_dir = /var/run/dovecot-login
login = imap
login = pop3
mbox_locks = fcntl
auth = default
auth_mechanisms = plain
auth_user = root
default_mail_env = maildir:/home/mailbox/%u/
auth_userdb = mysql /etc/dovecot-mysql.conf
auth_passdb = mysql /etc/dovecot-mysql.conf
first_valid_uid = 102 (輸入postfix用戶的ID)
在/etc/目錄下新建dovecot-mysql.conf文件,以下為完整文件的詳細內容:
詳細內容:
db_host = localhost
db_port = 3306
db_unix_socket = /var/lib/mysql/mysql.sock
db = postfix
db_user = postfix
db_passwd = postfix
db_client_flags = 0
default_pass_scheme = PLAIN-MD5
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 102 AS uid, 103 AS gid FROM mailbox WHERE username = '%u'
將Dovecot設置為開機自動啟動:
詳細操作:
# chkconfig --level 33 dovecot on
# service dovecot start
測試POP3伺服器是否正常:
詳細內容:
# telnet localhost 110 (遠程連接到localhost埠為110)
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK dovecot ready.
quit (退出本次測試)
+OK Logging out
Connection closed by foreign host.
Step7、F-Prot Antivirus軟體包安裝和配置過程:
軟體包格式: fp-linux-ws.rpm
軟體包的大小(KB):3970KB
下載地址:http://files.f-prot.com/files/linux-x86/fp-linux-ws.rpm
安裝F-Prot Antivirus軟體包前,請先啟動SpamAssassin伺服器:
詳細操作:
# service spamassassin start (啟動SpamAssassin伺服器)
安裝F-Prot Antivirus軟體包安裝過程如下:
詳細操作:
# rpm -ivh fp-linux-ws.rpm (安裝F-Prot Antivirus軟體包)
Preparing... ###########################################
1:fp-linux-ws ###########################################
***************************************
* F-Prot Antivirus Updater *
***************************************
There's a new version of:
"Document/Office/Macro viruses" signatures on the web.
Starting to download...
Download completed.
There's a new version of:
"Application/Script viruses and Trojans" signatures on the web.
Starting to download...
Download completed.
Preparing to install Application/Script viruses and Trojans signatures.
Application/Script viruses and Trojans signatures have successfully been installed.
Preparing to install Document/Office/Macro viruses signatures.
Document/Office/Macro viruses signatures have successfully been installed.
***************************************
* Update completed successfully. *
***************************************
升級的F-Prot Antivirus病毒庫的操作:
詳細操作:
# cd /usr/local/f-prot/tools/
# ./check-updates.pl (升級命令)
[ 本帖最後由 very_99 於 2007-9-27 14:10 編輯 ]
《解決方案》
你的UID為102,GID為104的用戶是哪個?它有訪問資料庫的許可權么?
《解決方案》
Sep 26 13:44:06 mail postfix/smtpd: warning: SASL authentication failure: cannot connect to Courier authdaemond: Permission denied
這句表明你的postfix daemon沒有許可權連接courier-authlib的進程,建議:
1、檢查主配置文件中sasl段的設定是否正確;
2、檢查一下authdaemon和quthmysqlrc配置文件,確保你的指定連接用戶;
《解決方案》
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname
, reject_non_fqdn_hostname, reject_unknown_sender_domain, reject_non_fqdn_sender, reject_non_fqdn_re
cipient, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destination, permi
t
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP "Version not Available"
請看
《解決方案》
# more authdaemonrc|grep -v "#"
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=10
authdaemonvar=/var/spool/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""
# more authmysqlrc|grep -v "#"
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD postfix
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '102'
MYSQL_GID_FIELD '104'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD concat('/var/mail/mailbox',maildir)
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD concat('/var/mail/mailbox',maildir)
《解決方案》
以上幾個參數什麼意思啊?
《解決方案》
原帖由 very_99 於 2007-9-27 11:45 發表 http://bbs.chinaunix.net/images/common/back.gif
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname
, reject_non_fqdn_hostname, reject_unknown_sender_domain, rej ...
這段設置沒什麼問題, 但是你的saslauthd的設置呢?
你用/etc/sysconfig/saslauthd里的MECH是什麼?
[ 本帖最後由 富貴貓 於 2007-9-27 11:58 編輯 ]
《解決方案》
# more /etc/sysconfig/saslauthd
# Directory in which to place saslauthd's listening socket, pid file, and so
# on. This directory must already exist.
SOCKETDIR=/var/run/saslauthd
# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled to use.
MECH=shadow
# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
# for the list of accepted flags.
FLAGS=
但是我好象沒有用到saslauthd啊?
smtpd.conf:
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path: /var/spool/authdaemon/socket
《解決方案》
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_sender_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destination, permit
1、請確保你以上這項後面的值如果換行的話,第二行(包括)以後的每行行前一定至少有一個空格;
2、如果你是編譯安裝的courier-authlib的話,請確保你的socket文件的位置的確在/var/spool/authdaemon/socket,如果不是,請請相應的修改;
《解決方案》
原帖由 marion 於 2007-9-27 12:24 發表 http://bbs.chinaunix.net/images/common/back.gif
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_sender_domain, reject_non_fqdn_sender, reject_non_fq ...
不是編譯安裝的是用
# rpm -ivh courier-authlib-0.58-1.ce4.i386.rpm (安裝courier-authlib軟體包)
# rpm -ivh courier-authlib-devel-0.58-1.ce4.i386.rpm (安裝courier-authlib-devel軟體包)
# rpm -ivh courier-authlib-mysql-0.58-1.ce4.i386.rpm (安裝courier-authlib-mysql軟體包)
/var/spool/authdaemon/socket 這個文件有的.
還要什麼信息? 我馬上取