本文凝聚了作者不少的安装经验,写出来供各位同仁参考指正,也为自己留一个“备份”,以便以后安装时作为参照!
安装过程中借鉴了不少google出来的文章,是你们先行的足迹为作者今天的成功打下了基础,在此先行谢过!
转载请注明出处:http://marion.cublog.cn
[color=Blue][size=4]所用软件包:[/size][/color](本文中,以下软件包都将在/usr/local/src中存放)
Postfix-2.4.5
Mysql-5.0.45
Sasl-2.1.22
DB-4.5.20
Openssl-0.98e
httpd-2.2.4
Php-5.2.3
courier-authlib-0.59.3
courier-imap-4.1.3
Extmail-1.0.2
Extman-0.2.2
maildrop-2.0.4
clamav-0.91.2
amavisd-new
SpamAssassin-3.2.3
[color=Blue][size=4]系统逻辑结构[/size][/color]
[attach]213156[/attach]
[color=Blue][size=4]前提:[/size][/color]开始前请确保您已经配置好指向此邮件服务器MX记录及其它DNS设置;本示例中的域名为benet.org,邮件服务器FQDN为mail.benet.org,IP地址为192.168.1.6;同时,如果您的服务器事先已经安装了sendmail,请卸载之;
一、安装mysql-5.0.45
#groupadd mysql
#useradd -g mysql -s /bin/false -M mysql
#tar zxvf mysql-5.0.45.tar.gz
#cd mysql-5.0.45
#./configure
--prefix=/usr/local/mysql
--enable-thread-safe-client
--enable-local-infile
--with-charset=gbk
--with-extra-charset=all
--with-low-memory
#make
#make install
#cp support-files/my-medium.cnf /etc/my.cnf
#cd /usr/local/mysql
#chown -R mysql .
#chgrp -R mysql .
#bin/mysql_install_db --user=mysql
#chown -R root .
#chown -R mysql var
#bin/mysqld_safe --user=mysql &
#cd /usr/local/src/mysql-5.0.45 (这里的目录指的是原压缩包解压后的目录)
#cp support-files/mysql.server /etc/rc.d/init.d/mysqld
#chmod 700 /etc/rc.d/init.d/mysqld
加入自动启动服务队列:
#chkconfig --add mysqld
#chkconfig --level 345 mysqld on
测试
#/usr/local/mysql/bin/mysqladmin ping
#/usr/local/mysql/bin/mysqladmin version
#/usr/local/mysql/bin/mysql
添加root密码
#/usr/local/mysql/bin/mysqladmin -uroot -p 旧密码 password 新密码
说明:此时mysql的root用户的密码为空
配置库文件搜索路径
# echo "/usr/local/mysql/lib/mysql" >> /etc/ld.so.conf
# ldconfig -v
添加/usr/local/mysql/bin到环境变量PATH中
#export PATH=$PATH:/usr/local/mysql/bin
二、安装openssl-0.9.8e
# tar zxvf openssl-0.9.8e.tar.gz
# cd openssl-0.9.8e
# ./config shared zlib
# make
# make test
# make install
# mv /usr/bin/openssl /usr/bin/openssl.OFF
# mv /usr/include/openssl /usr/include/openssl.OFF
# rm /usr/lib/libssl.so
# ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
# ln -s /usr/local/ssl/include/openssl /usr/include/openssl
# ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so
配置库文件搜索路径
# echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
# ldconfig -v
检测安装结果
# openssl version
OpenSSL 0.9.8e 23 Feb 2007
三、安装sasl-2.1.22
#tar zxvf cyrus-sasl-2.1.22.tar.gz
#cd cyrus-sasl-2.1.22
#./configure --prefix=/usr/local/sasl2 (注意使用续行符)
--disable-gssapi
--disable-anon
--disable-sample
--disable-digest
--enable-plain
--enable-login
--enable-sql
--with-mysql=/usr/local/mysql
--with-mysql-includes=/usr/local/mysql/include/mysql --with-mysql-libs=/usr/local/mysql/lib/mysql --with-authdaemond=/usr/local/courier-authlib/var/spool/authdaemon/socket
#make
#make install
关闭原有的sasl:
# mv /usr/lib/libsasl2.a /usr/lib/libsasl2.a.OFF
# mv /usr/lib/libsasl2.la /usr/lib/libsasl2.la.OFF
# mv /usr/lib/libsasl2.so.2.0.19 /usr/lib/libsasl2.so.2.0.19.OFF
# mv /usr/lib/sasl2 /usr/lib/sasl2.OFF
# rm /usr/lib/libsasl2.so
# rm /usr/lib/libsasl2.so.2
# ln -sv /usr/local/sasl2/lib/* /usr/lib
postfix 2.3以后的版本会分别在/usr/local/lib和/usr/local/include中搜索sasl库文件及头文件,故还须将其链接至此目录中:
# ln -sv /usr/local/sasl2/lib/* /usr/local/lib
# ln -sv /usr/local/sasl2/include/sasl/* /usr/local/include
创建运行时需要的目录并调试启动
# mkdir -pv /var/state/saslauthd
# /usr/local/sasl2/sbin/saslauthd -a shadow pam -d
启动并测试
# /usr/local/sasl2/sbin/saslauthd -a shadow pam
# /usr/local/sasl2/sbin/testsaslauthd -u root -p root用户密码
配置库文件搜索路径
# echo "/usr/local/sasl2/lib" >> /etc/ld.so.conf
# echo "/usr/local/sasl2/lib/sasl2" >> /etc/ld.so.conf
# ldconfig -v
开机自动启动
# echo "/usr/local/sasl2/sbin/saslauthd -a shadow pam">>/etc/rc.local
四、安装BerkeleyDB
#tar zxvf db-4.5.20.tar.gz
#cd db-4.5.20/build_unix
#../dist/configure --prefix=/usr/local/BerkeleyDB
#make
#make install
修改相应的头文件指向
# mv /usr/include/db4 /usr/inculde/db4.OFF
# rm /usr/include/db_cxx.h
# rm /usr/include/db.h
# rm /usr/include/db_185.h
# ln -sv /usr/local/BerkeleyDB/include /usr/include/db4
# ln -sv /usr/local/BerkeleyDB/include/db.h /usr/include/db.h
# ln -sv /usr/local/BerkeleyDB/include/db_cxx.h /usr/include/db_cxx.h
配置库文件搜索路径
# echo "/usr/local/BerkeleyDB/lib" >> /etc/ld.so.conf
# ldconfig –v
五、安装httpd-2.2.4
#tar jxvf httpd-2.2.4.tar.bz2
#cd httpd-2.2.4
#./configure
--prefix=/usr/local/apache
--sysconfdir=/etc/httpd
--enable-so
--enable-ssl
--with-ssl=/usr/local/ssl
--enable-track-vars
--enable-rewrite
--with-zlib
--enable-mods-shared=most
--enable-suexec (后面extmail切换”运行时用户”时要用到)
--with-suexec-caller=daemon
#make
#make install
#echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.local(系统启动时服务自动启动)
六、安装php-5.2.3
# tar -zvxf php-5.2.3.tar.gz
# mkdir -p /usr/local/php
# cd php-5.2.3
# ./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-xml
--with-png
--with-jpeg
--with-zlib
--with-freetype
--with-gd
--enable-track-vars
--enable-mbstring=all
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini
注:编辑apache配置文件httpd.conf,以apache支持php
# vi /etc/httpd/httpd.conf
1、添加如下二行
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
2、定位至DirectoryIndex index.html
修改为:
DirectoryIndex index.php index.html
3、按照使用习惯,这里将网站根目录指定到/var/www:
找到DocumentRoot “/usr/local/apache/htdocs”
修改为:DocumentRoot “/var/www”(后文中我们还会注释掉此行,以启用虚拟主机)
找到<Directory “/usr/local/apache/htdocs”>
修改为:<Directory “/var/www”>
说明:这个对本文来说并非是不可少的。
七、安装Postfix-2.4.5
1.安装
#groupadd -g 2525 postfix
#useradd -g postfix -u 2525 -s /sbin/nologin -M postfix
#groupadd -g 2526 postdrop
#useradd -g postdrop -u 2526 -s /bin/false -M postdrop
#tar zxvf postfix-2.4.5.tar.gz
#cd postfix-2.4.5
#make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include/mysql -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/sasl2/include/sasl -I/usr/local/BerkeleyDB/include -DUSE_TLS -I/usr/local/ssl/include/openssl ' 'AUXLIBS=-L/usr/local/mysql/lib/mysql -lmysqlclient -lz -lm -L/usr/local/sasl2/lib -lsasl2 -L/usr/local/BerkeleyDB/lib -L/usr/local/ssl/lib -lssl -lcrypto'
#make
#make install
按照以下的提示输入相关的路径([]号中的是缺省值,”]”后的是输入值)
install_root: [/] /
tempdir: [/usr/local/src/ postfix-2.4.5] /tmp
config_directory: [/etc/postfix] /etc/postfix
daemon_directory: [/usr/libexec/postfix] /usr/local/postfix/libexec
command_directory: [/usr/sbin] /usr/local/postfix/sbin
queue_directory: [/var/spool/postfix]
sendmail_path: [/usr/sbin/sendmail]
newaliases_path: [/usr/bin/newaliases]
mailq_path: [/usr/bin/mailq]
mail_owner: [postfix]
setgid_group: [postdrop]
html_directory: [no] /var/www/postfix_html
manpages: [/usr/local/man] /usr/local/postfix/man
readme_directory: [no]
[color=Blue]说明:[/color]这里的postfix将安装在独立的目录/usr/local/postfix中,目的是为了方便管理;您亦可以采用默认安装的方式,可能这样使用起来会更为方便些;
生成别名二进制文件,这个步骤如果忽略,会造成postfix效率极低:
# newaliases
2.进行一些基本配置,测试启动postfix并进行发信
#vi /etc/postfix/main.cf
修改以下几项为您需要的配置
myhostname = mail.benet.org
myorigin = benet.org
mydomain = benet.org
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.1.0/24, 127.0.0.0/8
[color=Blue]说明:[/color]
myorigin参数用来指明发件人所在的域名;
mydestination参数指定postfix接收邮件时收件人的域名,即您的postfix系统要接收到哪个域名的邮件;
myhostname 参数指定运行postfix邮件系统的主机的主机名,默认情况下,其值被设定为本地机器名;
mydomain参数指定您的域名,默认情况下,postfix将myhostname的第一部分删除而作为mydomain的值;
mynetworks 参数指定你所在的网络的网络地址,postfix系统根据其值来区别用户是远程的还是本地的,如果是本地网络用户则允许其访问;
inet_interfaces 参数指定postfix系统监听的网络接口;
[color=Blue]注意:[/color]
1、在postfix的配置文件中,参数行和注释行是不能处在同一行中的;
2、任何一个参数的值都不需要加引号,否则,引号将会被当作参数值的一部分来使用;
3、每修改参数及其值后执行 postfix reload 即可令其生效;但若修改了inet_interfaces,则需重新启动postfix;
4、如果一个参数的值有多个,可以将它们放在不同的行中,只需要在其后的每个行前多置一个空格即可;postfix会把第一个字符为空格或tab的文本行视为上一行的延续;
启动postfix
/usr/local/postfix/sbin/postfix start
连接postfix,验正服务启动状况:
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.benet.org ESMTP Postfix
ehlo mail.benet.org
250-mail.benet.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:root@benet.org
250 2.1.0 Ok
rcpt to:redhat@benet.org
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject:Mail test!
Mail test!!!
.
250 2.0.0 Ok: queued as AB94A1A561
quit
221 2.0.0 Bye
Connection closed by foreign host.
切换到redhat用户进行收信:
# su - redhat
$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/redhat": 1 message 1 new
>N 1 [email]root@benet.org[/email] Wed Sep 5 10:59 15/488 "Mail test!"
&
八、为postfix开启基于cyrus-sasl的认证功能
使用以下命令验正postfix是否支持cyrus风格的sasl认证,如果您的输出为以下结果,则是支持的:
# /usr/local/postfix/sbin/postconf -a
cyrus
dovecot
#vi /etc/postfix/main.cf
添加以下内容:
############################CYRUS-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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
#vi /usr/local/lib/sasl2/smtpd.conf
添加如下内容:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
让postfix重新加载配置文件
#/usr/local/postfix/sbin/postfix reload
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 Welcome to our mail.benet.org ESMTP,Warning: Version not Available!
ehlo mail.benet.org
250-mail.benet.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN (请确保您的输出以类似两行)
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
九、让postfix支持虚拟域和虚拟用户
1、编辑/etc/postfix/main.cf,添加如下内容:
########################Virtual Mailbox Settings########################
virtual_mailbox_base = /var/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:2525
virtual_gid_maps = static:2525
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
##########################QUOTA Settings########################
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 Tidy your mailbox and try again later.
virtual_overquota_bounce = yes
2、添加为支持虚拟域和虚拟用户所用到的配置文件
编辑/etc/postfix/mysql_virtual_alias_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = alias
select_field = goto
where_field = address
编辑/etc/postfix/mysql_virtual_domains_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = domain
select_field = description
where_field = domain
编辑/etc/postfix/mysql_virtual_mailbox_limit_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = quota
where_field = username
编辑/etc/postfix/mysql_virtual_mailbox_maps.cf ,添加如下内容:
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = maildir
where_field = username
[color=Blue]说明:[/color]
1、这里用到的数据库及用户的建立可以后文中的extmail说明部分来实现,您可以参照那一部分来理解这里指定的数据库及其用户名等;
2、以上新建文件亦可以从extman安装文件中获得,您也可以由此不用手动输入;
3、虚拟用户邮箱目录我这里沿用了/var/mailbox,你可以指定为别的目录,比如常见到的/var/spool/mail,或者/home/domains等;但如果这里做了修改,请在后文中用到时作了相应的修改;
十、安装Courier authentication library
# tar jxvf courier-authlib-0.59.3.tar.bz2
# cd courier-authlib-0.59.3
#./configure
--prefix=/usr/local/courier-authlib
--sysconfdir=/etc
--without-authpam
--without-authldap
--without-authpwd
--without-authshadow
--without-authvchkpw
--without-authpgsql
--with-authmysql
--with-mysql-libs=/usr/local/mysql/lib/mysql
--with-mysql-includes=/usr/local/mysql/include/mysql
--with-redhat
--with-authmysqlrc=/etc/authmysqlrc
--with-authdaemonrc=/etc/authdaemonrc
CFLAGS="-march=i686 -O2 -fexpensive-optimizations"
CXXFLAGS="-march=i686 -O2 -fexpensive-optimizations"
# make
# make install
# chmod 755 /usr/local/courier-authlib/var/spool/authdaemon
# cp /etc/authdaemonrc.dist /etc/authdaemonrc
# cp /etc/authmysqlrc.dist /etc/authmysqlrc
修改/etc/authdaemonrc 文件
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=10
编辑/etc/authmysqlrc 为以下内容,其中2525,2525 为postfix 用户的UID和GID。
MYSQL_SERVER localhost
MYSQL_PORT 3306 (指定你的mysql监听的端口,这里使用默认的3306)
MYSQL_USERNAME extmail (这时为后文要用的数据库的所有者的用户名)
MYSQL_PASSWORD extmail (密码)
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE extmail
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '2525'
MYSQL_GID_FIELD '2525'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD concat('/var/mailbox/',homedir)
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD concat('/var/mailbox/',maildir)
# cp courier-authlib.sysvinit /etc/init.d/courier-authlib
# chmod 755 /etc/init.d/courier-authlib
# chkconfig --add courier-authlib
# chkconfig --level 2345 courier-authlib on
#echo "/usr/local/courier-authlib/lib/courier-authlib" >> /etc/ld.so.conf
# ldconfig -v
# service courier-authlib start (启动服务)
十一、安装Courier-IMAP
# tar jxvf courier-imap-4.1.3.tar.bz2
# cd courier-imap-4.1.3
./configure
--prefix=/usr/local/courier-imap
--with-redhat
--enable-unicode
--disable-root-check
--with-trashquota
--without-ipv6
CPPFLAGS='-I/usr/local/ssl/include/openssl -I/usr/local/courier-authlib/include'
LDFLAGS='-L/usr/local/courier-authlib/lib/courier-authlib'
COURIERAUTHCONFIG='/usr/local/courier-authlib/bin/courierauthconfig'
# make
# make install
# cp /usr/local/courier-imap/etc/imapd.dist /usr/local/courier-imap/etc/imapd
# cp /usr/local/courier-imap/etc/imapd-ssl.dist /usr/local/courier-imap/etc/imapd-ssl
# cp /usr/local/courier-imap/etc/pop3d.dist /usr/local/courier-imap/etc/pop3d
# cp /usr/local/courier-imap/etc/pop3d-ssl.dist /usr/local/courier-imap/etc/pop3d-ssl
配置Courier-IMAP,为用户提供pop3服务:
vi /usr/local/courier-imap/etc/pop3d
POP3DSTART=YES
注:如果你想为用户提供IMAP服务,则需在"/usr/local/courier-imap/etc/imapd"文件中设置"IMAPDSTART=yes";其它类同;
新建虚拟用户邮箱所在的目录,并将其权限赋予postfix用户:
#mkdir –pv /var/mailbox
#chown –R postfix /var/mailbox
#cp courier-imap.sysvinit /etc/rc.d/init.d/courier-imapd
#chmod 755 /etc/rc.d/init.d/courier-imapd
#chkconfig --add courier-imapd
#chkconfig --level 2345 courier-imapd on
#service courier-imapd start
接下来重新配置SMTP 认证,编辑 /usr/local/lib/sasl2/smtpd.conf ,确保其为以下内容:
pwcheck_method: authdaemond
log_level: 3
mech_list:PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
[ 本帖最后由 marion 于 2008-7-19 16:17 编辑 ]
marion 回复于:2007-09-06 18:32:15
2008年7月30号:更正笔误一处;
十二、安装Extmail-1.0.2
1、安装
# tar zxvf extmail-1.0.2.tar.gz
# mkdir -pv /var/www/extsuite
# mv extmail-1.0.2 /var/www/extsuite/extmail
# cp /var/www/extsuite/extmail/webmail.cf.default /var/www/extsuite/extmail/webmail.cf
2、修改主配置文件
#vi /var/www/extsuite/extmail/webmail.cf
部分修改选项的说明:
SYS_MESSAGE_SIZE_LIMIT = 5242880
用户可以发送的最大邮件
SYS_USER_LANG = en_US
语言选项,可改作:
SYS_USER_LANG = zh_CN
SYS_MAILDIR_BASE = /home/domains
此处即为您在前文所设置的用户邮件的存放目录,可改作:
SYS_MAILDIR_BASE = /var/mailbox
SYS_MYSQL_USER = db_user
SYS_MYSQL_PASS = db_pass
以上两句句用来设置连接数据库服务器所使用用户名、密码和邮件服务器用到的数据库,这里修改为:
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_HOST = localhost
指明数据库服务器主机名,这里默认即可
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
连接数据库的sock文件位置,这里修改为:
SYS_MYSQL_SOCKET = /tmp/mysql.sock
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
以上用来指定验正用户登录里所用到的表,以及用户名、域名和用户密码分别对应的表中列的名称;这里默认即可
SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket
此句用来指明authdaemo socket文件的位置,这里修改为:
SYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket
3、apache相关配置
由于extmail要进行本地邮件的投递操作,故必须将运行apache服务器用户的身份修改为您的邮件投递代理的用户;本例中打开了apache服务器的suexec功能,故使用以下方法来实现虚拟主机运行身份的指定。此例中的MDA为postfix自带,因此将指定为postfix用户:
<VirtualHost *:80>
ServerName mail.benet.org
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
SuexecUserGroup postfix postfix
</VirtualHost>
修改 cgi执行文件属主为apache运行身份用户:
# chown -R postfix.postfix /var/www/extsuite/extmail/cgi/
如果您没有打开apache服务器的suexec功能,也可以使用以下方法解决:
# vi /etc/httpd/httpd.conf
User postfix
Group postfix
<VirtualHost *:80>
ServerName mail.benet.org
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
</VirtualHost>
4、依赖关系的解决
extmail将会用到perl的DBD::Mysql和Unix::syslogd功能,您可以去http://search.cpan.org搜索下载原码包进行安装。
# tar zxvf Unix-Syslog-0.100.tar.gz
# cd Unix-Syslog-0.100
# perl Makefile.PL
# make
# make install
DBD-Mysql目前最新的版本为DBD-mysql-4.005,但它和系统中的perl结合使用时会造成extmail无法正常使用,因此我们采用3的版本:
# tar zxvf DBD-mysql-3.0002_4.tar.gz
# cd cd DBD-mysql-3.0002_4
# perl Makefile.PL (此步骤中如果出现类同Can't exec "mysql_config": No such file or directory at Makefile.PL line 76.的错误是因为您的mysql的bin目录没有输出至$PATH环境变量)
# make
# make install
十三、安装Extman-0.2.2
1、安装及基本配置
#tar zxvf extman-0.2.2.tar.gz
# mv extman-0.2.2 /var/www/extsuite/extman
修改配置文件以符合本例的需要:
# vi /var/www/extsuite/extman/webman.cf
SYS_MAILDIR_BASE = /home/domains
此处即为您在前文所设置的用户邮件的存放目录,可改作:
SYS_MAILDIR_BASE = /var/mailbox
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
此处修改为:
SYS_MYSQL_SOCKET = /tmp/mysql.sock
使用extman源码目录下docs目录中的extmail.sql和init.sql建立数据库:
# cd /var/www/extsuite/extman/docs
# mysql -u root -p <extmail.sql
# mysql -u root -p <init.sql
修改cgi目录的属主:
# chown -R postfix.postfix /var/www/extsuite/extman/cgi/
如果extman访问数据库权限不足的话,可采用以下命令将新生成的数据库赋予webman用户具有所有权限:
mysql> GRANT all privileges on extmail.* TO webman@localhost IDENTIFIED BY 'webman';
mysql> GRANT all privileges on extmail.* TO [email]webman@127.0.0.1[/email] IDENTIFIED BY 'webman';
在apache的主配置文件中Extmail的虚拟主机部分,添加如下两行:
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
创建其运行时所需的临时目录,并修改其相应的权限:
#mkdir -pv /tmp/extman
#chown postfix.postfix /tmp/extman
好了,到此为止,重新启动apache服务器后,您的Webmail和Extman已经可以使用了,可以在浏览器中输入指定的虚拟主机的名称进行访问,如下:
http://mail.benet.org
选择管理即可登入extman进行后台管理了。默认管理帐号为:[email]root@extmail.org[/email] 密码为:extmail*123*
[color=Blue]说明:[/color]
(1) 如果您安装后无法正常显示校验码,安装perl-GD模块会解决这个问题。如果想简单,您可以到以下地址下载适合您的平台的rpm包,安装即可: http://dries.ulyssis.org/rpm/packages/perl-GD/info.html
(2) extman-0.2.2自带了图形化显示日志的功能;此功能需要rrdtool的支持,您需要安装此些模块才可能正常显示图形日志。
[color=Red]2、(新增2007.9.18)[/color][color=DarkOrchid]配置Mailgraph_ext,使用Extman的图形日志:[/color]
接下来安装图形日志的运行所需要的软件包Time::HiRes、File::Tail和rrdtool,其中前两个包您可以去http://search.cpan.org搜索并下载获得,后一个包您可以到 http://oss.oetiker.ch/rrdtool/pub/?M=D下载获得; 注意安装顺序不能改换。
安装Time::HiRes
#tar zxvf Time-HiRes-1.9707.tar.gz
#cd Time-HiRes-1.9707
#perl Makefile.PL
#make
#make test
#make install
安装File::Tail
#tar zxvf File-Tail-0.99.3.tar.gz
#cd File-Tail-0.99.3
#perl Makefile
#make
#make test
#make install
安装rrdtool-1.2.23
#tar zxvf rrdtool-1.2.23.tar.gz
#cd rrdtool-1.2.23
#./configure --prefix=/usr/local/rrdtool
#make
#make install
创建必要的符号链接(Extman会到这些路径下找相关的库文件)
#ln -sv /usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/auto/RRDs/RRDs.so /usr/lib/perl5/5.8.5/i386-linux-thread-multi/
#ln -sv /usr/local/rrdtool/lib/perl/5.8.5/RRDp.pm /usr/lib/perl5/5.8.5
#ln -sv /usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/RRDs.pm /usr/lib/perl5/5.8.5
复制mailgraph_ext到/usr/local,并启动之
# cp -r /var/www/extsuite/extman/addon/mailgraph_ext /usr/local
# / usr/local/mailgraph_ext/mailgraph-init start
# /usr/local/mailgraph_ext/qmonitor-init start
添加到自动启动队列
echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.local
echo "/usr/local/mailgraph_ext/qmonitor-init start" >> /etc/rc.local
好了,接下来您就可以到extman的后台查看图表日志了。效果如下图:
[attach]213848[/attach]
[color=Blue]注意:[/color]安装以上软件所之前,请确保您的系统已经安装了tcl、tcl-devel、libart和libart-devel等相关的软件包;
[color=Red][size=5]新续部分(2007.9.16)[/size][/color]
十四、安装maildrop-2.0.4
maildrop是一个使用C++编写的用来代替本地MDA的带有过滤功能邮件投递代理,是courier邮件系统组件之一。它从标准输入接受信息并投递到用户邮箱;maildrop既可以将邮件投递到mailboxes格式邮箱,亦可以将其投递到maildirs格式邮箱。同时,maildrop可以从文件中读取入站邮件过滤指示,并由此决定是将邮件送入用户邮箱或者转发到其它地址等。和procmail不同的是,maildrop使用结构化的过滤语言,因此,邮件系统管理员可以开发自己的过滤规则并应用其中。
我们在此将使用maildrop来代替postfix自带的MDA,并以此为基础扩展后文的邮件杀毒和反垃圾邮件功能的调用;在此可能会修改前文中的许多设置,请确保您的设置也做了相应的修改。
1、安装
将courier-authlib的头文件及库文件链接至/usr目录(编译maildrop时会到此目录下找此些相关的文件):
# ln -sv /usr/local/courier-authlib/bin/courierauthconfig /usr/bin
# ln -sv /usr/local/courier-authlib/include/* /usr/include
maildrop需要pcre的支持,因此,接下来将首先安装pcre
# tar jxvf pcre-7.3.tar.bz2
# cd pcre-7.3
# ./configure
# make
# make check
# make install
# groupadd -g 1001 vmail
# useradd -g vmail -u 1001 -M -s /sbin/nologin vmail
# tar jxvf maildrop-2.0.4.tar.bz2
# cd maildrop-2.0.4
# ./configure
--enable-sendmail=/usr/sbin/sendmail
--enable-trusted-users='root vmail'
--enable-syslog=1 --enable-maildirquota
--enable-maildrop-uid=1001
--enable-maildrop-gid=1001
--with-trashquota --with-dirsync
# make
# make install
检查安装结果,请确保有"Courier Authentication Library extension enabled."一句出现:
# maildrop -v
maildrop 2.0.4 Copyright 1998-2005 Double Precision, Inc.
GDBM extensions enabled.
[color=DarkOrange]Courier Authentication Library extension enabled.[/color]
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.
2、新建其配置文件/etc/maildroprc文件,首先指定maildrop的日志记录位置:
# vi /etc/maildroprc
添加:
logfile "/var/log/maildrop.log"
# touch /var/log/maildrop.log
# chown vmail.vmail /var/log/maildrop.log
3、配置Postfix
编辑master.cf
# vi /etc/postfix/master.cf
启用如下两行
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
注意:定义transport的时候,即如上两行中的第二行,其参数行[color=Red]必须以空格开头[/color],否则会出错。
编辑main.cf
# vi /etc/postfix/main.cf
virtual_transport = virtual
修改为:
virtual_transport = maildrop
将下面两项指定的UID和GID作相应的修改:
virtual_uid_maps = static:2525
virtual_gid_maps = static:2525
修改为:
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
4、编辑/etc/authmysqlrc
# vi /etc/authmysqrc
MYSQL_UID_FIELD '2525'
MYSQL_GID_FIELD '2525'
更改为:
MYSQL_UID_FIELD '1001'
MYSQL_GID_FIELD '1001'
[color=Blue]注意:[/color]没有此处的修改,maildrop可能会报告 “signal 0x06”的错误报告。
5、编辑/etc/httpd/httpd.conf,修改运行用户:
如果启用了suexec的功能,则将虚拟主机中指定的
SuexecUserGroup postfix postfix
修改为:
SuexecUserGroup vmail vmail
如果没有使用上面的功能,则修改User和Group指令后的用户为vmail
将前文中的如下项
User postfix
Group postfix
修改为:
User vmail
Group vmail
6、将用户邮件所在的目录/var/mailbox和extman的临时目录/tmp/extman的属主和属组指定为vmail
#chown -R vmail.vmail /var/mailbox
#chown -R vmail.vmail /tmp/extman
接下来重新启动postfix和apache,进行发信测试后,如果日志中的记录类同以下项,则安装成功
Sep 16 12:04:43 Ixor postfix/pipe[14266]: 46B491A5CB: to=<[email]marion@test.com[/email]>, [color=Orange]relay=maildrop[/color], delay=2306, delays=2306/0.04/0/0.07, dsn=2.0.0, [color=DarkOrange]status=sent (delivered via maildrop service)[/color]
[ 本帖最后由 marion 于 2008-7-30 11:21 编辑 ]
marion 回复于:2007-09-06 18:34:19
[color=Blue][size=4]接下来安装反病毒和反垃圾邮件的相关组件clamav、amavisd和SpamAssassin[/size][/color]
[color=Red]ClamAV[/color]是一个unix系统平台上的开源反病毒工具,它是特地为在邮件网关上进行邮件扫描而设计的。整套软件提供了许多的实用工具,包括一个可伸缩和可升级的多线程守护进程、一个命令行扫描工具和病毒库自动升级工具。
[color=Red]SpamAssassin[/color] 是目前最好的、最流行的开源反垃圾邮件软件之一。它是一个邮件过滤器,使用了多种反垃圾邮件技术,如:文本分析、贝叶斯过滤、DNS黑名单和分布式协同过滤数据库等。
[color=Red]amavisd-new[/color]是一个连接MTA和内容检测工具(诸如病毒扫描工具和SpamAssassin)的高性能接口程序,使用perl语言写成。它一般通过SMTP、ESMTP或者LMTP和MTA进行通讯,当然也可以借助于其它外部程序进行。同postfix(MTA)协同工作时表现尤佳。当它呼叫SpamAssassin进行内容过滤时,对于一封邮件只需要呼叫一次,而不管这封邮件将发往多少个收件人;同时,它亦会尽力保证实现每一位收件人的偏好设置,如接收/拒绝,检测/不检测,垃圾邮件级别等;它还会在邮件头部分插入spam相关信息。
十五、安装clamav-0.91.2
最新的clamav-0.91.2需要zlib-1.2.2以上的版本的支持,而RHEL4上的版本为zlib-1.2.1,因此您需要先升级zlib
1、安装zlib-1.2.3
#tar zvxf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure --prefix=/usr --shared
#make
#make test
2、安装clamav-0.91.2
添加ClamAV运行所需的组和用户:
#groupadd clamav
#useradd -g clamav -s /sbin/nologin -M clamav
添加配合amavisd-new使用的用户amavis
#groupadd amavis
#useradd -g amavis -s /sbin/nologin -M amavis
#tar zxvf clamav-0.91.2.tar.gz
#cd clamav-0.91.2
#./configure --prefix=/usr/local/clamav --with-dbdir=/usr/local/clamav/share --sysconfdir=/etc/clamav
#make
#make check
#make install
3、配置Clam AntiVirus:
编辑主配置文件:
#vi /etc/clamav/clamd.conf
注释掉第八行的Example,如下:
# Example
找到如下行
#LogFile /tmp/clamd.log
#PidFile /var/run/clamd.pid
LocalSocket /tmp/clamd.socket
#DatabaseDirectory /var/lib/clamav
#User clamav
修改为:
LogFile /var/log/clamav/clamd.log
PidFile /var/run/clamav/clamd.pid
LocalSocket /var/run/clamav/clamd.socket
DatabaseDirectory /usr/local/clamav/share
User amavis
启用以下选项
LogSyslog yes
LogFacility LOG_MAIL
LogVerbose yes
StreamMaxLength 20M (后面的数值应该与邮件服务器允许的最大附件值相一致)
编辑更新进程的配置文件
#vi /etc/clamav/freshclam.conf
注释掉Example,如下:
# Example
找到如下行
#DatabaseDirectory /var/lib/clamav
#UpdateLogFile /var/log/freshclam.log
PidFile /var/run/freshclam.pid
分别修改为:
DatabaseDirectory /usr/local/clamav/share
UpdateLogFile /var/log/clamav/freshclam.log
PidFile /var/run/clamav/freshclam.pid
启用以下选项:
DatabaseMirror db.XY.clamav.net (这里也可以把XY改成您的国家代码来实现,比如,我们用cn来代替)
LogSyslog yes
LogFacility LOG_MAIL
LogVerbose yes
4、建立日志所在的目录、进程与socket所在的目录,并让它属于clamav用户:
# mkdir -v /var/log/clamav
# chown -R amavis.amavis /var/log/clamav
# mkdir -v /var/run/clamav
# chmod 700 /var/run/clamav
# chown -R amavis.amavis /var/run/clamav
建立freshlog的日志文件
#touch /var/log/clamav/freshclam.log
#chown clamav.clamav /var/log/clamav/freshclam.log
5、配置crontab,让Clam AntiVirus每小时检测一次新的病毒库:
# crontab -e
添加:
37 * * * * /usr/local/clamav/bin/freshclam
6、配置库文件搜索路径:
# echo “/usr/local/clamav/lib” >> /etc/ls.so.conf
# ldconfig -v
7、配置clamav开机自动启动
# cp contrib/init/RedHat/clamd /etc/rc.d/init.d/clamd
# cp contrib/init/RedHat/clamav-milter /etc/rc.d/init.d/clamav-milter
# chkconfig --add clamd
# chkconfig --add clamav-milter
# chkconfig --level 2345 clamd on
# chkconfig --level 2345 clamav-milter on
编辑/etc/rc.d/init.d/clamd,将服务进程的路径指向刚才的安装目录
#vi /etc/rc.d/init.d/clamd
找到如下行
progdir="/usr/local/sbin"
修改为:
progdir="/usr/local/clamav/sbin"
启动clamd
#service clamd start
十六、安装Spamassassin-3.2.3 [color=Red](2007.9.19新增)[/color]
1、依赖关系的解决,安装Spamassassin需要很多perl模块的支持,以下是所需模块列表及安装方法;
必须的软件包:
Digest::SHA1
HTML::Parser
Net::DNS
LWP (aka libwww-perl)
HTTP::Date
IO::Zlib
Archive::Tar
可选的软件包,其中有些后面的amavisd也有可能会用到:
MIME::Base64
DB_File
Net::SMTP
Mail::SPF
IP::Country::Fast
Net::Ident
IO::Socket::INET6
IO::Socket::SSL
Compress::Zlib
Time::HiRes
Mail::DKIM
Mail::DomainKeys
DBI *and* DBD driver/modules
Encode::Detect
Apache::Test
Razor2
推荐使用CPAN自动安装(你的主机要能连上Internet),它能够自动下载安装,并能解决安装过程中的依赖关系。您可以使用类同的以下的命令来进行安装:
#perl -MCPAN -e shell
cpan> [color=Lime]install Digest::SHA1[/color]
………………
如果您的主机无法直接连接到Internet,您也可以到http://search.cpan.org上搜索下载所需要的软件包,而后使用类同的下列命令安装:
#tar zxvf 软件包.tar.gz
#cd 软件包
#perl Makefile.PL
#make
#make test
#make install
说明:某些软件包安装的过程中可能需要已经列出的其它软件包的支持(可以先尝试安装Spamassassin,然后按提示补充所需软件包),请安照提示自行调整安装顺序。另外,其中有个软件包安装过程中可能要求声明环境变量LC_ALL,此时,可输入如下命令,并重新进行软件包的编译安装即可。
#export LC_ALL=C
2、安装Spamassassin-3.2.3
#tar jxvf Mail-SpamAssassin-3.2.3.tar.bz2
#cd Mail-SpamAssassin-3.2.3
#perl Makefile.PL
#make
#make check
#make istall
3、编辑主配置文件/etc/mail/spamassassin/local.cf
required_hits 10.0
rewrite_subject 1
required_score 5.0
rewrite_header Subject *****SPAM*****
report_safe 1
use_bayes 1
bayes_auto_learn 1
skip_rbl_checks 1
use_razor2 0
use_pyzor 0
ok_locales all
4、测试spamassassin
#spamassassin -t < sample-nonspam.txt > nonspam.out
#spamassassin -t < sample-spam.txt > spam.out
查看测试结果:
#less nonspam.out
#less spam.out
5、检查配置文件
#spamassassin -d --lint
6、启动进程,并将其加入到自动启动队列
#/usr/bin/spamd -d
#echo "/usr/bin/spamd -d" >> /etc/rc.local
十七、安装amavisd-new-2.5.2
1、依赖关系的解决
以下为官方声明所必须的软件包列表,你可以采用类同安装Spamassassin一节中的perl模块的安装方法进行安装
Archive::Zip (Archive-Zip-x.xx) (1.14 or later should be used!)
Compress::Zlib (Compress-Zlib-x.xx) (1.35 or later)
Convert::TNEF (Convert-TNEF-x.xx)
Convert::UUlib (Convert-UUlib-x.xxx) (1.08 or later, stick to new versions!)
MIME::Base64 (MIME-Base64-x.xx)
MIME::Parser (MIME-Tools-x.xxxx) (latest version from CPAN - currently 5.420)
Mail::Internet (MailTools-1.58 or later have workarounds for Perl 5.8.0 bugs)
Net::Server (Net-Server-x.xx) (version 0.88 finally does setuid right)
Digest::MD5 (Digest-MD5-x.xx) (2.22 or later)
IO::Stringy (IO-stringy-x.xxx)
Time::HiRes (Time-HiRes-x.xx) (use 1.49 or later, older can cause problems)
Unix::Syslog (Unix-Syslog-x.xxx)
BerkeleyDB with bdb library 3.2 or later (4.2 or later preferred)
2、安装amavisd-new-2.5.2
创建运行时目录,并赋予amavis用户(前文中所建)
# mkdir -pv /var/amavis/{tmp,var,db,home}
# chown -R amavis:amavis /var/amavis
#chmod -R 750 /var/amavis
#tar zxvf amavisd-new-2.5.2.tar.gz
#cd amavisd-new-2.5.2
拷贝服务端至$PATH中指定的目录,推荐拷贝至/usr/local/sbin:
#cp amavisd /usr/local/sbin/
#chown root /usr/local/sbin/amavisd
#chmod 755 /usr/local/sbin/amavisd
拷贝主配置文件至/etc,并修改相应的权限:
#cp amavisd.conf /etc
# chown root:amavis /etc/amavisd.conf
# chmod 640 /etc/amavisd.conf
创建amavisd运行中所需要的隔离区域:
# mkdir -v /var/virusmails
# chown amavis:amavis /var/virusmails/
# chmod 750 /var/virusmails/
3、编辑主配置文件
#vi /etc/amavisd.conf
确保您的如下选项的值如下文所示:
$daemon_user = 'amavis';
$daemon_group = 'amavis';
$mydomain = 'benet.org'; (此处可更改为您集体的域)
$virus_admin = "postmaster\@$mydomain";
$mailfrom_notify_admin = "postmaster\@$mydomain";
$mailfrom_notify_recip = "postmaster\@$mydomain";
$mailfrom_notify_spamadmin = "postmaster\@$mydomain";
$mailfrom_to_quarantine = '';
virus_admin_maps => ["postmaster\@$mydomain"] (指定报告病毒和垃圾邮件时发送系统邮件的用户身份)
spam_admin_maps => ["postmaster\@$mydomain"]
启用ClamAV,(大概在第355行)去掉如下行前的注释符:
#['ClamAV-clamd',
# \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
# qr/\bOK$/, qr/\bFOUND$/,
# qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
# ['Mail::ClamAV', \&ask_clamav, "*", [0], [1], qr/^INFECTED: (.+)/],
并将如上行中的/var/run/clamav/clamd修改为:/var/run/clamav/clamd.socket
4、测试启动
#/usr/local/sbin/amavisd
您也可以按如下命令调试启动
#/usr/local/sbin/amavisd debug
5、修改postfix的配置,让它能调用amavisd,以实现病毒及垃圾邮件的过滤
#vi /etc/postfix/master.cf
在文末添加如下内容:
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
#
amavisfeed unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
#
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
-o local_header_rewrite_clients=
说明:注意每行“-o”前的空格;
#vi /etc/postifx/main.cf
在文末添加如下行:
content_filter=amavisfeed:[127.0.0.1]:10024
4、让postfix重新加载主配置文件,并查看启动情况
# postfix reload && tail -f /var/log/maillog
5、查看amavisd是否在监听10024端口,并测试服务启动情况:
# telnet localhost 10024
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 [127.0.0.1] ESMTP amavisd-new service ready
EHLO localhost
250-[127.0.0.1]
250-VRFY
250-PIPELINING
250-SIZE
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250 XFORWARD NAME ADDR PROTO HELO
Quit
221 2.0.0 [127.0.0.1] amavisd-new closing transmission channel
Connection closed by foreign host.
6、postfix重新加载配置文件后将授权并激活"127.0.0.1:10025"端口,一个正常的服务连接应该类同下面所示:
# telnet localhost 10025
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 Welcome to our mail.benet.org ESMTP,Warning: Version not Available
EHLO localhost
250-mail.benet.org
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
7、通过amavisd测试发信
]# telnet localhost 10024
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 [127.0.0.1] ESMTP amavisd-new service ready
HELO localhost
250 [127.0.0.1]
MAIL FROM:<>
250 2.1.0 Sender <> OK
RCPT TO:<postmaster>
250 2.1.5 Recipient <postmaster> OK
DATA
354 End data with <CR><LF>.<CR><LF>
From:Anti-Virus tester
To: MailServer Admin
Subject:amavisd test!
amavisd test!!
.
250 2.0.0 Ok: queued as 263FC1A609
quit
221 2.0.0 [127.0.0.1] amavisd-new closing transmission channel
Connection closed by foreign host.
接下来使用root用户测试收信
# mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N 1 Anti-Virus tester Wed Sep 19 01:19 23/798 "amavisd test!"
& 1
Message 1:
From MAILER-DAEMON Wed Sep 19 01:19:16 2007
X-Original-To: postmaster
Delivered-To: [email]postmaster@benet.org[/email]
X-Quarantine-ID: <3gmvpc8RxPtn>
X-Virus-Scanned: amavisd-new at benet.org
X-Amavis-Alert: BAD HEADER, MIME error: error: unexpected end of header
From:Anti-Virus tester
To: MailServer Admin
Subject:amavisd test!
Date: Wed, 19 Sep 2007 01:19:15 +0800 (CST)
amavisd test!!
&
十八、测试使用反病毒及反垃圾模块
1、病毒邮件发送测试
登录extmail,发送带有病毒附件的邮件(病毒样本文件后文附有),查看发送情况:
# tail -3 /var/log/clamav/clamd.log
Reading databases from /usr/local/clamav/share
Database correctly reloaded (148100 signatures)
/var/amavis/tmp/amavis-20070918T225935-28502/parts/p002: Trojan.Downloader.Delf-747 FOUN
#tail -15 /var/log/maillog
Sep 18 23:36:40 mail postfix/pickup[28925]: 8C1681A609: uid=1001 from=<[email]marion@test.com[/email]>
Sep 18 23:36:40 mail postfix/cleanup[29002]: 8C1681A609: message-id=<[email]20070918153640.8C1681A609@mail.benet.org[/email]>
Sep 18 23:36:40 mail postfix/qmgr[28924]: 8C1681A609: from=<[email]marion@test.com[/email]>, size=83658, nrcpt=1 (queue active)
Sep 18 23:36:43 mail clamd[28473]: /var/amavis/tmp/amavis-20070918T225935-28502/parts/p002: Trojan.Downloader.Delf-747 FOUND
Sep 18 23:36:44 mail postfix/smtpd[29011]: connect from mail[127.0.0.1]
Sep 18 23:36:44 mail postfix/smtpd[29011]: CDF9B1A602: client=mail[127.0.0.1]
Sep 18 23:36:44 mail postfix/cleanup[29002]: CDF9B1A602: message-id=<[email]VA7mnx1DHavOWC@mail.benet.org[/email]>
Sep 18 23:36:44 mail postfix/smtpd[29011]: disconnect from mail[127.0.0.1]
Sep 18 23:36:44 mail postfix/qmgr[28924]: CDF9B1A602: from=<[email]postmaster@benet.org[/email]>, size=2230, nrcpt=1 (queue active)
Sep 18 23:36:44 mail amavis[28502]: (28502-05) Blocked INFECTED (Trojan.Downloader.Delf-747), <[email]marion@test.com[/email]> -> <[email]marion@test.com[/email]>, quarantine: virus-7mnx1DHavOWC, Message-ID: <[email]20070918153640.8C1681A609@mail.benet.org[/email]>, mail_id: 7mnx1DHavOWC, Hits: -, size: 83658, 4203 ms
Sep 18 23:36:45 mail postfix/smtp[29006]: 8C1681A609: to=<[email]marion@test.com[/email]>, relay=127.0.0.1[127.0.0.1]:10024, delay=4.7, delays=0.42/0.05/0.12/4.1, dsn=2.7.0, status=sent (250 2.7.0 Ok, discarded, id=28502-05 - VIRUS: Trojan.Downloader.Delf-747)
Sep 18 23:36:45 mail postfix/qmgr[28924]: 8C1681A609: removed
Sep 18 23:36:45 mail postfix/local[29014]: CDF9B1A602: to=<[email]root@benet.org[/email]>, orig_to=<[email]postmaster@benet.org[/email]>, relay=local, delay=0.28, delays=0.12/0.09/0/0.07, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 18 23:36:45 mail postfix/qmgr[28924]: CDF9B1A602: removed
说明:此附件中带有特洛伊病毒,请不要作为危害别人之用,而对于您的操作不慎而给您带来的后果,作者不负任何责任;病毒样本如下:
[attach]213887[/attach]
2、垃圾邮件测试
登录extmail,新建一封邮件,拷贝以下内容作为邮件正文,并查看发送情况:
This is the GTUBE, the
Generic
Test for
Unsolicited
Bulk
Email
If your spam filter supports it, the GTUBE provides a test by which you
can verify that the filter is installed correctly and is detecting incoming
spam. You can send yourself a test mail containing the following string of
characters (in upper case and with no white spaces and line breaks):
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X
查看发送结果:
#tail -15 /var/log/maillog
Sep 19 00:04:07 mail spamd[29060]: logger: removing stderr method
Sep 19 00:04:11 mail spamd[29062]: rules: meta test FM_DDDD_TIMES_2 has dependency 'FH_HOST_EQ_D_D_D_D' with a zero score
Sep 19 00:04:11 mail spamd[29062]: rules: meta test FM_SEX_HOSTDDDD has dependency 'FH_HOST_EQ_D_D_D_D' with a zero score
Sep 19 00:04:11 mail spamd[29062]: rules: meta test HS_PHARMA_1 has dependency 'HS_SUBJ_ONLINE_PHARMACEUTICAL' with a zero score
Sep 19 00:04:11 mail spamd[29062]: spamd: server started on port 783/tcp (running version 3.2.3)
Sep 19 00:04:12 mail spamd[29062]: spamd: server pid: 29062
Sep 19 00:04:12 mail spamd[29062]: spamd: server successfully spawned child process, pid 29064
Sep 19 00:04:12 mail spamd[29062]: spamd: server successfully spawned child process, pid 29065
Sep 19 00:04:12 mail spamd[29062]: prefork: child states: II
Sep 19 00:06:44 mail postfix/pickup[28925]: E37651A60E: uid=1001 from=<[email]marion@test.com[/email]>
Sep 19 00:06:44 mail postfix/cleanup[29073]: E37651A60E: message-id=<[email]20070918160643.E37651A60E@mail.benet.org[/email]>
Sep 19 00:06:45 mail postfix/qmgr[28924]: E37651A60E: from=<[email]marion@test.com[/email]>, size=1041, nrcpt=1 (queue active)
Sep 19 00:07:01 mail amavis[28502]: (28502-06) Blocked SPAM, <[email]marion@test.com[/email]> -> <[email]marion@test.com[/email]>, quarantine: spam-7ui+Zpn7-M00.gz, Message-ID: <[email]20070918160643.E37651A60E@mail.benet.org[/email]>, mail_id: 7ui+Zpn7-M00, Hits: 1004.576, size: 1040, 12805 ms
Sep 19 00:07:01 mail postfix/smtp[29079]: E37651A60E: to=<[email]marion@test.com[/email]>, relay=127.0.0.1[127.0.0.1]:10024, delay=18, delays=1.8/1.5/4.9/9.9, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=28502-06, DISCARD(bounce.suppressed))
Sep 19 00:07:01 mail postfix/qmgr[28924]: E37651A60E: removed
[color=Blue][size=4]待续……[/size][/color]
[size=4][color=Blue]:好消息:在518、519、520、523、524楼,柳拂风朋友对本文做了大量扩充,建议朋友们参照![/color][/size]
[color=Blue][size=3]在701、702楼,zenglingping朋友对本文做了不少的扩充,建议朋友们参照。[/size][/color]
[ 本帖最后由 marion 于 2008-7-23 10:13 编辑 ]
soe.rar
liwei6998 回复于:2007-09-07 16:00:34
高人,非常感谢,真诚期待未完的部分!!!
marion 回复于:2007-09-11 15:12:03
杀毒和防垃圾邮件的处理模块正测试添加中……
xiaoqi8866 回复于:2007-09-12 11:03:14
好 顶!!!
kexen 回复于:2007-09-12 14:58:17
嗯,是的,建议挂上Mcafee或者clamav 反垃圾邮件当然考虑用用hzq老大的spamlock啦
swh01 回复于:2007-09-12 15:33:49
顶起来
marion 回复于:2007-09-13 09:51:12
嗯,KEXEN兄,请教hzqbbc的spamlock您是否在使用?效果想来应该不错吧?
flash520 回复于:2007-09-13 13:23:12
以上的方法在CentOS5上面适用吗?
marion 回复于:2007-09-13 14:21:46
适用于CentOS5,我已经在上面搭建了一个出来……
liheng 回复于:2007-09-14 09:18:25
引用:SYS_MAILDIR_BASE = /home/domains
此处即为您在前文所设置的用户邮件的存放目录,可改作:
SYS_MAILDIR_BASE = /var/www/mail
这里是不是应该设置为 /var/spool/mail ?
引用:SYS_MYSQL_USER = db_user
SYS_MYSQL_PASS = db_pass
以上两句句用来设置连接数据库服务器所使用用户名、密码和邮件服务器用到的数据库,这里修改为:
SYS_MYSQL_USER = postfix
SYS_MYSQL_PASS = 123456
这个 user 与 pass 的值是不是随便设就可以的?
[ 本帖最后由 liheng 于 2007-9-14 09:23 编辑 ]
marion 回复于:2007-09-14 09:46:59
回楼上的兄弟,你提出的正是本文中的错误。谢了。
那个的确应该是/var/spool/mail
还有,那个用户名和密码应该分别是extmail和extmail,这是修改过程中的遗留问题!
liheng 回复于:2007-09-14 18:49:56
marion 老兄,能不能帮我看一下,我的是什么问题
http://bbs.chinaunix.net/viewthread.php?tid=991122&page=1&extra=page%3D1#pid7353077
为了这个问题,都弄了半个月啦,抓狂啊
marion 回复于:2007-09-14 23:31:42
MYSQL_USERNAME extamail
这个是你写文档时错的,还是本来就错了?
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
这个好像跟你后文建立文件时指定的路径不同;
另外,我大略的看了一遍你的安装文档,也没有看出什么漏洞出来。建议你去看看:
1、本地域是否跟虚拟域重名了;
2、我不知道你的虚拟域是如何建立的,如果是通过extman的话,建议去看看postfix用户对/var/mailbox是否有完全访问权限;
希望对你有所帮助,也欢迎你再来帖子讨论修改后的结果。
liheng 回复于:2007-09-15 08:47:24
引用:MYSQL_USERNAME extamail
这个是你写文档时错的,还是本来就错了?
这个是输入时错误,后来改过来了
引用:virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
这个好像跟你后文建立文件时指定的路径不同;
这个问题我还真没有发现,谢谢 marion 兄为我指出来。
有个问题我不太明白
本地域是否是指 mydomain 所指定的参数?
我在 extman 中是新建了一个域名为 test.com 的,不会是这两个有冲突吧?还请 marion 为我解惑,谢谢啦
liheng 回复于:2007-09-15 09:53:39
引用:SYS_MYSQL_USER = webman
SYS_MYSQL_PASS = webman
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
说明部分见Extmail安装部分,此处可修改为:
YS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_SOCKET = /tmp/mysql.sock
又是我的一点错误,这里我没有改成 extmail,刚刚又检查了一下,我将 /etc/postfix/main.cf 中的mydomain 和 myorigin 参数注释掉了,可以用 web 收发邮件,但在outlook 上依然不能收发邮件,而且很奇怪的是 telnet localhost 25 & telnet localhost 110 都不通过
dnnljexk 回复于:2007-09-15 11:24:27
可以说明一下每个包的作用吗???
marion 回复于:2007-09-15 18:17:16
引用:
……本地域是否是指 mydomain 所指定的参数?
我在 extman 中是新建了一个域名为 test.com 的, ...
你的猜测是正确的;当二者同时存在时,所有的信将被发往本地系统的相应的用户了……
marion 回复于:2007-09-15 18:20:03
引用:……我将 /etc/postfix/main.cf 中的mydomain 和 myorigin 参数注释掉了,可以用 web 收发邮件,但在outlook 上依然不能收发邮件,而且很奇怪的是 ...
不知道你是否为outlook启用了使用认证的功能,如果没有的话,我想,问题应该就在这里了;如果已经启用,仍不能发信,那你把使用outlook连接后不成功的日志部分发上来,我帮你看看。希望对你有所帮助……
liheng 回复于:2007-09-17 00:14:55
引用:Sep 16 23:23:04 redhat postfix/local[16201]: 2F5253F9B2: to=<[email]postmaster@test.com[/email]>, orig_to=<postmaster>, relay=local, delay=301, delays=300/0.15/0/0.13, dsn=4.3.0, status=deferred (alias database unavailable)
Sep 16 23:28:04 redhat postfix/qmgr[16185]: 4C1DE3F565: from=<[email]double-bounce@mail.test.com[/email]>, size=694, nrcpt=1 (queue active)
Sep 16 23:28:04 redhat postfix/qmgr[16185]: 2F5253F9B2: from=<[email]double-bounce@mail.test.com[/email]>, size=721, nrcpt=1 (queue active)
Sep 16 23:28:04 redhat postfix/trivial-rewrite[16212]: warning: do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
Sep 16 23:28:04 redhat postfix/local[16215]: warning: lookup owner-postmaster, NIS domain test, map mail.aliases: internal yp server or client error
Sep 16 23:28:04 redhat postfix/local[16214]: warning: lookup owner-postmaster, NIS domain test, map mail.aliases: internal yp server or client error
Sep 16 23:28:04 redhat postfix/local[16215]: 2F5253F9B2: to=<[email]postmaster@test.com[/email]>, orig_to=<postmaster>, relay=local, delay=601, delays=600/0.1/0/0.1, dsn=4.3.0, status=deferred (alias database unavailable)
Sep 16 23:28:04 redhat postfix/local[16214]: 4C1DE3F565: to=<[email]postmaster@mail.test.com[/email]>, orig_to=<postmaster>, relay=local, delay=1017, delays=1016/0.13/0/0.16, dsn=4.3.0, status=deferred (alias database unavailable)
Sep 16 23:28:38 redhat postfix/postfix-script[16225]: refreshing the Postfix mail system
Sep 16 23:28:38 redhat postfix/master[15903]: reload configuration /etc/postfix
telnet localhost 25 成功,
telnet localhost 110 失败,提示 chdir maildir failed
在 extmail 上不能可以发邮件,但不能收。
在 outlook 上不能收发邮件,在 outlook 上无论是开启认证和不开启 论证都不行
liheng 回复于:2007-09-17 00:15:52
还请 marion 兄帮小弟看一下,谢谢啦:)
liheng 回复于:2007-09-17 00:16:40
哦,对了,配置完全是按照你所提供的方法做的,所以配置文件我就不贴了。
liheng 回复于:2007-09-17 00:36:51
而且我用 mailq 命令查看邮件队列,可以看到队列里有邮件,就是没有发出去,郁闷。
marion 回复于:2007-09-17 10:18:22
Sep 16 23:28:04 redhat postfix/local[16214]: 4C1DE3F565: to=<[email]postmaster@mail.test.com[/email]>, orig_to=<postmaster>, relay=local, delay=1017, delays=1016/0.13/0/0.16, dsn=4.3.0, status=deferred (alias database unavailable)
Sep 16 23:28:38 redhat postfix/postfix-script[16225]: refreshing the Postfix mail system
Sep 16 23:28:38 redhat postfix/master[15903]: reload configuration /etc/postfix
别名文件找不到,你是否执行了newaliases命令?
或者查看一下你指定的路径是否正确。
marion 回复于:2007-09-17 10:21:45
telnet localhost 110 失败,提示 chdir maildir failed
这个应该是你的设置没有权限访问邮箱所在的目录,请检查一下你指定的访问者,以及权限设置。
在 extmail 上不能可以发邮件,但不能收。
这个原因跟上述问题应该是同一个原因造成的。你应该把邮箱目录的所有者指定为httpd服务的运行者或者使用suexec,建议你再认真看一下文档,并渐次排查问题。
liheng 回复于:2007-09-17 14:27:39
newaliases 命令是执行了的,也产生了aliases.db 文件
邮箱所在的目录的属主是 用户 postfix
marion 回复于:2007-09-17 15:02:26
请确信邮箱目录内的文件也属于postfix用户,同时也应该再去检查一下你的别名文件的设置,包括用户别名和域别名文件。
liheng 回复于:2007-09-17 15:08:44
引用:Sep 17 14:22:49 redhat postfix/smtpd[3369]: connect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: warning: unknown[192.168.0.145]: SASL LOGIN authentication failed: authentication failure
Sep 17 14:22:49 redhat postfix/smtpd[3369]: lost connection after AUTH from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: disconnect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: connect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: warning: unknown[192.168.0.145]: SASL LOGIN authentication failed: authentication failure
Sep 17 14:22:49 redhat postfix/smtpd[3369]: lost connection after AUTH from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: disconnect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: connect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: warning: unknown[192.168.0.145]: SASL LOGIN authentication failed: authentication failure
Sep 17 14:22:49 redhat postfix/smtpd[3369]: lost connection after AUTH from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: disconnect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: connect from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: warning: unknown[192.168.0.145]: SASL LOGIN authentication failed: authentication failure
Sep 17 14:22:49 redhat postfix/smtpd[3369]: lost connection after AUTH from unknown[192.168.0.145]
Sep 17 14:22:49 redhat postfix/smtpd[3369]: disconnect from unknown[192.168.0.145]
Sep 17 14:24:40 redhat postfix/qmgr[3270]: 6A5613F588: from=<[email]test@test.com[/email]>, size=506, nrcpt=1 (queue active)
Sep 17 14:24:40 redhat postfix/trivial-rewrite[3378]: warning: do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
Sep 17 14:24:40 redhat postfix/local[3380]: warning: lookup bob, NIS domain test, map mail.aliases: internal yp server or client error
Sep 17 14:24:40 redhat postfix/local[3380]: 6A5613F588: to=<[email]bob@test.com[/email]>, relay=local, delay=526, delays=526/0.1/0/0.06, dsn=4.3.0, status=deferred (alias database unavailable)
又仔细看了一下,还是没有发现什么问题?
liheng 回复于:2007-09-17 15:09:36
邮箱目录内的所有文件都属于 postfix
liheng 回复于:2007-09-17 15:30:11
marion 兄,已经可以实现 web 收发邮件,只是还不能够用 outlook 收发邮件
liheng 回复于:2007-09-17 15:46:36
marion 兄,我将 /etc/postfix/main.cf 文件内的 mydestination 和 mynetworks 两个参数注释掉后,瑞在可以用 outlook 发邮件,但是却不能收,outlook 错误提示:
[ 本帖最后由 liheng 于 2007-9-17 15:53 编辑 ]
liheng 回复于:2007-09-17 15:51:20
看来还是 chdir maildir failed 的问题。
但我的服务器上,邮件存放目录确实是存在 maildir 的,之前我用 postfixadmin 做的时候,怎么样都没法生成 maildir 格式的路径, postfixadmin 生成的路径格式是:/var/mailbox/test.com/test/ [color=Red](注: /var/mailbox 是指定的邮箱存放目录)[/color]
我现在用 extmail 生成的 maildir 格式是:/var/mailbox/test.com/test/Maildir
之前用 postfixadmin 提示是 chdir maildir failed 错误,我就认了,因为确实没有生成指定的格式,但我现在用 extmail 生成了指定的格式,为什么还会提示这样的错误呢?郁闷,
而且 邮箱存放目录下的文件所有者都是 postfix ,权限都是600,有写的权限应该来说就可以了吧
[ 本帖最后由 liheng 于 2007-9-17 15:52 编辑 ]
marion 回复于:2007-09-17 16:01:53
do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
这里说无论是本地域还是虚拟域都找不到你指向的test.com,请检查配置。
SASL LOGIN authentication failed: authentication failure
这里说你的SASL_LOGIN认证失败,请检查sasl的安装,以及postfix中指定的认证选项。
alias database unavailable
这里说找不到别名文件,请检查你的配置文件中别名文件的指向,以及它们是否存在。
这些都是问题……
marion 回复于:2007-09-17 16:10:21
再使用outlook发信一次,把相关日志发上来。
这里的问题不是认证没有通过的话,就应该还是权限的问题。再去看看courier-imap的相关设置。
liheng 回复于:2007-09-17 16:39:54
引用:do not list domain test.com in BOTH mydestination and virtual_mailbox_domains
这里说无论是本地域还是虚拟域都找不到你指向的test.com,请检查配置。
这个问题已经解决,将 mydestination 注释或设置为空即可,见:http://www.extmail.org/forum/viewthread.php?tid=5694&extra=page%3D1%26amp%3Bfilter%3Dtype%26amp%3Btypeid%3D1&page=1
引用:SASL LOGIN authentication failed: authentication failure
这里说你的SASL_LOGIN认证失败,请检查sasl的安装,以及postfix中指定的认证选项。 应该不存在 sasl 验证的问题,因为我 telnet localhost 25 成功,而且在 outlook 里发信成功,我是勾了我的服务器发送需要验证这一项的。
引用:alias database unavailable
这里说找不到别名文件,请检查你的配置文件中别名文件的指向,以及它们是否存在。
这个应该还是虚拟域与本地域相冲突导致,我的机器名与 /etc/postfix/main.cf 文件里的 myhostname 设置的不一样,可能是这个引起的。
liheng 回复于:2007-09-17 16:45:29
引用:Sep 17 16:04:56 redhat pop3d: chdir Maildir: No such file or directory
Sep 17 16:04:57 redhat pop3d: Connection, ip=[192.168.0.145]
Sep 17 16:04:57 redhat pop3d: chdir Maildir: No such file or directory
Sep 17 16:17:40 redhat postfix/smtpd[4481]: connect from unknown[192.168.0.145]
Sep 17 16:17:40 redhat postfix/smtpd[4481]: 434823F583: client=unknown[192.168.0.145], sasl_method=LOGIN, sasl_username=test@test.com
Sep 17 16:17:40 redhat postfix/cleanup[4488]: 434823F583: message-id=<007101c7f906$8135b890$9100a8c0@xp>
Sep 17 16:17:40 redhat postfix/qmgr[4275]: 434823F583: from=<[email]test@test.com[/email]>, size=1395, nrcpt=1 (queue active)
Sep 17 16:17:40 redhat postfix/smtpd[4481]: disconnect from unknown[192.168.0.145]
Sep 17 16:17:40 redhat postfix/virtual[4490]: 434823F583: to=<[email]test@test.com[/email]>, relay=virtual, delay=0.22, delays=0.15/0.05/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
Sep 17 16:17:40 redhat postfix/qmgr[4275]: 434823F583: removed
我刚刚在 outlook 发邮件的 maillog,
我在 outlook 收邮件的时候,就提示:
引用:Sep 17 16:04:56 redhat pop3d: chdir Maildir: No such file or directory
Sep 17 16:04:57 redhat pop3d: Connection, ip=[192.168.0.145]
Sep 17 16:04:57 redhat pop3d: chdir Maildir: No such file or directory
Sep 17 16:17:40 redhat postfix/smtpd[4481]: connect from unknown[192.168.0.145]
marion 回复于:2007-09-17 17:07:19
如果使用webmail可以收发邮件,但outlook就能发却不能收,这应该是没有道理的。
不知道有没有其他人遇到过这样的情况。我这里只能凭猜测了。
你把mydestination和myorigion的值启用并改为其它域名试试……
另外,如果你的系统中的确有test用户的话,也建议先关闭他。
liheng 回复于:2007-09-17 17:18:32
不行,在 outlook 里一接受邮件,就会弹出一个对话框,要输入用户名和密码
看来我还遇到了一个大问题,这很好
liheng 回复于:2007-09-17 17:19:06
另,我的系统中压根就不存在 test 这个用户
marion 回复于:2007-09-17 17:29:55
先说明,这不是什么大问题,可能仅仅是你某个设置的问题。这是一个有些繁杂的系统,中间可能会因为输入不慎等各种情况而出现许多难以预料的问题。希望你对整个安装过程以及所涉及到的操作是理解的。
建议认真查看一下认证模块是否正常,尤其是courier-imap能否正常使用认证功能。个人觉得问题应该在于SASL的认证模块。
liheng 回复于:2007-09-17 17:30:00
是啊,我也觉得很奇怪,为什么 web 收发没有任何问题,而 outlook 就是不行呢?
liheng 回复于:2007-09-17 22:33:19
marion 兄,我可能已经找到 chdri maildir failed 错误的原因啦
可能是我更改 /usr/local/courier-authlib/etc/authlib/authmysqlrc 文件有空格引起,我消除这个错误,再测试,现在的错误是:
引用:Sep 17 22:06:45 redhat pop3d: authentication error: Input/output error
Sep 17 22:06:47 redhat pop3d: Connection, ip=[192.168.0.145]
Sep 17 22:06:47 redhat pop3d: LOGIN FAILED, user=test@test.com, ip=[192.168.0.145]
Sep 17 22:06:47 redhat pop3d: authentication error: Input/output error
Sep 17 22:06:47 redhat pop3d: Connection, ip=[192.168.0.145]
Sep 17 22:06:47 redhat pop3d: LOGIN FAILED, user=test@test.com, ip=[192.168.0.145]
Sep 17 22:06:47 redhat pop3d: authentication error: Input/output error
Sep 17 22:06:48 redhat pop3d: Connection, ip=[192.168.0.145]
Sep 17 22:06:48 redhat pop3d: LOGIN FAILED, user=test@yoyo.com, ip=[192.168.0.145]
Sep 17 22:06:48 redhat pop3d: authentication error: Input/output error
liheng 回复于:2007-09-17 22:46:01
marion 老兄,我终于找到问题了,
成功啦,成功啦,现在终于可以在 outlook 上收发邮件了
marion 回复于:2007-09-17 22:54:30
祝贺你!
说出你的问题和解决办法,供后来者参考吧。
liheng 回复于:2007-09-17 23:19:51
其实问题的根源很简单,就是出在 authmysqlrc 文件里头,这个文件要求还真严格,一点空格都不能有,就因为有一个空格,导致无法识别 maildir,
1.出现authentication error: Input/output error错误的时候
估计是查询mysql时,authdaemond出错了。具体要打开authdaemonrc里的:
DEBUG_LOGIN=2 原来默认是0
然后看看/var/log/message或/var/log/maillog 在认证失败时有什么提示。根据提示去检查问题到底出在哪儿
后面的问题就好解决了
liheng 回复于:2007-09-18 00:20:20
非常感谢 marion 老兄一直以来对我的热心帮助,没有你的热心帮助,我想我没有这么快找到问题,谢谢:)
titus0719 回复于:2007-09-18 12:09:16
我安装的extman登录界面无法显示校验码,应该怎么处理呢?
marion 回复于:2007-09-18 12:50:51
校验码需要perl-GD模块的支持。
如果想简单,到这里下一个适合你的系统平台的perl-GD包,而后安装即可。
http://dries.ulyssis.org/rpm/packages/perl-GD/info.html
如下:
[attach]213737[/attach]
[ 本帖最后由 marion 于 2007-9-18 13:00 编辑 ]
liheng 回复于:2007-09-18 15:50:56
引用:Sep 18 15:39:55 test pop3d: Connection, ip=[192.168.101.224]
Sep 18 15:39:55 test authdaemond: received auth request, service=pop3, authtype=login
Sep 18 15:39:55 test authdaemond: authmysql: trying this module
Sep 18 15:39:55 test authdaemond: SQL query: SELECT username, password, "", '503', '503', '/var/mailbox/', concat('/var/mailbox/',Maildir), "", name, "" FROM mailbox WHERE username = "test"
Sep 18 15:39:55 test pop3d: LOGIN FAILED, user=test, ip=[192.168.101.224]
Sep 18 15:39:55 test authdaemond: zero rows returned
Sep 18 15:39:55 test authdaemond: no password available to compare
Sep 18 15:39:55 test authdaemond: authmysql: REJECT - try next module
Sep 18 15:39: authdaemond: FAIL, all modules rejected
Sep 18 15:40:00 test pop3d: Disconnected, ip=[192.168.101.224
这个问题怎么解决?不想重新装。
[ 本帖最后由 liheng 于 2007-9-18 15:55 编辑 ]
liheng 回复于:2007-09-18 15:54:04
引用:原帖由 titus0719 于 2007-9-18 12:09 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7366050&ptid=987344]
我安装的extman登录界面无法显示校验码,应该怎么处理呢?
最简单的方法,不要校验码,听说那个核验码还比较麻烦,我就将它去掉了,
在 webman.cf 将 SYS_CAPTCHA_ON=0 即可,记得要重启 Apache 哦
marion 回复于:2007-09-18 18:30:50
Sep 18 15:39:55 test pop3d: LOGIN FAILED, [color=DarkOrange]user=test[/color], ip=[192.168.101.224]
恐怕是这儿的问题,你尝试指定全名,即形如“[email]user@domain.ltd[/email]”试试。
marion 回复于:2007-09-18 19:12:20
引用:原帖由 liheng 于 2007-9-18 15:54 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7367646&ptid=987344]
最简单的方法,不要校验码,听说那个核验码还比较麻烦,我就将它去掉了,
在 webman.cf 将 SYS_CAPTCHA_ON=0 即可,记得要重启 Apache 哦
如果在实际使用中,这个决非上策。其实,即便是修改这个,也用不着重启apache的,刷新一下页面就OK了。
[ 本帖最后由 marion 于 2007-9-18 21:04 编辑 ]
liheng 回复于:2007-09-18 23:11:31
引用:原帖由 marion 于 2007-9-18 18:30 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7368567&ptid=987344]
Sep 18 15:39:55 test pop3d: LOGIN FAILED, user=test, ip=[192.168.101.224]
恐怕是这儿的问题,你尝试指定全名,即形如“[email]user@domain.ltd[/email]”试试。
marion 兄,我猜想也是这里的问题,刚开始还没反映过来,还没想明白应该在哪里改。刚刚终于想通了。
事后经过确认确实也是这里的问题,
解决方法:
在 outlook 里的帐号名写全([email]test@test.com[/email])就OK了,marion 兄,你真棒:em02:
liheng 回复于:2007-09-18 23:13:08
顺便现问一下 marion 兄,那有没有办法,不用写全也行的呢?
marion 回复于:2007-09-19 01:15:57
终于写完了,可以长出一口气了!
我会不断的修正和完善此文,欢迎各位继续测试使用和点评!
loveflag 回复于:2007-09-19 16:10:20
楼主,什么也不说了。 潜心搜藏研究。
绝对是网络上最新,最全面的中文架设邮件服务器的笔记了。
赞楼主一个
loveflag 回复于:2007-09-20 12:34:34
[root@localhost init.d]# service postfix restart
关闭 postfix: [确定]
启动 postfix: [确定]
[root@localhost init.d]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
[root@localhost init.d]#
[root@localhost init.d]# vim /etc/postfix/main.cf
myhostname = mail.loveflag.cn
myorigin = loveflag.cn
mydomain = loveflag.cn
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 192.168.0.249/24, 127.0.0.0/8
为何?25端口没有连上呢?
marion 回复于:2007-09-20 13:24:45
mynetworks = 192.168.0.249/24
这一个写作这样,恐怕不太合适吧。
另,你应该把相关日志的内容发上来。
loveflag 回复于:2007-09-20 14:15:03
楼主,我是新手。能否告诉我下,把哪里的日志帖上来。 我的网络环境是内网。
marion 回复于:2007-09-20 14:18:26
引用:原帖由 loveflag 于 2007-9-20 14:15 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7378216&ptid=987344]
楼主,我是新手。能否告诉我下,把哪里的日志帖上来。 我的网络环境是内网。
重新telnet 25号端口一次,而后把/var/log/maillog日志的最新出现的内容贴上来,可以借鉴以下命令:
#tail -20 /var/log/mail
loveflag 回复于:2007-09-20 14:26:39
[root@localhost ~]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.loveflag.cn ESMTP Postfix
ehlo mail.loveflag.cn
250-mail.loveflag.cn
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:root@loveflag.cn
250 2.1.0 Ok
rcpt to:pieradmin@loveflag.cn
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject:Mail test!
Mail test!@!!!
.
250 2.0.0 Ok: queued as 1F2E1145CA0
quit
221 2.0.0 Bye
Connection closed by foreign host.
[root@localhost ~]#
marion 回复于:2007-09-20 15:24:17
这个表示已经发送了,你再检查一下日志看一下结果
zhushuyun 回复于:2007-09-21 13:53:44
好全面的东西, 好呀 收下了 谢谢了!:em02: :em02: :em02: :em02: :em02: :em02: :em02: :em02: :em02:
marion 回复于:2007-09-24 21:35:11
本来近日想把SSL应用的部分加上,看来要等几天了,被snort的项目的耽搁了。仍然待续吧:mrgreen: ……
liwei6998 回复于:2007-09-25 16:09:11
marion ,高手,牛人,向marion 表示由衷的感谢!!!
marion 回复于:2007-09-26 22:12:55
楼上的兄弟,多承谬赞,共同学习吧……
惠繪洋 回复于:2007-09-27 13:55:59
請教樓主..
我跟著做暫時還沒有出現什麼大錯誤. 先謝過.
但現在我有一個問題想請問, 我這台機並沒有一個固定域名的. 如你的 benet.org, 我現在整個環境都是在內網完成的. 而在裝到 extmail, 我就把 extmail 的httpd.conf 設定如下:
<VirtualHost *:80>
ServerName mail.xxx.com
ServerAlias 192.168.0.191
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /webmail/cgi /var/www/extsuite/extmail/cgi
Alias /webmail /var/www/extsuite/extmail/html
</VirtualHost>
但當輸入 http://192.168.0.191/webmail/ 時, 就出現
403 Forbidden
You don't have permission to access / on this server.
這台服務器日後會在內網運行, 以port forward 在firewall 後運作的. 請指教.
謝謝.
[ 本帖最后由 惠繪洋 于 2007-9-27 13:59 编辑 ]
Intranet 回复于:2007-09-27 15:31:35
有没有这些软件打包下载?
CentOS 5 安装的时候都装哪些包?
fuleru 回复于:2007-09-27 16:03:35
我在编译courier-imap遇到了些问题,请问是什么原因?
Making all in tcpd
make[2]: Entering directory `/root/postfix/courier-imap-4.1.3/tcpd'
make all-am
make[3]: Entering directory `/root/postfix/courier-imap-4.1.3/tcpd'
Linking couriertls
./.libs/libcouriertls.a(libcouriertls.o)(.text+0xd52): In function `tls_create':
/root/postfix/courier-imap-4.1.3/tcpd/libcouriertls.c:590: undefined reference to `SSL_CTX_sess_set_new_cb'
./.libs/libcouriertls.a(libcouriertls.o)(.text+0xd63):/root/postfix/courier-imap-4.1.3/tcpd/libcouriertls.c:591: undefined reference to `SSL_CTX_sess_set_get_cb'
./.libs/libcouriertls.a(libcouriertls.o)(.text+0xd74):/root/postfix/courier-imap-4.1.3/tcpd/libcouriertls.c:592: undefined reference to `SSL_CTX_sess_set_remove_cb'
collect2: ld returned 1 exit status
make[3]: *** [couriertls] Error 1
make[3]: Leaving directory `/root/postfix/courier-imap-4.1.3/tcpd'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/postfix/courier-imap-4.1.3/tcpd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/postfix/courier-imap-4.1.3'
make: *** [all] Error 2
这与ssl有关么?
marion 回复于:2007-09-27 17:52:48
[color=Red]回fuleru,[/color]
你的问题应该是因为编译安装的openssl的头文件链接指定问题。默认情况下,courier-imap编译时到/usr/include下查找openssl的头文件,你检查一下并确保新装的openssl头文件的链接是指向的新版本应该可以解决这个问题。
[ 本帖最后由 marion 于 2007-9-27 17:58 编辑 ]
marion 回复于:2007-09-27 17:58:00
这个问题应该是apache目录访问权限的问题,请确保你的apache主配置文件中开放了对/var/www目录的访问权限。你可以通过更改DocumentRoot指令后,及<Directory "/var/www">来实现;
惠繪洋 回复于:2007-09-28 12:27:15
引用:原帖由 marion 于 2007-9-27 17:58 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7411437&ptid=987344]
这个问题应该是apache目录访问权限的问题,请确保你的apache主配置文件中开放了对/var/www目录的访问权限。你可以通过更改DocumentRoot指令后,及来实现;
謝謝.
對. apache 的設定我弄傻了... 現在可以了...
但又有一事想請教. 我在 extman 內新建了一個domain, 在內也加入了user
用extmail 登入, 再寄信給自己時, 就發現不能收信.
查了 maillog 如下:
Sep 28 12:34:54 mail extmail[1957]: user=<[email]danny@mydomain.org[/email]>, client=192.168.80.182, module=login, status=loginok
Sep 28 12:37:04 mail extmail[1965]: user=<[email]danny@mydomain.org[/email]>, client=192.168.80.182, module=login, status=loginok
Sep 28 12:38:27 mail postfix/pickup[1681]: D00A5FA12: uid=2525 from=<[email]danny@mydomain.org[/email]>
Sep 28 12:38:27 mail postfix/cleanup[1994]: D00A5FA12: message-id=<[email]20070928043827.D00A5FA12@mydomain.org[/email]>
Sep 28 12:38:28 mail postfix/qmgr[1682]: D00A5FA12: from=<[email]danny@mydomain.org[/email]>, size=504, nrcpt=1 (queue active)
Sep 28 12:38:28 mail postfix/trivial-rewrite[1996]: warning: do not list domain mydomain.org in BOTH mydestination and virtual_mailbox_domains
Sep 28 12:38:28 mail postfix/local[1999]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 28 12:38:30 mail postfix/local[1999]: D00A5FA12: to=<[email]danny@mydomain.org[/email]>, relay=local, delay=2.5, delays=0.48/0.47/0/1.6, dsn=5.1.1, status=bounced (unknown user: "danny")
Sep 28 12:38:30 mail postfix/cleanup[1994]: 246CBFA17: message-id=<[email]20070928043830.246CBFA17@mydomain.org[/email]>
Sep 28 12:38:30 mail postfix/qmgr[1682]: 246CBFA17: from=<>, size=2240, nrcpt=1 (queue active)
Sep 28 12:38:30 mail postfix/trivial-rewrite[1996]: warning: do not list domain mydomain.org in BOTH mydestination and virtual_mailbox_domains
Sep 28 12:38:30 mail postfix/bounce[2000]: D00A5FA12: sender non-delivery notification: 246CBFA17
Sep 28 12:38:30 mail postfix/qmgr[1682]: D00A5FA12: removed
Sep 28 12:38:30 mail postfix/local[1999]: 246CBFA17: to=<[email]danny@mydomain.org[/email]>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "danny")
Sep 28 12:38:30 mail postfix/qmgr[1682]: 246CBFA17: removed
Sep 28 12:42:09 mail postfix/smtpd[2013]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Sep 28 12:42:09 mail postfix/smtpd[2013]: connect from localhost[127.0.0.1]
Sep 28 12:43:06 mail postfix/trivial-rewrite[2015]: warning: do not list domain mydomain.org in BOTH mydestination and virtual_mailbox_domains
Sep 28 12:43:14 mail postfix/smtpd[2013]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <[email]danny@mydomain.org[/email]>: Recipient address rejected: User unknown in local recipient table; from=<[email]danny@mydomain.org[/email]> to=<[email]danny@mydomain.org[/email]> proto=ESMTP helo=<mydomain.org>
Sep 28 12:46:54 mail postfix/smtpd[2013]: disconnect from localhost[127.0.0.1]
再用 telnet localhost 25 查看
root@mail:/var/spool/mail# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 Welcome to our mydomain.org ESMTP,Warning: Version not Available!
ehlo mydomain.org
250-mydomain.org
250-PIPELINING
250-SIZE 14336000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:danny@mydomain.org
250 2.1.0 Ok
rcpt to:danny@mydomain.org
550 5.1.1 <[email]danny@mydomain.org[/email]>: Recipient address rejected: User unknown in local recipient table
請問這是什麼原因做成的呢. 請指教. 謝謝.
[ 本帖最后由 惠繪洋 于 2007-9-28 12:48 编辑 ]
marion 回复于:2007-09-28 14:59:44
Sep 28 12:38:30 mail postfix/trivial-rewrite[1996]: warning: do not list domain mydomain.org in BOTH mydestination and virtual_mailbox_domains
……
550 5.1.1 <[email]danny@mydomain.org[/email]>: Recipient address rejected: User unknown in local recipient
以上这些应该表明错误的原因是你的postfix配置对于访问mysql数据库不正确而不能检索到相关域的信息造成的;或者你的extman建立的域名没能正确写入数据库也未可知,但前者的可能性更大,请检查一下main.cf文件中设定的对mysql访问的部分。
当然,做这些假设的前提是你的数据库本身配置是正确的。
[ 本帖最后由 marion 于 2007-9-28 15:00 编辑 ]
惠繪洋 回复于:2007-09-28 17:16:46
引用:
以上这些应该表明错误的原因是你的postfix配置对于访问mysql数据库不正确而不能检索到相关域的信息造成的;或者你的extman建立的域名没能正确写入数据库也未可知,但前者的可能性更大,请检查一下main.cf文件中设定的对mysql访问的部分。
当然,做这些假设的前提是你的数据库本身配置是正确的。
謝謝你的指示, 我檢查了 mysql, extmail 內已經有我所開啟的 email address, 所有東西都在, 應該extman 已經正確地和mysql 聯繫.
我也用 extmail 登入 mysql 也可以.
我再查看 postfix 的 /etc/postfix/main.cf 的設置. 由於網域不方便公開, 所以只好用 mydomain.org 代替.
queue_directory = /var/spool/postfix
command_directory = /usr/local/postfix/sbin
daemon_directory = /usr/local/postfix/libexec
mail_owner = postfix
myhostname = mail.mydomain.org
mydomain = mydomain.org
myorigin = mydomain.org
inet_interfaces = all
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = /var/www/html/postfix_html
manpage_directory = /usr/local/postfix/man
sample_directory = /etc/postfix
readme_directory = no
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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
virtual_mailbox_base = /var/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:2525
virtual_gid_maps = static:2525
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
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 Tidy your mailbox and try again later.
virtual_overquota_bounce = yes
我也查看過
/etc/postfix/mysql_virtual_alias_maps.cf
/etc/postfix/mysql_virtual_domains_maps.cf
/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
/etc/postfix/mysql_virtual_mailbox_maps.cf
入邊的 mysql user, pass, db, table 都正確呢...
但當中發現了一個問題. 在 main.cf 內 virtual_mailbox_base 是指向 /var/mailbox, 但真實的的是 /var/spool/mail 內呢... 這需要更正嗎??
查看了好幾編都找不出問題.. 請樓主幫忙幫忙.. 謝謝你.
marion 回复于:2007-09-28 21:25:42
嗯,应该就是这里的问题了;
让它们统一起来即可,改成哪个由你自己决定。
marion 回复于:2007-10-01 15:19:41
这里所提到的UID和GID,应该是MDA用户的;在前面使用的postfix自带的MDA,故此指定为2525;后面使用了maildrop这个MDA,因此,把其改为了VMAIL用户的UID和GID。
后面的那个确如你所料,第一个和第三个是MYSQL中的字段名;
MYSQLER 回复于:2007-10-02 14:17:55
如果有各个安装包的地址是不是更方便一些:em10:
Intranet 回复于:2007-10-03 13:01:31
[root@mail /]# cp support-files/my-medium.cnf /etc/my.cnf
cp: cannot stat `support-files/my-medium.cnf': No such file or directory
[root@mail mysql-5.0.45]# cp support/mysql.server /etc/rc.d/init.d/mysqld
cp: cannot stat `support/mysql.server': No such file or directory
是下的mysql版本不对吗?
目录下的文件就这些:
:shock: :shock:
[ 本帖最后由 Intranet 于 2007-10-3 13:05 编辑 ]
Intranet 回复于:2007-10-03 13:20:34
为什么出错。
停在那里就不动了。。
[ 本帖最后由 Intranet 于 2007-10-3 13:22 编辑 ]
marion 回复于:2007-10-03 22:26:28
这个不是什么错误,只是调试启动而已;你可以Ctrl+C退出后去掉"-d"选项后重新启动即可。
bigbomb 回复于:2007-10-05 16:02:21
不知道这个版本能不能在机器上真正实现得了,不管怎地,lz的辛勤劳动值得称颂,我顶:em03: :em03: :em03: :em03:
marion 回复于:2007-10-05 17:30:26
我这里有个服务器已经在Internet上用了……
willl32 回复于:2007-10-06 19:52:02
很详细啊! 我准备把sendmail改成postfix,正需要这个文章。谢谢楼主兄弟!
ypxns 回复于:2007-10-07 10:01:00
marion兄,我参照你的文档,在进行POSTFIX验证的时候出现了问题,你能不能帮我看一下!谢谢了!!
http://bbs.chinaunix.net/thread-998862-1-1.html
zdyldy 回复于:2007-10-08 09:31:07
courier-imap-4.1.3.tar.bz2
这个软件包在哪下载啊,
可以把其它的软件包地址都发到上面么?
在网上好多搜不到啊,谢谢了。
zdyldy 回复于:2007-10-08 09:46:41
十一、安装Courier-IMAP
# tar jxvf courier-imap-4.1.3.tar.bz2
# cd courier-imap-4.1.3
./configure
--prefix=/usr/local/courier-imap
--with-redhat
--enable-unicode
--disable-root-check
--with-trashquota
--without-ipv6
请问 --without-ipv6 是什么意思。现在我用的是IP-V4啊,我该怎么写。
marion 回复于:2007-10-08 10:48:37
那个选项是指示你的编译不使用ipv6,如果你没有使用ipv6,加上此选项就可以。
zdyldy 回复于:2007-10-08 12:28:49
courier-imap-4.1.3
Postfix-2.4.5
Mysql-5.0.45
Sasl-2.1.22
clamav-0.91.2
amavisd-new
SpamAssassin-3.2.3
按照你的帖子,可不可以只安装上面7个,下面8个不安装呢,如果可以是不是要做一些改动呢。还有麻烦告诉这些软件包的下载地址好么,我在网上搜不到啊。
DB-4.5.20
Openssl-0.98e
httpd-2.2.4
Php-5.2.3
courier-authlib-0.59.3
Extmail-1.0.2
Extman-0.2.2
maildrop-2.0.4
zdyldy 回复于:2007-10-08 13:06:44
[root@localhost servers]# cd courier-imap-4.1.0
[root@localhost courier-imap-4.1.0]# ./configure --prefix=/usr/local/courier-imap --with-redhat --enable-unicode --disable-root-check --with-trashquota --without-ipv6 CPPFLAGS='-I/usr/local/ssl/include/openssl -I/usr/local/courier-authlib/include' LDFLAGS='-L/usr/local/courier-authlib/lib/courier-authlib' COURIERAUTHCONFIG='/usr/local/courier-authlib/bin/courierauthconfig'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gawk... (cached) gawk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for perl5... no
checking for perl... /usr/bin/perl
checking for sysconftool...... ././sysconftool
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for shl_load... (cached) no
checking for shl_load in -ldld... (cached) no
checking for dlopen... (cached) no
checking for dlopen in -ldl... (cached) yes
checking whether a program can dlopen itself... (cached) yes
checking whether a statically linked program can dlopen itself... (cached) yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for env... /bin/env
checking for courierauthconfig... /usr/local/courier-authlib/bin/courierauthconfig
./configure: line 20078: /usr/local/courier-authlib/bin/courierauthconfig: No such file or directory
./configure: line 20078: test: =: unary operator expected
./configure: line 20085: /usr/local/courier-authlib/bin/courierauthconfig: No such file or directory
[root@localhost courier-imap-4.1.0]# make
make: *** 没有指明目标并且找不到 makefile。 停止。
[root@localhost courier-imap-4.1.0]#
您好,我没找到4.1.3 ,只在网上找到了4.1.0,当我按照你的步骤执行 ./configure 后,再执行make 的时候出现上面的提示,是怎么回事啊。
fish007 回复于:2007-10-09 08:43:08
引用:原帖由 marion 于 2007-9-6 18:31 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7317388&ptid=987344]
本文凝聚了作者不少的安装经验,写出来供各位同仁参考指正,也为自己留一个“备份”,以便以后安装时作为参照!
安装过程中借鉴了不少google出来的文章,是你们先行的足迹为作者今天的成功打下了基础,在此先行 ...
你好,我在用以下命令对courier-authlib-0.5.93进行configure时,进入了循环,无休止地进行下去,不知是何原因,望解答.
./configure
--prefix=/usr/local/courier-authlib
--sysconfdir=/etc
--without-authpam
--without-authldap
--without-authpwd
--without-authshadow
--without-authvchkpw
--without-authpgsql
--with-authmysql
--with-mysql-libs=/usr/local/mysql/lib/mysql
--with-mysql-includes=/usr/local/mysql/inculde/mysql
--with-redhat
--with-authmysqlrc=/etc/authmysqlrc
--with-authdaemonrc=/etc/authdaemonrc
CFLAGS="-march=i686 -O2 -fexpensive-optimizations"
CXXFLAGS="-march=i686 -O2 -fexpensive-optimizations"
fish007 回复于:2007-10-09 08:49:35
引用:原帖由 fish007 于 2007-10-9 08:43 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7441576&ptid=987344]
你好,我在用以下命令对courier-authlib-0.5.93进行configure时,进入了循环,无休止地进行下去,不知是何原因,望解答.
./configure
--prefix=/usr/local/courier-authlib
--sysconfdir=/etc ...
是0.59.3
Intranet 回复于:2007-10-09 15:49:38
引用:DBD-Mysql目前最新的版本为DBD-mysql-4.005,但它和系统中的perl结合使用时会造成extmail无法正常使用,因此我们采用3的版本:
# tar zxvf DBD-mysql-3.0002_4.tar.gz
# cd cd DBD-mysql-3.0002_4
# perl Makefile.PL (此步骤中如果出现类同Can't exec "mysql_config": No such file or directory at Makefile.PL line 76.的错误是因为您的mysql的bin目录没有输出至$PATH环境变量)
...又出错了~~~
CentOS 5下面..
:shock: :shock:
Intranet 回复于:2007-10-09 16:17:12
引用:原帖由 zdyldy 于 2007-10-8 09:31 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7437774&ptid=987344]
courier-imap-4.1.3.tar.bz2
这个软件包在哪下载啊,
可以把其它的软件包地址都发到上面么?
在网上好多搜不到啊,谢谢了。
安装包我这里都有,,,但还是没有安装成功...在CentOS 5上.
ftp1.callleo.cn
user&passwd:cu
liheng 回复于:2007-10-09 17:59:24
marion 兄,我是在安装 maildrop 后发生这样的错误
引用:Oct 9 13:29:50 bv-diannao-004 maildrop[13037]: Temporary authentication failure.
Oct 9 13:29:50 bv-diannao-004 postfix/pipe[13036]: 45DFE11CEE5: to=<[email]test@test.com[/email]>, relay=maildrop, delay=0.25, delays=0.1/0.05/0/0.1, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/local/bin/maildrop: Temporary authentication failure.
邮件可以发出去,但却接受不了。
引用:Oct 9 17:23:36 bv-diannao-004 pop3d: authentication error: Input/output error
Oct 9 17:23:36 bv-diannao-004 authdaemond: failed to connect to mysql server (server=localhost, userid=extmail..): Access denied for user 'extmail..'@'localhost' (using password: YES)
Oct 9 17:23:36 bv-diannao-004 authdaemond: authmysql: TEMPFAIL - no more modules will be tried
不知道是哪里设置错误了,我也弄不清楚怎么会显示这个,操作步骤与你所写的相同
引用:(server=localhost, userid=extmail..): Access denied for user 'extmail..'@'localhost'
怎么会成这个样子?
还请 marion 指点一二
marion 回复于:2007-10-09 20:56:20
checking for courierauthconfig... /usr/local/courier-authlib/bin/courierauthconfig
./configure: line 20078: /usr/local/courier-authlib/bin/courierauthconfig: No such file or directory
./configure: line 20078: test: =: unary operator expected
./configure: line 20085: /usr/local/courier-authlib/bin/courierauthconfig: No such file or directory
以上几句表明你指向的/usr/local/courier-authlib/bin/courierauthconfig路径不对,或者是文件不存在。请确信你的courier-authlib已经正确安装,并将以下项的值改为其所在你的系统中的路径:
COURIERAUTHCONFIG='/usr/local/courier-authlib/bin/courierauthconfig'
marion 回复于:2007-10-09 21:00:21
不知道你所所谓的无休止大概run了多长时间,或者能不能提供更多的信息过来。不过,如果你的硬件体系不是i686的话,最好将如下两个选项去掉:
CFLAGS="-march=i686 -O2 -fexpensive-optimizations"
CXXFLAGS="-march=i686 -O2 -fexpensive-optimizations"
marion 回复于:2007-10-09 21:05:02
CentOS5的安装光盘上找到并安装 perl-DBI 这个rpm包应该可以解决这个问题……
marion 回复于:2007-10-09 21:11:07
Oct 9 17:23:36 bv-diannao-004 authdaemond: failed to connect to mysql server (server=localhost, userid=extmail..): Access denied for user 'extmail..'@'localhost' (using password: YES)
这里表明你所指定的extmail无法正常访问mysql数据库,你可以去查看一下authmysqlrc文件中的相关设置是否正确,即确保你的extmail用户以权限访问mysql;
如果仍然无法通过验正,你打开authdaemon的相关日志选项,并将登录后的报错信息发上来,我帮你排查一下。
marion 回复于:2007-10-09 21:16:59
引用:安装包我这里都有,,,但还是没有安装成功...在CentOS 5上.
ftp1.callleo.cn
user&passwd:cu
谢兄之高义,我正为难怎么把这些软件包共享出来呢,因为下地址我也没有记录,如果一个个的去重新找一遍也不是件小的工程……
liheng 回复于:2007-10-10 09:45:28
marion 兄,这个已是我将 authdaemonrc 中的 debug_login=2 的 maillog 了引用:Oct 9 17:23:36 bv-diannao-004 pop3d: authentication error: Input/output error
Oct 9 17:23:36 bv-diannao-004 authdaemond: failed to connect to mysql server (server=localhost, userid=extmail..): Access denied for user 'extmail..'@'localhost' (using password: YES)
Oct 9 17:23:36 bv-diannao-004 authdaemond: authmysql: TEMPFAIL - no more modules will be tried
liheng 回复于:2007-10-10 10:00:27
此问题已经解决,是 authmysqlrc 中的 MYSQL_USERNAEM 中的值输入错误:em16:
liheng 回复于:2007-10-10 10:38:56
引用:Oct 9 13:29:50 bv-diannao-004 maildrop[13037]: Temporary authentication failure.
Oct 9 13:29:50 bv-diannao-004 postfix/pipe[13036]: 45DFE11CEE5: to=<[email]test@test.com[/email]>, relay=maildrop, delay=0.25, delays=0.1/0.05/0/0.1, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/local/bin/maildrop: Temporary authentication failure.
marion 老兄,不知道这个是什么原因
liheng 回复于:2007-10-10 11:05:57
试过重新编译 authlib,在编译 authlib 时加上了 --with-mailuser & --with-mailgroup 参数,但还是不行.
xiangxiaobao 回复于:2007-10-10 11:07:15
Oct 10 11:02:36 linux-89 postfix/smtpd[12546]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Oct 10 11:02:36 linux-89 postfix/smtpd[12546]: connect from mail.3gpp.com.cn[59.151.37.12]
Oct 10 11:02:36 linux-89 postfix/smtpd[12546]: 18B901C1C5: client=mail.3gpp.com.cn[59.151.37.12]
Oct 10 11:02:36 linux-89 postfix/cleanup[12552]: 18B901C1C5: message-id=<011c01c80ae9$f862a050$ca01a8c0@96DA6A8BDAF141B>
Oct 10 11:02:36 linux-89 postfix/qmgr[12544]: 18B901C1C5: from=<[email]xiangqian@3gpp.com.cn[/email]>, size=1620, nrcpt=1 (queue active)
Oct 10 11:02:36 linux-89 postfix/smtpd[12546]: disconnect from mail.3gpp.com.cn[59.151.37.12]
Oct 10 11:02:36 linux-89 postfix/virtual[12554]: 18B901C1C5: to=<[email]t1@3gpp.net.cn[/email]>, relay=virtual, delay=0.13, delays=0.08/0/0/0.04, dsn=4.2.0, status=deferred (delivery failed to mailbox /var/mailbox/987/735/t1@3gpp.net.cn: cannot open file: Is a directory)
请问,这是什么原因,都有这些目录,权限也都对!
junger 回复于:2007-10-10 16:04:58
你好!我在你用postfix做的邮件服务器注册的账户,126、163可以向它发信,但不能向163、126发信,并返回
一封标题为Undelivered Mail Returned to Sender邮件,是由 [email]MAILER-[email]DAEMON@mail.xxx.com[/email][/email] (Mail Delivery System)发出,内容是This is the mail system at host mail.xxx.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[email]xxx@126.com[/email]>: connect to 127.0.0.1[127.0.0.1]: Connection refused
希望给解决一下,如果忙给我发邮件或Q我,也行。
我的QQ是648700854.
[ 本帖最后由 junger 于 2007-10-11 08:37 编辑 ]
marion 回复于:2007-10-10 20:39:21
delivery failed to mailbox /var/mailbox/987/735/t1@3gpp.net.cn: cannot open file: Is a directory
这个表明MDA期望[email]t1@3gpp.net.cn[/email]应该为一个文件,但给出的却是目录。
建议再去检查一下有关/var/mailbox的设置。
marion 回复于:2007-10-10 20:44:52
引用:原帖由 liheng 于 2007-10-10 10:38 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7446794&ptid=987344]
marion 老兄,不知道这个是什么原因
把debug的级别指定为"1"吧,让信息再详细些,然后发上来日志。
marion 回复于:2007-10-10 20:48:13
我好久没去看过那个服务器了,那只是一个朋友测试性的服务器,关于你提到的问题我会抽时间去看看。不过,好像这会儿是不在线的。
:em02:
[ 本帖最后由 marion 于 2007-10-11 09:39 编辑 ]
cnhawk386 回复于:2007-10-11 08:17:05
1、编辑/etc/postfix/main.cf,添加如下内容:
########################Virtual Mailbox Settings########################
virtual_mailbox_base = /var/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:2525
virtual_gid_maps = static:2525
我的问题:virtual_uid_maps为什么 要使用postfix uid 2525 ,由什么决定的,看另外一份资料好像不是使用的postfix uid,这里使用什么的uid到底由什么决定.谢谢
marion 回复于:2007-10-11 09:36:20
virtual mailbox的相关文件必须有相关的属主和属组;通常情况下,POP/IMAP 服务器使用自己的帐户,因此,所有mailbox的相关文件必须属于此用户;当然,如果需要,postfix允许管理员配置自己所需要的帐户。这可以通过多种途径来指定:每个邮箱可以分别属于不同的用户,一个域内所有的域也可以属于同一个用户。
vitrual_uid_maps和virtual_gid_maps就是用来指定虚拟邮箱投递邮件时用到的用户和组帐户。管理员可以指定所有的虚拟邮箱属于同一个系统用户,这时使用static map类型。因此,如果此时你使用postfix默认的MDA,并打算使用同一个系统用户来实现投递,那么就需要按文档中所示的来指定了。如果你配置了另外的MDA,并指定了不同于前面的系统用户,这里就需要将其指向这个新MDA的用户了。
[ 本帖最后由 marion 于 2007-10-11 09:37 编辑 ]
asia_ji 回复于:2007-10-11 12:27:18
按照您http://marion.cublog.cn的“RHEL4上搭建基于postfix的全功能邮件服务器”文章,我在redhat as4.0服务器上构建了postfix的邮件系统,现在已经进行到 maildrop 安装完毕。除了个别软件安装路径和SYS_MAILDIR_BASE设置的路径不同之外,完全按照您的步骤进行的。现在登陆web,添加了一个虚拟域(和实际的域名相同),并注册了用户后,可以给任何的邮箱发送邮件,对方也能正常接收到。但是始终无法接收别的邮箱发送过来的邮件。看了一下论坛上的回帖,我发现发过来的邮件被系统内的用户接收了。而不是虚拟域注册的邮箱。
现在注释掉/etc/postfix/main.cf下的mydestination项,依然无法收到邮件。
下面把配置文件和日志贴出来,请您帮忙找出问题的所在,谢谢!!!
日志:
[root@mail ~]# more /var/log/messages
Oct 11 11:27:35 mail postfix/smtpd[3457]: sql_select option missing
Oct 11 11:27:35 mail postfix/smtpd[3457]: auxpropfunc error no mechanism available
Oct 11 11:27:46 mail postfix/smtpd[3476]: sql_select option missing
Oct 11 11:27:46 mail postfix/smtpd[3476]: auxpropfunc error no mechanism available
Oct 11 11:30:22 mail postfix/smtpd[3480]: sql_select option missing
Oct 11 11:30:22 mail postfix/smtpd[3480]: auxpropfunc error no mechanism available
Oct 11 11:32:38 mail postfix/smtpd[3500]: sql_select option missing
Oct 11 11:32:38 mail postfix/smtpd[3500]: auxpropfunc error no mechanism available
Oct 11 11:36:17 mail postfix/smtpd[3515]: sql_select option missing
Oct 11 11:36:17 mail postfix/smtpd[3515]: auxpropfunc error no mechanism available
Oct 11 11:44:20 mail postfix/smtpd[3557]: sql_select option missing
Oct 11 11:44:20 mail postfix/smtpd[3557]: auxpropfunc error no mechanism available
Oct 11 11:47:16 mail postfix/smtpd[3571]: sql_select option missing
Oct 11 11:47:16 mail postfix/smtpd[3571]: auxpropfunc error no mechanism available
Oct 11 11:57:09 mail postfix/smtpd[3599]: sql_select option missing
Oct 11 11:57:09 mail postfix/smtpd[3599]: auxpropfunc error no mechanism available
Oct 11 12:01:01 mail crond(pam_unix)[3616]: session opened for user root by (uid=0)
Oct 11 12:01:01 mail crond(pam_unix)[3616]: session closed for user root
Oct 11 12:03:40 mail postfix/smtpd[3628]: sql_select option missing
Oct 11 12:03:40 mail postfix/smtpd[3628]: auxpropfunc error no mechanism available
Oct 11 12:05:32 mail postfix/smtpd[3633]: sql_select option missing
Oct 11 12:05:32 mail postfix/smtpd[3633]: auxpropfunc error no mechanism available
Oct 11 12:17:15 mail postfix/smtpd[3668]: sql_select option missing
Oct 11 12:17:15 mail postfix/smtpd[3668]: auxpropfunc error no mechanism available
[root@mail ~]# more /var/log/maillog
Oct 11 11:26:10 mail postfix/anvil[3446]: statistics: max connection rate 1/60s for (smtp:219.134.120.24
) at Oct 11 11:22:46
Oct 11 11:26:10 mail postfix/anvil[3446]: statistics: max connection count 1 for (smtp:219.134.120.24) a
t Oct 11 11:22:46
Oct 11 11:26:10 mail postfix/anvil[3446]: statistics: max cache size 1 at Oct 11 11:22:46
Oct 11 11:27:35 mail postfix/smtpd[3457]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:27:40 mail postfix/smtpd[3457]: warning: 59.36.111.108: hostname 108.111.36.59.broad.dg.gd.dyn
amic.163data.com.cn verification failed: Name or service not known
Oct 11 11:27:40 mail postfix/smtpd[3457]: connect from unknown[59.36.111.108]
Oct 11 11:27:41 mail postfix/qmgr[3259]: 75A3A26B1B: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1320, nrcpt=1 (qu
eue active)
Oct 11 11:27:41 mail postfix/qmgr[3259]: 8230526B17: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1307, nrcpt=1 (qu
eue active)
Oct 11 11:27:41 mail postfix/qmgr[3259]: 44A3D26B0E: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1320, nrcpt=1 (qu
eue active)
Oct 11 11:27:41 mail maildrop[3465]: Temporary authentication failure.
Oct 11 11:27:41 mail maildrop[3467]: Temporary authentication failure.
Oct 11 11:27:41 mail postfix/pipe[3461]: 75A3A26B1B: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=496, dela
ys=496/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maildr
op: Temporary authentication failure. )
Oct 11 11:27:41 mail postfix/pipe[3464]: 8230526B17: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=1095, del
ays=1095/0.02/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:27:41 mail maildrop[3473]: Temporary authentication failure.
Oct 11 11:27:41 mail postfix/pipe[3461]: 44A3D26B0E: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=2379, del
ays=2379/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:27:46 mail postfix/smtpd[3457]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:27:46 mail postfix/smtpd[3457]: NOQUEUE: reject: RCPT from unknown[59.36.111.108]: 554 5.7.1 <
[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]d0769000@126.com[/email]> to=<[email]master@dlfhw.com[/email]> proto=ESMTP helo=<
126.com>
Oct 11 11:27:46 mail postfix/smtpd[3476]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:27:46 mail postfix/smtpd[3476]: warning: 219.136.103.177: hostname 177.103.136.219.broad.gz.gd
.dynamic.163data.com.cn verification failed: Name or service not known
Oct 11 11:27:46 mail postfix/smtpd[3476]: connect from unknown[219.136.103.177]
Oct 11 11:27:46 mail postfix/smtpd[3457]: disconnect from unknown[59.36.111.108]
Oct 11 11:27:47 mail postfix/smtpd[3476]: NOQUEUE: reject: RCPT from unknown[219.136.103.177]: 450 4.1.8
<[email]dv1re65h7@df486.com[/email]>: Sender address rejected: Domain not found; from=<[email]dv1re65h7@df486.com[/email]> to=<master
@dlfhw.com> proto=ESMTP helo=<df486.com>
Oct 11 11:27:48 mail postfix/smtpd[3476]: disconnect from unknown[219.136.103.177]
Oct 11 11:30:22 mail postfix/smtpd[3480]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:30:22 mail postfix/smtpd[3480]: connect from web92013.mail.cnb.yahoo.com[203.209.230.60]
Oct 11 11:30:22 mail postfix/smtpd[3480]: C307326B1F: client=web92013.mail.cnb.yahoo.com[203.209.230.60]
Oct 11 11:30:22 mail postfix/cleanup[3486]: C307326B1F: message-id=<[email]756667.1137.qm@web92013.mail.cnb.yah[/email]
oo.com>
Oct 11 11:30:22 mail postfix/qmgr[3259]: C307326B1F: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1299, nrcpt=1 (qu
eue active)
Oct 11 11:30:22 mail maildrop[3489]: Temporary authentication failure.
Oct 11 11:30:22 mail postfix/pipe[3488]: C307326B1F: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=0.22, del
ays=0.2/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maild
rop: Temporary authentication failure. )
Oct 11 11:30:22 mail postfix/smtpd[3480]: disconnect from web92013.mail.cnb.yahoo.com[203.209.230.60]
Oct 11 11:30:37 mail postfix/smtpd[3480]: connect from 133.201.204.121.board.xm.fj.dynamic.163data.com.c
n[121.204.201.133]
Oct 11 11:30:41 mail postfix/smtpd[3480]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:30:41 mail postfix/smtpd[3480]: NOQUEUE: reject: RCPT from 133.201.204.121.board.xm.fj.dynamic
.163data.com.cn[121.204.201.133]: 554 5.7.1 <[email]fhxx@dlfhw.com[/email]>: Relay access denied; from=<[email]cchdxmj@yahoo.c[/email]
om.cn> to=<[email]fhxx@dlfhw.com[/email]> proto=ESMTP helo=<hvixczce.gov>
Oct 11 11:30:41 mail postfix/smtpd[3480]: lost connection after RCPT from 133.201.204.121.board.xm.fj.dy
namic.163data.com.cn[121.204.201.133]
Oct 11 11:30:41 mail postfix/smtpd[3480]: disconnect from 133.201.204.121.board.xm.fj.dynamic.163data.co
m.cn[121.204.201.133]
Oct 11 11:32:38 mail postfix/smtpd[3500]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:32:41 mail postfix/smtpd[3500]: connect from web92003.mail.cnb.yahoo.com[203.209.230.50]
Oct 11 11:32:41 mail postfix/smtpd[3500]: 2F61226B23: client=web92003.mail.cnb.yahoo.com[203.209.230.50]
Oct 11 11:32:41 mail postfix/cleanup[3506]: 2F61226B23: message-id=<[email]984579.99809.qm@web92003.mail.cnb.ya[/email]
hoo.com>
Oct 11 11:32:41 mail postfix/qmgr[3259]: 2F61226B23: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1304, nrcpt=1 (qu
eue active)
Oct 11 11:32:41 mail maildrop[3509]: Temporary authentication failure.
Oct 11 11:32:41 mail postfix/pipe[3508]: 2F61226B23: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=0.22, del
ays=0.2/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maild
rop: Temporary authentication failure. )
Oct 11 11:32:41 mail postfix/smtpd[3500]: disconnect from web92003.mail.cnb.yahoo.com[203.209.230.50]
Oct 11 11:33:22 mail postfix/smtpd[3500]: connect from 219-81-165-94.dynamic.tfn.net.tw[219.81.165.94]
Oct 11 11:33:24 mail postfix/smtpd[3500]: NOQUEUE: reject: RCPT from 219-81-165-94.dynamic.tfn.net.tw[21
9.81.165.94]: 504 5.5.2 <61.189.86.45>: Helo command rejected: need fully-qualified hostname; from=<hhuy
[email]yuirw@msa.hinet.net[/email]> to=<[email]all9988@gmail.com[/email]> proto=SMTP helo=<61.189.86.45>
Oct 11 11:33:27 mail postfix/smtpd[3500]: lost connection after RCPT from 219-81-165-94.dynamic.tfn.net.
tw[219.81.165.94]
Oct 11 11:33:27 mail postfix/smtpd[3500]: disconnect from 219-81-165-94.dynamic.tfn.net.tw[219.81.165.94
]
Oct 11 11:36:17 mail postfix/smtpd[3515]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:36:17 mail postfix/smtpd[3515]: connect from unknown[116.24.117.105]
Oct 11 11:36:24 mail postfix/smtpd[3515]: NOQUEUE: reject: RCPT from unknown[116.24.117.105]: 504 5.5.2
<admin888>: Helo command rejected: need fully-qualified hostname; from=<[email]m5l7n8k4@microsoft.com[/email]> to=<mast
[email]er@dlfhw.com[/email]> proto=SMTP helo=<admin888>
Oct 11 11:36:26 mail postfix/smtpd[3515]: disconnect from unknown[116.24.117.105]
Oct 11 11:36:42 mail postfix/smtpd[3515]: warning: 218.20.0.141: hostname 141.0.20.218.broad.gz.gd.dynam
ic.163data.com.cn verification failed: Name or service not known
Oct 11 11:36:42 mail postfix/smtpd[3515]: connect from unknown[218.20.0.141]
Oct 11 11:36:43 mail postfix/smtpd[3515]: NOQUEUE: reject: RCPT from unknown[218.20.0.141]: 504 5.5.2 <b
ee>: Helo command rejected: need fully-qualified hostname; from=<[email]good.star.1@gmail.com[/email]> to=<[email]fhxx@dlfhw.c[/email]
om> proto=ESMTP helo=<bee>
Oct 11 11:36:58 mail postfix/smtpd[3515]: lost connection after DATA from unknown[218.20.0.141]
Oct 11 11:36:58 mail postfix/smtpd[3515]: disconnect from unknown[218.20.0.141]
Oct 11 11:36:58 mail postfix/smtpd[3515]: warning: 218.20.0.141: hostname 141.0.20.218.broad.gz.gd.dynam
ic.163data.com.cn verification failed: Name or service not known
Oct 11 11:36:58 mail postfix/smtpd[3515]: connect from unknown[218.20.0.141]
Oct 11 11:36:59 mail postfix/smtpd[3515]: NOQUEUE: reject: RCPT from unknown[218.20.0.141]: 504 5.5.2 <b
ee>: Helo command rejected: need fully-qualified hostname; from=<[email]good.star.1@gmail.com[/email]> to=<[email]fhxx@dlfhw.c[/email]
om> proto=ESMTP helo=<bee>
Oct 11 11:37:14 mail postfix/smtpd[3515]: lost connection after DATA from unknown[218.20.0.141]
Oct 11 11:37:14 mail postfix/smtpd[3515]: disconnect from unknown[218.20.0.141]
Oct 11 11:37:40 mail postfix/anvil[3459]: statistics: max connection rate 2/60s for (smtp:218.20.0.141)
at Oct 11 11:36:58
Oct 11 11:37:40 mail postfix/anvil[3459]: statistics: max connection count 1 for (smtp:59.36.111.108) at
Oct 11 11:27:40
Oct 11 11:37:40 mail postfix/anvil[3459]: statistics: max cache size 2 at Oct 11 11:27:46
Oct 11 11:37:41 mail postfix/qmgr[3259]: 75A3A26B1B: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1320, nrcpt=1 (qu
eue active)
Oct 11 11:37:41 mail postfix/qmgr[3259]: 2F61226B23: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1304, nrcpt=1 (qu
eue active)
Oct 11 11:37:41 mail postfix/qmgr[3259]: DE8D826B13: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1325, nrcpt=1 (qu
eue active)
Oct 11 11:37:41 mail postfix/qmgr[3259]: C307326B1F: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1299, nrcpt=1 (qu
eue active)
Oct 11 11:37:41 mail maildrop[3529]: Temporary authentication failure.
Oct 11 11:37:41 mail postfix/pipe[3527]: 75A3A26B1B: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=1096, del
ays=1096/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:37:41 mail maildrop[3533]: Temporary authentication failure.
Oct 11 11:37:41 mail maildrop[3535]: Temporary authentication failure.
Oct 11 11:37:41 mail postfix/pipe[3528]: 2F61226B23: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=300, dela
ys=300/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maildr
op: Temporary authentication failure. )
Oct 11 11:37:41 mail postfix/pipe[3527]: C307326B1F: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=439, dela
ys=439/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maildr
op: Temporary authentication failure. )
Oct 11 11:37:41 mail maildrop[3539]: Temporary authentication failure.
Oct 11 11:37:41 mail postfix/pipe[3528]: DE8D826B13: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=2346, del
ays=2345/0.03/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:38:36 mail postfix/smtpd[3515]: connect from unknown[122.198.29.62]
Oct 11 11:38:39 mail postfix/smtpd[3515]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:38:39 mail postfix/smtpd[3515]: NOQUEUE: reject: RCPT from unknown[122.198.29.62]: 554 5.7.1 <
[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]dgjkl@kld.com[/email]> to=<[email]master@dlfhw.com[/email]> proto=ESMTP helo=<kld
.com>
Oct 11 11:38:39 mail postfix/smtpd[3515]: disconnect from unknown[122.198.29.62]
Oct 11 11:39:02 mail postfix/smtpd[3515]: connect from mx.mail.china.com[211.99.189.206]
Oct 11 11:39:02 mail postfix/smtpd[3515]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:39:02 mail postfix/smtpd[3515]: NOQUEUE: reject: RCPT from mx.mail.china.com[211.99.189.206]:
554 5.7.1 <[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]iutyu67ht45r18010@mail.china.com[/email]> to=<master@dl
fhw.com> proto=SMTP helo=<mail.china.com>
Oct 11 11:39:03 mail postfix/smtpd[3515]: lost connection after RCPT from mx.mail.china.com[211.99.189.2
06]
Oct 11 11:39:03 mail postfix/smtpd[3515]: disconnect from mx.mail.china.com[211.99.189.206]
Oct 11 11:42:23 mail postfix/anvil[3459]: statistics: max connection rate 1/60s for (smtp:122.198.29.62)
at Oct 11 11:38:36
Oct 11 11:42:23 mail postfix/anvil[3459]: statistics: max connection count 1 for (smtp:122.198.29.62) at
Oct 11 11:38:36
Oct 11 11:42:23 mail postfix/anvil[3459]: statistics: max cache size 2 at Oct 11 11:39:02
Oct 11 11:42:41 mail postfix/qmgr[3259]: 2F61226B23: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1304, nrcpt=1 (qu
eue active)
Oct 11 11:42:41 mail maildrop[3551]: Temporary authentication failure.
Oct 11 11:42:41 mail postfix/pipe[3550]: 2F61226B23: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=600, dela
ys=600/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maildr
op: Temporary authentication failure. )
Oct 11 11:44:20 mail postfix/smtpd[3557]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:44:26 mail postfix/smtpd[3557]: connect from web92008.mail.cnb.yahoo.com[203.209.230.55]
Oct 11 11:44:26 mail postfix/smtpd[3557]: 2B9B026B27: client=web92008.mail.cnb.yahoo.com[203.209.230.55]
Oct 11 11:44:26 mail postfix/cleanup[3564]: 2B9B026B27: message-id=<[email]213426.42753.qm@web92008.mail.cnb.ya[/email]
hoo.com>
Oct 11 11:44:26 mail postfix/qmgr[3259]: 2B9B026B27: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1313, nrcpt=1 (qu
eue active)
Oct 11 11:44:26 mail maildrop[3567]: Temporary authentication failure.
Oct 11 11:44:26 mail postfix/pipe[3566]: 2B9B026B27: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=0.23, del
ays=0.21/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:44:26 mail postfix/smtpd[3557]: disconnect from web92008.mail.cnb.yahoo.com[203.209.230.55]
Oct 11 11:47:16 mail postfix/smtpd[3571]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:47:16 mail postfix/smtpd[3571]: connect from unknown[121.34.192.207]
Oct 11 11:47:34 mail postfix/smtpd[3571]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:47:34 mail postfix/smtpd[3571]: NOQUEUE: reject: RCPT from unknown[121.34.192.207]: 554 5.7.1
<[email]fhxx@dlfhw.com[/email]>: Relay access denied; from=<[email]1234585@163.com[/email]> to=<[email]fhxx@dlfhw.com[/email]> proto=ESMTP helo=<163.
com>
Oct 11 11:47:35 mail postfix/smtpd[3571]: disconnect from unknown[121.34.192.207]
Oct 11 11:47:41 mail postfix/qmgr[3259]: 8230526B17: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1307, nrcpt=1 (qu
eue active)
Oct 11 11:47:41 mail postfix/qmgr[3259]: C307326B1F: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1299, nrcpt=1 (qu
eue active)
Oct 11 11:47:41 mail maildrop[3579]: Temporary authentication failure.
Oct 11 11:47:41 mail maildrop[3582]: Temporary authentication failure.
Oct 11 11:47:41 mail postfix/pipe[3575]: 8230526B17: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=2295, del
ays=2295/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:47:41 mail postfix/pipe[3578]: C307326B1F: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=1038, del
ays=1038/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:50:55 mail postfix/anvil[3559]: statistics: max connection rate 1/60s for (smtp:203.209.230.55
) at Oct 11 11:44:26
Oct 11 11:50:55 mail postfix/anvil[3559]: statistics: max connection count 1 for (smtp:203.209.230.55) a
t Oct 11 11:44:26
Oct 11 11:50:55 mail postfix/anvil[3559]: statistics: max cache size 1 at Oct 11 11:44:26
Oct 11 11:52:41 mail postfix/qmgr[3259]: 2B9B026B27: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1313, nrcpt=1 (qu
eue active)
asia_ji 回复于:2007-10-11 12:29:12
Oct 11 11:52:41 mail postfix/qmgr[3259]: 2F61226B23: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1304, nrcpt=1 (qu
eue active)
Oct 11 11:52:41 mail maildrop[3590]: Temporary authentication failure.
Oct 11 11:52:41 mail postfix/pipe[3589]: 2B9B026B27: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=495, dela
ys=495/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/maildr
op: Temporary authentication failure. )
Oct 11 11:52:41 mail maildrop[3594]: Temporary authentication failure.
Oct 11 11:52:41 mail postfix/pipe[3589]: 2F61226B23: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=1200, del
ays=1200/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:57:09 mail postfix/smtpd[3599]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 11:57:14 mail postfix/smtpd[3599]: warning: 219.133.229.152: hostname 152.229.133.219.broad.sz.gd
.dynamic.163data.com.cn verification failed: Name or service not known
Oct 11 11:57:14 mail postfix/smtpd[3599]: connect from unknown[219.133.229.152]
Oct 11 11:57:16 mail postfix/smtpd[3599]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:57:16 mail postfix/smtpd[3599]: NOQUEUE: reject: RCPT from unknown[219.133.229.152]: 554 5.7.1
<[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]yttdfbvutdtrtrd@avl.com.cn[/email]> to=<[email]master@dlfhw.com[/email]> proto=
ESMTP helo=<avl.com.cn>
Oct 11 11:57:16 mail postfix/smtpd[3599]: disconnect from unknown[219.133.229.152]
Oct 11 11:57:41 mail postfix/qmgr[3259]: 75A3A26B1B: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1320, nrcpt=1 (qu
eue active)
Oct 11 11:57:41 mail maildrop[3607]: Temporary authentication failure.
Oct 11 11:57:41 mail postfix/pipe[3606]: 75A3A26B1B: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=2296, del
ays=2296/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 11:58:20 mail postfix/smtpd[3599]: warning: 121.35.197.57: hostname 57.197.35.121.broad.sz.gd.dyn
amic.163data.com.cn verification failed: Name or service not known
Oct 11 11:58:20 mail postfix/smtpd[3599]: connect from unknown[121.35.197.57]
Oct 11 11:58:23 mail postfix/smtpd[3599]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 11:58:23 mail postfix/smtpd[3599]: NOQUEUE: reject: RCPT from unknown[121.35.197.57]: 554 5.7.1 <
[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]uuo@163.com[/email]> to=<[email]master@dlfhw.com[/email]> proto=ESMTP helo=<163.c
om>
Oct 11 11:58:23 mail postfix/smtpd[3599]: disconnect from unknown[121.35.197.57]
Oct 11 12:01:43 mail postfix/anvil[3601]: statistics: max connection rate 1/60s for (smtp:219.133.229.15
2) at Oct 11 11:57:14
Oct 11 12:01:43 mail postfix/anvil[3601]: statistics: max connection count 1 for (smtp:219.133.229.152)
at Oct 11 11:57:14
Oct 11 12:01:43 mail postfix/anvil[3601]: statistics: max cache size 1 at Oct 11 11:57:14
Oct 11 12:02:41 mail postfix/qmgr[3259]: 2B9B026B27: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1313, nrcpt=1 (qu
eue active)
Oct 11 12:02:41 mail maildrop[3624]: Temporary authentication failure.
Oct 11 12:02:41 mail postfix/pipe[3623]: 2B9B026B27: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=1095, del
ays=1095/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 12:03:40 mail postfix/smtpd[3628]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 12:03:40 mail postfix/smtpd[3628]: warning: 121.34.157.187: hostname 187.157.34.121.broad.sz.gd.d
ynamic.163data.com.cn verification failed: Name or service not known
Oct 11 12:03:40 mail postfix/smtpd[3628]: connect from unknown[121.34.157.187]
Oct 11 12:03:47 mail postfix/smtpd[3628]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 12:03:47 mail postfix/smtpd[3628]: NOQUEUE: reject: RCPT from unknown[121.34.157.187]: 554 5.7.1
<[email]fhxx@dlfhw.com[/email]>: Relay access denied; from=<[email]yuananxiang@tom.com[/email]> to=<[email]fhxx@dlfhw.com[/email]> proto=ESMTP helo=<
tom.com>
Oct 11 12:03:47 mail postfix/smtpd[3628]: disconnect from unknown[121.34.157.187]
Oct 11 12:05:32 mail postfix/smtpd[3633]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 12:05:32 mail postfix/smtpd[3633]: connect from unknown[222.60.18.176]
Oct 11 12:05:33 mail postfix/smtpd[3633]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 12:05:33 mail postfix/smtpd[3633]: NOQUEUE: reject: RCPT from unknown[222.60.18.176]: 554 5.7.1 <
[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]abc@99look.com[/email]> to=<[email]master@dlfhw.com[/email]> proto=ESMTP helo=<99
look.com>
Oct 11 12:05:33 mail postfix/smtpd[3633]: disconnect from unknown[222.60.18.176]
Oct 11 12:07:41 mail postfix/qmgr[3259]: 44A3D26B0E: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1320, nrcpt=1 (qu
eue active)
Oct 11 12:07:41 mail postfix/qmgr[3259]: C307326B1F: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1299, nrcpt=1 (qu
eue active)
Oct 11 12:07:41 mail maildrop[3643]: Temporary authentication failure.
Oct 11 12:07:41 mail maildrop[3646]: Temporary authentication failure.
Oct 11 12:07:41 mail postfix/pipe[3639]: 44A3D26B0E: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=4779, del
ays=4779/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 12:07:41 mail postfix/pipe[3642]: C307326B1F: to=<[email]euro@dlfhw.cn[/email]>, relay=maildrop, delay=2238, del
ays=2238/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 12:08:53 mail postfix/anvil[3630]: statistics: max connection rate 1/60s for (smtp:121.34.157.187
) at Oct 11 12:03:40
Oct 11 12:08:53 mail postfix/anvil[3630]: statistics: max connection count 1 for (smtp:121.34.157.187) a
t Oct 11 12:03:40
Oct 11 12:08:53 mail postfix/anvil[3630]: statistics: max cache size 1 at Oct 11 12:03:40
Oct 11 12:12:41 mail postfix/qmgr[3259]: 2F61226B23: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1304, nrcpt=1 (qu
eue active)
Oct 11 12:12:41 mail maildrop[3658]: Temporary authentication failure.
Oct 11 12:12:41 mail postfix/pipe[3657]: 2F61226B23: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=2400, del
ays=2400/0.02/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
Oct 11 12:17:15 mail postfix/smtpd[3668]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
Oct 11 12:17:15 mail postfix/smtpd[3668]: warning: 121.35.197.57: hostname 57.197.35.121.broad.sz.gd.dyn
amic.163data.com.cn verification failed: Name or service not known
Oct 11 12:17:15 mail postfix/smtpd[3668]: connect from unknown[121.35.197.57]
Oct 11 12:17:25 mail postfix/smtpd[3668]: warning: numeric domain name in resource data of MX record for
dlfhw.com: 61.189.86.45
Oct 11 12:17:25 mail postfix/smtpd[3668]: NOQUEUE: reject: RCPT from unknown[121.35.197.57]: 554 5.7.1 <
[email]master@dlfhw.com[/email]>: Relay access denied; from=<[email]uijl@126.com[/email]> to=<[email]master@dlfhw.com[/email]> proto=ESMTP helo=<126.
com>
Oct 11 12:17:26 mail postfix/smtpd[3668]: disconnect from unknown[121.35.197.57]
Oct 11 12:17:41 mail postfix/qmgr[3259]: DE8D826B13: from=<[email]asia_ji@yahoo.com.cn[/email]>, size=1325, nrcpt=1 (qu
eue active)
Oct 11 12:17:41 mail maildrop[3675]: Temporary authentication failure.
Oct 11 12:17:41 mail postfix/pipe[3674]: DE8D826B13: to=<[email]asia@dlfhw.cn[/email]>, relay=maildrop, delay=4745, del
ays=4745/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/mail
drop: Temporary authentication failure. )
配置文件:
main.cf:
broken_sasl_auth_clients = yes
command_directory = /usr/local/postfix/sbin
config_directory = /etc/postfix
daemon_directory = /usr/local/postfix/libexec
debug_peer_level = 2
html_directory = /chroot/www/postfix_html
mail_owner = postfix
mail_spool_directory = /chroot/mail
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/postfix/man
message_size_limit = 14336000
mydomain = dlfhw.cn
myhostname = mail.dlfhw.cn
mynetworks = 61.189.86.0/26, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:2525
virtual_mailbox_base = /chroot/mail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 20971520
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = maildrop
virtual_uid_maps = static:2525
/etc/postfix/mysql_virtual_alias_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = alias
select_field = goto
where_field = address
[root@mail ~]# more /etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = quota
where_field = username
[root@mail ~]# more /etc/postfix/mysql_virtual_domains_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = domain
select_field = description
where_field = domain
[root@mail ~]# more /etc/postfix/mysql_virtual_mailbox_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = maildir
where_field = username
[root@mail ~]# more /chroot/www/extsuite/extmail/webmail.cf
SYS_CONFIG = /chroot/www/extsuite/extmail/
SYS_LANGDIR = /chroot/www/extsuite/extmail/lang
SYS_TEMPLDIR = /chroot/www/extsuite/extmail/html
SYS_SHOW_WARN = 0
SYS_PERMIT_NOQUOTA = 1
SYS_SESS_DIR = /tmp/
SYS_LOG_ON = 1
SYS_LOG_TYPE = syslog
SYS_LOG_FILE = /var/log/extmail.log
SYS_CAPTCHA_ON = 1
SYS_CAPTCHA_KEY = r3s9b6a7
SYS_CAPTCHA_LEN = 6
SYS_SESS_TIMEOUT = 0
SYS_SESS_COOKIE_ONLY = 1
SYS_USER_PSIZE = 10
SYS_USER_SCREEN = auto
SYS_USER_LANG = zh_CN
SYS_USER_TEMPLATE = default
SYS_USER_CHARSET = utf-8
SYS_USER_TRYLOCAL = 1
SYS_USER_TIMEZONE = +0800
SYS_USER_CCSENT = 1
SYS_USER_SHOW_HTML = 1
SYS_USER_COMPOSE_HTML = 1
SYS_USER_CONV_LINK =1
SYS_USER_ADDR2ABOOK = 1
SYS_MESSAGE_SIZE_LIMIT = 20971520
SYS_MIN_PASS_LEN = 2
SYS_MFILTER_ON = 1
SYS_NETDISK_ON = 1
SYS_SHOW_SIGNUP = 1
SYS_DEBUG_ON = 1
SYS_AUTH_TYPE = mysql
SYS_MAILDIR_BASE = /chroot/mail
SYS_AUTH_SCHEMA = virtual
SYS_CRYPT_TYPE = md5crypt
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /tmp/mysql.sock
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
SYS_MYSQL_ATTR_CLEARPW = clearpwd
SYS_MYSQL_ATTR_QUOTA = quota
SYS_MYSQL_ATTR_NDQUOTA = netdiskquota
SYS_MYSQL_ATTR_HOME = homedir
SYS_MYSQL_ATTR_MAILDIR = maildir
SYS_MYSQL_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_MYSQL_ATTR_DISABLENETDISK = disablenetdisk
SYS_MYSQL_ATTR_DISABLEPWDCHANGE = disablepwdchange
SYS_MYSQL_ATTR_ACTIVE = active
SYS_LDAP_BASE = o=extmailAccount,dc=example.com
SYS_LDAP_RDN = cn=Manager,dc=example.com
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_DOMAIN = virtualDomain
SYS_LDAP_ATTR_PASSWD = userPassword
SYS_LDAP_ATTR_CLEARPW = clearPassword
SYS_LDAP_ATTR_QUOTA = mailQuota
SYS_LDAP_ATTR_NDQUOTA = netdiskQuota
SYS_LDAP_ATTR_HOME = homeDirectory
SYS_LDAP_ATTR_MAILDIR = mailMessageStore
SYS_LDAP_ATTR_DISABLEWEBMAIL = disablewebmail
SYS_LDAP_ATTR_DISABLENETDISK = disablenetdisk
SYS_LDAP_ATTR_DISABLEPWDCHANGE = disablePasswdChange
SYS_LDAP_ATTR_ACTIVE = active
SYS_AUTHLIB_SOCKET = /chroot/courier-authlib/var/spool/authdaemon/socket
SYS_G_ABOOK_TYPE = file
SYS_G_ABOOK_LDAP_HOST = localhost
SYS_G_ABOOK_LDAP_BASE = ou=AddressBook,dc=example.com
SYS_G_ABOOK_LDAP_ROOTDN = cn=Manager,dc=example.com
SYS_G_ABOOK_LDAP_ROOTPW = secret
SYS_G_ABOOK_LDAP_FILTER = objectClass=OfficePerson
SYS_G_ABOOK_FILE_PATH = /chroot/www/extsuite/extmail/globabook.cf
SYS_G_ABOOK_FILE_LOCK = 1
SYS_G_ABOOK_FILE_CONVERT = 0
SYS_G_ABOOK_FILE_CHARSET = utf-8
[root@mail ~]# more /chroot/www/extsuite/extman/webman.cf
SYS_CONFIG = /chroot/www/extsuite/extman/
SYS_TEMPLDIR = /chroot/www/extsuite/extman/html
SYS_MAILDIR_BASE = /chroot/mail
SYS_SHOW_WARN = 0
SYS_SESS_DIR = /tmp/extman/
SYS_CAPTCHA_ON = 0
SYS_CAPTCHA_KEY = r3s9b6a7
SYS_CAPTCHA_LEN = 6
SYS_PSIZE = 10
SYS_TEMPLATE_NAME = default
SYS_DEFAULT_EXPIRE = 5y
SYS_GROUPMAIL_SENDER = [email]postmaster@extmail.org[/email]
SYS_DEFAULT_SERVICES = webmail,smtpd,smtp,pop3,netdisk
SYS_ISP_MODE = no
SYS_DOMAIN_HASHDIR = yes
SYS_DOMAIN_HASHDIR_DEPTH = 2x2
SYS_USER_HASHDIR = yes
SYS_USER_HASHDIR_DEPTH = 2x2
SYS_MIN_UID = 500
SYS_MIN_GID = 100
SYS_DEFAULT_UID = 1000
SYS_DEFAULT_GID = 1000
SYS_QUOTA_MULTIPLIER = 1048576
SYS_QUOTA_TYPE = courier
SYS_DEFAULT_MAXQUOTA = 500
SYS_DEFAULT_MAXALIAS = 100
SYS_DEFAULT_MAXUSERS = 100
SYS_DEFAULT_MAXNDQUOTA = 500
SYS_USER_DEFAULT_QUOTA = 5
SYS_USER_DEFAULT_NDQUOTA = 5
SYS_USER_DEFAULT_EXPIRE = 1y
SYS_BACKEND_TYPE = mysql
SYS_CRYPT_TYPE = md5crypt
SYS_MYSQL_USER = webman
SYS_MYSQL_PASS = webman
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /tmp/mysql.sock
SYS_MYSQL_TABLE = manager
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_PASSWD = password
SYS_LDAP_BASE = dc=extmail.org
SYS_LDAP_RDN = cn=Manager,dc=extmail.org
SYS_LDAP_PASS = secret
SYS_LDAP_HOST = localhost
SYS_LDAP_ATTR_USERNAME = mail
SYS_LDAP_ATTR_PASSWD = userPassword
SYS_RRD_DATADIR = /var/lib
SYS_RRD_TMPDIR = /tmp/viewlog
SYS_RRD_QUEUE_ON = yes
asia_ji 回复于:2007-10-11 12:30:05
root@mail ~]# more /etc/authmysqlrc
##VERSION: $Id: authmysqlrc,v 1.19 2007/02/10 02:51:07 mrsam Exp $
#
# Copyright 2000-2007 Double Precision, Inc. See COPYING for
# distribution information.
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# authmysqlrc created from authmysqlrc.dist by sysconftool
#
# DO NOT INSTALL THIS FILE with world read permissions. This file
# might contain the MySQL admin password!
#
# Each line in this file must follow the following format:
#
# field[spaces|tabs]value
#
# That is, the name of the field, followed by spaces or tabs, followed by
# field value. Trailing spaces are prohibited.
##NAME: LOCATION:0
#
# The server name, userid, and password used to log in.
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
##NAME: SSLINFO:0
#
# The SSL information.
#
# To use SSL-encrypted connections, define the following variables (available
# in MySQL 4.0, or higher):
#
#
# MYSQL_SSL_KEY /path/to/file
# MYSQL_SSL_CERT /path/to/file
# MYSQL_SSL_CACERT /path/to/file
# MYSQL_SSL_CAPATH /path/to/file
# MYSQL_SSL_CIPHERS ALL:!DES
##NAME: MYSQL_SOCKET:0
#
# MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
# filesystem pipe used for the connection
#
MYSQL_SOCKET /tmp/mysql.sock
##NAME: MYSQL_PORT:0
#
# MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
# connect to.
MYSQL_PORT 3306
##NAME: MYSQL_OPT:0
#
# Leave MYSQL_OPT as 0, unless you know what you're doing.
MYSQL_OPT 0
##NAME: MYSQL_DATABASE:0
#
# The name of the MySQL database we will open:
MYSQL_DATABASE extmail
##NAME: MYSQL_USER_TABLE:0
#
# The name of the table containing your user data. See README.authmysqlrc
# for the required fields in this table.
MYSQL_USER_TABLE mailbox
##NAME: MYSQL_CRYPT_PWFIELD:0
#
# Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both
# are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
# passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow
# CRAM-MD5 authentication to be implemented.
MYSQL_CRYPT_PWFIELD password
##NAME: MYSQL_CLEAR_PWFIELD:0
#
#
# MYSQL_CLEAR_PWFIELD clear
##NAME: MYSQL_DEFAULT_DOMAIN:0
#
# If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
# we will look up 'user@DEFAULT_DOMAIN' instead.
#
#
# DEFAULT_DOMAIN example.com
##NAME: MYSQL_UID_FIELD:0
#
# Other fields in the mysql table:
#
# MYSQL_UID_FIELD - contains the numerical userid of the account
#
MYSQL_UID_FIELD '1001'
##NAME: MYSQL_GID_FIELD:0
#
# Numerical groupid of the account
MYSQL_GID_FIELD '1001'
##NAME: MYSQL_LOGIN_FIELD:0
#
# The login id, default is id. Basically the query is:
#
# SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
#
MYSQL_LOGIN_FIELD username
##NAME: MYSQL_HOME_FIELD:0
#
MYSQL_HOME_FIELD concat('/chroot/mail',maildir)
##NAME: MYSQL_NAME_FIELD:0
#
# The user's name (optional)
MYSQL_NAME_FIELD name
##NAME: MYSQL_MAILDIR_FIELD:0
#
# This is an optional field, and can be used to specify an arbitrary
# location of the maildir for the account, which normally defaults to
# $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
#
# You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
# out.
#
MYSQL_MAILDIR_FIELD contcat('/chroot/mail',maildir)
##NAME: MYSQL_DEFAULTDELIVERY:0
#
# Courier mail server only: optional field specifies custom mail delivery
# instructions for this account (if defined) -- essentially overrides
# DEFAULTDELIVERY from ${sysconfdir}/courierd
#
# MYSQL_DEFAULTDELIVERY defaultdelivery
##NAME: MYSQL_QUOTA_FIELD:0
#
# Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
# specify a maildir quota. See README.maildirquota for more information
#
# MYSQL_QUOTA_FIELD quota
##NAME: MYSQL_AUXOPTIONS:0
#
# Auxiliary options. The MYSQL_AUXOPTIONS field should be a char field that
# contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
# pairs. These names are additional attributes that define various per-account
# "options", as given in INSTALL's description of the "Account OPTIONS"
# setting.
#
# MYSQL_AUXOPTIONS_FIELD auxoptions
#
# You might want to try something like this, if you'd like to use a bunch
# of individual fields, instead of a single text blob:
#
# MYSQL_AUXOPTIONS_FIELD CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablew
ebmail=",disablewebmail,",sharedgroup=",sharedgroup)
#
# This will let you define fields called "disableimap", etc, with the end result
# being something that the OPTIONS parser understands.
##NAME: MYSQL_WHERE_CLAUSE:0
#
# This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
# fixed string that is appended to the WHERE clause of our query
#
# MYSQL_WHERE_CLAUSE server='mailhost.example.com'
##NAME: MYSQL_SELECT_CLAUSE:0
#
# (EXPERIMENTAL)
# This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
# which is structuraly different from proposed. The fixed string will
# be used to do a SELECT operation on database, which should return fields
# in order specified bellow:
#
# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
#
# The username field should include the domain (see example below).
#
# Enabling this option causes ignorance of any other field-related
# options, excluding default domain.
#
# There are two variables, which you can use. Substitution will be made
# for them, so you can put entered username (local part) and domain name
# in the right place of your query. These variables are:
# $(local_part), $(domain), $(service)
#
# If a $(domain) is empty (not given by the remote user) the default domain
# name is used in its place.
#
# $(service) will expand out to the service being authenticated: imap, imaps,
# pop3 or pop3s. Courier mail server only: service will also expand out to
# "courier", when searching for local mail account's location. In this case,
# if the "maildir" field is not empty it will be used in place of
# DEFAULTDELIVERY. Courier mail server will also use esmtp when doing
# authenticated ESMTP.
#
# This example is a little bit modified adaptation of vmail-sql
# database scheme:
#
# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),
\
# CONCAT('{MD5}', popbox.password_hash), \
# popbox.clearpw, \
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# domain.quota, \
# '', \
# CONCAT("disableimap=",disableimap,",disablepop3=", \
# disablepop3,",disablewebmail=",disablewebmail, \
# ",sharedgroup=",sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
##NAME: MYSQL_ENUMERATE_CLAUSE:1
#
# {EXPERIMENTAL}
# Optional custom SQL query used to enumerate accounts for authenumerate,
# in order to compile a list of accounts for shared folders. The query
# should return the following fields: name, uid, gid, homedir, maildir, options
#
# Example:
# MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),
\
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# CONCAT('sharedgroup=', sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
##NAME: MYSQL_CHPASS_CLAUSE:0
#
# (EXPERIMENTAL)
# This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
# which is structuraly different from proposed. The fixed string will
# be used to do an UPDATE operation on database. In other words, it is
# used, when changing password.
#
# There are four variables, which you can use. Substitution will be made
# for them, so you can put entered username (local part) and domain name
# in the right place of your query. There variables are:
# $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
#
# If a $(domain) is empty (not given by the remote user) the default domain
# name is used in its place.
# $(newpass) contains plain password
# $(newpass_crypt) contains its crypted form
#
# MYSQL_CHPASS_CLAUSE UPDATE popbox \
# SET clearpw='$(newpass)', \
# password_hash='$(newpass_crypt)' \
# WHERE local_part='$(local_part)' \
# AND domain_name='$(domain)'
#
这是通过extman新建的域
[root@mail ~]# ll /chroot/mail/
total 28
-rw------- 1 vmail vmail 16051 Oct 11 10:15 asia
drwx------ 4 vmail vmail 4096 Oct 10 17:04 dlfhw.cn
这是通过extman新建的两个邮箱用户
[root@mail ~]# ll /chroot/mail/dlfhw.cn/
total 16
drwx------ 3 vmail vmail 4096 Oct 10 16:34 asia
drwx------ 3 vmail vmail 4096 Oct 10 17:04 euro
asia_ji 回复于:2007-10-11 12:32:12
Oct 11 11:27:35 mail postfix/smtpd[3457]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
这个日志记录是什么意思?
marion 回复于:2007-10-11 19:44:46
引用:现在注释掉/etc/postfix/main.cf下的mydestination项,依然无法收到邮件。
下面把配置文件和日志贴出来,请您帮忙找出问题的所在,谢谢!!!
mydomain,myorigin这两个参数注释了吗?
注释掉不是解决这个问题的办法,建议给本地域指定一个别的域名或许可以解决此问题。
marion 回复于:2007-10-11 19:50:35
引用:原帖由 asia_ji 于 2007-10-11 12:32 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7451899&ptid=987344]
Oct 11 11:27:35 mail postfix/smtpd[3457]: warning: dict_nis_init: NIS domain name not set - NIS lookups
disabled
这个日志记录是什么意思?
找一下你的配置文件main.cf中是否有类同于如下行的项(也可能是被注释掉的),如果有并被注释了,启用它,并将后面关于nis的删除即可。
alias_maps = hash:/etc/aliases, nis:mail.aliases
2008zgh 回复于:2007-10-12 01:04:30
顶
谢谢!!!
asia_ji 回复于:2007-10-12 09:40:35
引用:原帖由 marion 于 2007-10-11 19:44 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7454285&ptid=987344]
mydomain,myorigin这两个参数注释了吗?
注释掉不是解决这个问题的办法,建议给本地域指定一个别的域名或许可以解决此问题。
昨天弄了一天,中午饭都没有吃,还是没有找到具体的原因,但是问题肯定出在认证这块,后来干脆推倒了从来,今天终于能收发邮件了。
关于本地域和虚拟域同名的问题,我把main.cf里面mydomain,myorigin,myhostname等全给注释掉了,虚拟域就可以收到邮件了。
asia_ji 回复于:2007-10-12 10:19:03
(temporary failure. Command output: /usr/local/bin/maildrop: Unable to change to home directory. )
这是由于什么原因导致的??
Oct 12 10:05:26 mail postfix/pickup[11414]: 4112426B23: uid=1001 from=<[email]asia@dlfhw.cn[/email]>
Oct 12 10:05:26 mail postfix/cleanup[11426]: 4112426B23: message-id=<[email]20071012020526.4112426B23@mail.dlfh[/email]
w.cn>
Oct 12 10:05:26 mail postfix/qmgr[11413]: 4112426B23: from=<[email]asia@dlfhw.cn[/email]>, size=482, nrcpt=1 (queue act
ive)
Oct 12 10:05:26 mail postfix/pipe[11446]: 4112426B23: to=<[email]huanglin@dlfhw.cn[/email]>, relay=maildrop, delay=0.06
, delays=0.01/0.04/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin
/maildrop: Unable to change to home directory. )
marion 回复于:2007-10-12 10:24:36
"Unable to change to home directory"这个表明maildrop在访问用户邮箱目录时遇到了问题;你再重新检查一下用户邮箱目录的访问权限、属主属组、以及authmysqlrc等的设置是否完全正确。
marion 回复于:2007-10-12 10:28:11
兄弟精神可嘉!
同时那个注释掉相应的几个参数的确可以解决那个问题,但不建议以之为最终办法,这才是我回复你的原意。
asia_ji 回复于:2007-10-12 10:34:28
我看了一下邮箱目录的属主和属组都是vmail权限如下:
[root@mail chroot]# ll /chroot/mail/
total 12
-rw------- 1 vmail vmail 0 Oct 12 07:59 asia
drwx------ 4 vmail vmail 4096 Oct 12 09:41 dlfhw.cn
[root@mail dlfhw.cn]# ll /chroot/mail/dlfhw.cn/
total 16
drwx------ 3 vmail vmail 4096 Oct 12 09:20 asia
drwx------ 3 vmail vmail 4096 Oct 12 09:19 huanglin
/etc/authmysqlrc配置文件如下:
[root@mail dlfhw.cn]# more /etc/authmysqlrc
##VERSION: $Id: authmysqlrc,v 1.19 2007/02/10 02:51:07 mrsam Exp $
#
# Copyright 2000-2007 Double Precision, Inc. See COPYING for
# distribution information.
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# authmysqlrc created from authmysqlrc.dist by sysconftool
#
# DO NOT INSTALL THIS FILE with world read permissions. This file
# might contain the MySQL admin password!
#
# Each line in this file must follow the following format:
#
# field[spaces|tabs]value
#
# That is, the name of the field, followed by spaces or tabs, followed by
# field value. Trailing spaces are prohibited.
##NAME: LOCATION:0
#
# The server name, userid, and password used to log in.
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
##NAME: SSLINFO:0
#
# The SSL information.
#
# To use SSL-encrypted connections, define the following variables (available
# in MySQL 4.0, or higher):
#
#
# MYSQL_SSL_KEY /path/to/file
# MYSQL_SSL_CERT /path/to/file
# MYSQL_SSL_CACERT /path/to/file
# MYSQL_SSL_CAPATH /path/to/file
# MYSQL_SSL_CIPHERS ALL:!DES
##NAME: MYSQL_SOCKET:0
#
# MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
# filesystem pipe used for the connection
#
MYSQL_SOCKET /tmp/mysql.sock
##NAME: MYSQL_PORT:0
#
# MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
# connect to.
MYSQL_PORT 3306
##NAME: MYSQL_OPT:0
#
# Leave MYSQL_OPT as 0, unless you know what you're doing.
MYSQL_OPT 0
##NAME: MYSQL_DATABASE:0
#
# The name of the MySQL database we will open:
MYSQL_DATABASE extmail
##NAME: MYSQL_USER_TABLE:0
#
# The name of the table containing your user data. See README.authmysqlrc
# for the required fields in this table.
MYSQL_USER_TABLE mailbox
##NAME: MYSQL_CRYPT_PWFIELD:0
#
# Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both
# are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
# passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow
# CRAM-MD5 authentication to be implemented.
MYSQL_CRYPT_PWFIELD password
##NAME: MYSQL_CLEAR_PWFIELD:0
#
#
# MYSQL_CLEAR_PWFIELD clear
##NAME: MYSQL_DEFAULT_DOMAIN:0
#
# If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
# we will look up 'user@DEFAULT_DOMAIN' instead.
#
#
# DEFAULT_DOMAIN example.com
##NAME: MYSQL_UID_FIELD:0
#
# Other fields in the mysql table:
#
# MYSQL_UID_FIELD - contains the numerical userid of the account
#
MYSQL_UID_FIELD '1001'
##NAME: MYSQL_GID_FIELD:0
#
# Numerical groupid of the account
MYSQL_GID_FIELD '1001'
##NAME: MYSQL_LOGIN_FIELD:0
#
# The login id, default is id. Basically the query is:
#
# SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
#
MYSQL_LOGIN_FIELD username
##NAME: MYSQL_HOME_FIELD:0
#
MYSQL_HOME_FIELD concat('/chroot/mail',maildir)
##NAME: MYSQL_NAME_FIELD:0
#
# The user's name (optional)
MYSQL_NAME_FIELD name
##NAME: MYSQL_MAILDIR_FIELD:0
#
# This is an optional field, and can be used to specify an arbitrary
# location of the maildir for the account, which normally defaults to
# $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
#
# You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
# out.
#
# MYSQL_MAILDIR_FIELD concat('/chroot/mail',maildir)
##NAME: MYSQL_DEFAULTDELIVERY:0
#
# Courier mail server only: optional field specifies custom mail delivery
# instructions for this account (if defined) -- essentially overrides
# DEFAULTDELIVERY from ${sysconfdir}/courierd
#
# MYSQL_DEFAULTDELIVERY defaultdelivery
##NAME: MYSQL_QUOTA_FIELD:0
#
# Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
# specify a maildir quota. See README.maildirquota for more information
#
# MYSQL_QUOTA_FIELD quota
##NAME: MYSQL_AUXOPTIONS:0
#
# Auxiliary options. The MYSQL_AUXOPTIONS field should be a char field that
# contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
# pairs. These names are additional attributes that define various per-account
# "options", as given in INSTALL's description of the "Account OPTIONS"
# setting.
#
# MYSQL_AUXOPTIONS_FIELD auxoptions
#
# You might want to try something like this, if you'd like to use a bunch
# of individual fields, instead of a single text blob:
#
# MYSQL_AUXOPTIONS_FIELD CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablew
ebmail=",disablewebmail,",sharedgroup=",sharedgroup)
#
# This will let you define fields called "disableimap", etc, with the end result
# being something that the OPTIONS parser understands.
##NAME: MYSQL_WHERE_CLAUSE:0
#
# This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
# fixed string that is appended to the WHERE clause of our query
#
# MYSQL_WHERE_CLAUSE server='mailhost.example.com'
##NAME: MYSQL_SELECT_CLAUSE:0
#
# (EXPERIMENTAL)
# This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
# which is structuraly different from proposed. The fixed string will
# be used to do a SELECT operation on database, which should return fields
# in order specified bellow:
#
# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
#
# The username field should include the domain (see example below).
#
# Enabling this option causes ignorance of any other field-related
# options, excluding default domain.
#
# There are two variables, which you can use. Substitution will be made
# for them, so you can put entered username (local part) and domain name
# in the right place of your query. These variables are:
# $(local_part), $(domain), $(service)
#
# If a $(domain) is empty (not given by the remote user) the default domain
# name is used in its place.
#
# $(service) will expand out to the service being authenticated: imap, imaps,
# pop3 or pop3s. Courier mail server only: service will also expand out to
# "courier", when searching for local mail account's location. In this case,
# if the "maildir" field is not empty it will be used in place of
# DEFAULTDELIVERY. Courier mail server will also use esmtp when doing
# authenticated ESMTP.
#
# This example is a little bit modified adaptation of vmail-sql
# database scheme:
#
# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),
\
# CONCAT('{MD5}', popbox.password_hash), \
# popbox.clearpw, \
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# domain.quota, \
# '', \
# CONCAT("disableimap=",disableimap,",disablepop3=", \
# disablepop3,",disablewebmail=",disablewebmail, \
# ",sharedgroup=",sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
##NAME: MYSQL_ENUMERATE_CLAUSE:1
#
# {EXPERIMENTAL}
# Optional custom SQL query used to enumerate accounts for authenumerate,
# in order to compile a list of accounts for shared folders. The query
# should return the following fields: name, uid, gid, homedir, maildir, options
#
# Example:
# MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),
\
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# CONCAT('sharedgroup=', sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
##NAME: MYSQL_CHPASS_CLAUSE:0
#
# (EXPERIMENTAL)
# This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
# which is structuraly different from proposed. The fixed string will
# be used to do an UPDATE operation on database. In other words, it is
# used, when changing password.
#
# There are four variables, which you can use. Substitution will be made
# for them, so you can put entered username (local part) and domain name
# in the right place of your query. There variables are:
# $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
#
# If a $(domain) is empty (not given by the remote user) the default domain
# name is used in its place.
# $(newpass) contains plain password
# $(newpass_crypt) contains its crypted form
#
# MYSQL_CHPASS_CLAUSE UPDATE popbox \
# SET clearpw='$(newpass)', \
# password_hash='$(newpass_crypt)' \
# WHERE local_part='$(local_part)' \
# AND domain_name='$(domain)'
#
marion 回复于:2007-10-12 10:40:38
# MYSQL_MAILDIR_FIELD concat('/chroot/mail',maildir)
这个为什么注释掉了呢?
cnhawk386 回复于:2007-10-12 10:51:50
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
以上用来指定验正用户登录里所用到的表,以及用户名、域名和用户密码分别对应的表中列的名称;这里默认即可
我的问题:
我的用户名、域名在mysql中是两个不同表中的字段 应该如何解决???必须放在一个表中 吗?????
谢谢??
asia_ji 回复于:2007-10-12 10:59:44
我要晕倒了!
marion,我把所有的配置文件贴出来,您帮我看看问题出在哪里?
现在还是老样子
/var/log/messages:有一个这样的日志
Oct 12 10:43:37 mail postfix/smtpd[2407]: sql_select option missing
Oct 12 10:43:37 mail postfix/smtpd[2407]: auxpropfunc error no mechanism available
/var/log/maillog:
Oct 12 10:47:09 mail postfix/pickup[2273]: E1A3A26B42: uid=1001 from=<[email]asia@dlfhw.cn[/email]>
Oct 12 10:47:09 mail postfix/cleanup[2426]: E1A3A26B42: message-id=<[email]20071012024709.E1A3A26B42@mail.dlfhw[/email]
.cn>
Oct 12 10:47:09 mail postfix/qmgr[2272]: E1A3A26B42: from=<[email]asia@dlfhw.cn[/email]>, size=517, nrcpt=1 (queue acti
ve)
Oct 12 10:47:09 mail postfix/pipe[2431]: E1A3A26B42: to=<[email]huanglin@dlfhw.cn[/email]>, relay=maildrop, delay=0.12,
delays=0.1/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/local/bin/m
aildrop: Unable to change to home directory. )
[root@mail ~]# more /etc/authmysqlrc
##VERSION: $Id: authmysqlrc,v 1.19 2007/02/10 02:51:07 mrsam Exp $
#
# Copyright 2000-2007 Double Precision, Inc. See COPYING for
# distribution information.
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# authmysqlrc created from authmysqlrc.dist by sysconftool
#
# DO NOT INSTALL THIS FILE with world read permissions. This file
# might contain the MySQL admin password!
#
# Each line in this file must follow the following format:
#
# field[spaces|tabs]value
#
# That is, the name of the field, followed by spaces or tabs, followed by
# field value. Trailing spaces are prohibited.
##NAME: LOCATION:0
#
# The server name, userid, and password used to log in.
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
##NAME: SSLINFO:0
#
# The SSL information.
#
# To use SSL-encrypted connections, define the following variables (available
# in MySQL 4.0, or higher):
#
#
# MYSQL_SSL_KEY /path/to/file
# MYSQL_SSL_CERT /path/to/file
# MYSQL_SSL_CACERT /path/to/file
# MYSQL_SSL_CAPATH /path/to/file
# MYSQL_SSL_CIPHERS ALL:!DES
##NAME: MYSQL_SOCKET:0
#
# MYSQL_SOCKET can be used with MySQL version 3.22 or later, it specifies the
# filesystem pipe used for the connection
#
MYSQL_SOCKET /tmp/mysql.sock
##NAME: MYSQL_PORT:0
#
# MYSQL_PORT can be used with MySQL version 3.22 or later to specify a port to
# connect to.
MYSQL_PORT 3306
##NAME: MYSQL_OPT:0
#
# Leave MYSQL_OPT as 0, unless you know what you're doing.
MYSQL_OPT 0
##NAME: MYSQL_DATABASE:0
#
# The name of the MySQL database we will open:
MYSQL_DATABASE extmail
##NAME: MYSQL_USER_TABLE:0
#
# The name of the table containing your user data. See README.authmysqlrc
# for the required fields in this table.
MYSQL_USER_TABLE mailbox
##NAME: MYSQL_CRYPT_PWFIELD:0
#
# Either MYSQL_CRYPT_PWFIELD or MYSQL_CLEAR_PWFIELD must be defined. Both
# are OK too. crypted passwords go into MYSQL_CRYPT_PWFIELD, cleartext
# passwords go into MYSQL_CLEAR_PWFIELD. Cleartext passwords allow
# CRAM-MD5 authentication to be implemented.
MYSQL_CRYPT_PWFIELD password
##NAME: MYSQL_CLEAR_PWFIELD:0
#
#
# MYSQL_CLEAR_PWFIELD clear
##NAME: MYSQL_DEFAULT_DOMAIN:0
#
# If DEFAULT_DOMAIN is defined, and someone tries to log in as 'user',
# we will look up 'user@DEFAULT_DOMAIN' instead.
#
#
# DEFAULT_DOMAIN example.com
##NAME: MYSQL_UID_FIELD:0
#
# Other fields in the mysql table:
#
# MYSQL_UID_FIELD - contains the numerical userid of the account
#
MYSQL_UID_FIELD '1001'
##NAME: MYSQL_GID_FIELD:0
#
# Numerical groupid of the account
MYSQL_GID_FIELD '1001'
##NAME: MYSQL_LOGIN_FIELD:0
#
# The login id, default is id. Basically the query is:
#
# SELECT MYSQL_UID_FIELD, MYSQL_GID_FIELD, ... WHERE id='loginid'
#
MYSQL_LOGIN_FIELD username
##NAME: MYSQL_HOME_FIELD:0
#
MYSQL_HOME_FIELD concat('/chroot/mail',maildir)
##NAME: MYSQL_NAME_FIELD:0
#
# The user's name (optional)
MYSQL_NAME_FIELD name
##NAME: MYSQL_MAILDIR_FIELD:0
#
# This is an optional field, and can be used to specify an arbitrary
# location of the maildir for the account, which normally defaults to
# $HOME/Maildir (where $HOME is read from MYSQL_HOME_FIELD).
#
# You still need to provide a MYSQL_HOME_FIELD, even if you uncomment this
# out.
#
MYSQL_MAILDIR_FIELD concat('/chroot/mail',maildir)
##NAME: MYSQL_DEFAULTDELIVERY:0
#
# Courier mail server only: optional field specifies custom mail delivery
# instructions for this account (if defined) -- essentially overrides
# DEFAULTDELIVERY from ${sysconfdir}/courierd
#
# MYSQL_DEFAULTDELIVERY defaultdelivery
##NAME: MYSQL_QUOTA_FIELD:0
#
# Define MYSQL_QUOTA_FIELD to be the name of the field that can optionally
# specify a maildir quota. See README.maildirquota for more information
#
# MYSQL_QUOTA_FIELD quota
##NAME: MYSQL_AUXOPTIONS:0
#
# Auxiliary options. The MYSQL_AUXOPTIONS field should be a char field that
# contains a single string consisting of comma-separated "ATTRIBUTE=NAME"
# pairs. These names are additional attributes that define various per-account
# "options", as given in INSTALL's description of the "Account OPTIONS"
# setting.
#
# MYSQL_AUXOPTIONS_FIELD auxoptions
#
# You might want to try something like this, if you'd like to use a bunch
# of individual fields, instead of a single text blob:
#
# MYSQL_AUXOPTIONS_FIELD CONCAT("disableimap=",disableimap,",disablepop3=",disablepop3,",disablew
ebmail=",disablewebmail,",sharedgroup=",sharedgroup)
#
# This will let you define fields called "disableimap", etc, with the end result
# being something that the OPTIONS parser understands.
##NAME: MYSQL_WHERE_CLAUSE:0
#
# This is optional, MYSQL_WHERE_CLAUSE can be basically set to an arbitrary
# fixed string that is appended to the WHERE clause of our query
#
# MYSQL_WHERE_CLAUSE server='mailhost.example.com'
##NAME: MYSQL_SELECT_CLAUSE:0
#
# (EXPERIMENTAL)
# This is optional, MYSQL_SELECT_CLAUSE can be set when you have a database,
# which is structuraly different from proposed. The fixed string will
# be used to do a SELECT operation on database, which should return fields
# in order specified bellow:
#
# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options
#
# The username field should include the domain (see example below).
#
# Enabling this option causes ignorance of any other field-related
# options, excluding default domain.
#
# There are two variables, which you can use. Substitution will be made
# for them, so you can put entered username (local part) and domain name
# in the right place of your query. These variables are:
# $(local_part), $(domain), $(service)
#
# If a $(domain) is empty (not given by the remote user) the default domain
# name is used in its place.
#
# $(service) will expand out to the service being authenticated: imap, imaps,
# pop3 or pop3s. Courier mail server only: service will also expand out to
# "courier", when searching for local mail account's location. In this case,
# if the "maildir" field is not empty it will be used in place of
# DEFAULTDELIVERY. Courier mail server will also use esmtp when doing
# authenticated ESMTP.
#
# This example is a little bit modified adaptation of vmail-sql
# database scheme:
#
# MYSQL_SELECT_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),
\
# CONCAT('{MD5}', popbox.password_hash), \
# popbox.clearpw, \
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# domain.quota, \
# '', \
# CONCAT("disableimap=",disableimap,",disablepop3=", \
# disablepop3,",disablewebmail=",disablewebmail, \
# ",sharedgroup=",sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
##NAME: MYSQL_ENUMERATE_CLAUSE:1
#
# {EXPERIMENTAL}
# Optional custom SQL query used to enumerate accounts for authenumerate,
# in order to compile a list of accounts for shared folders. The query
# should return the following fields: name, uid, gid, homedir, maildir, options
#
# Example:
# MYSQL_ENUMERATE_CLAUSE SELECT CONCAT(popbox.local_part, '@', popbox.domain_name),
\
# domain.uid, \
# domain.gid, \
# CONCAT(domain.path, '/', popbox.mbox_name), \
# '', \
# CONCAT('sharedgroup=', sharedgroup) \
# FROM popbox, domain \
# WHERE popbox.local_part = '$(local_part)' \
# AND popbox.domain_name = '$(domain)' \
# AND popbox.domain_name = domain.domain_name
##NAME: MYSQL_CHPASS_CLAUSE:0
#
# (EXPERIMENTAL)
# This is optional, MYSQL_CHPASS_CLAUSE can be set when you have a database,
# which is structuraly different from proposed. The fixed string will
# be used to do an UPDATE operation on database. In other words, it is
# used, when changing password.
#
# There are four variables, which you can use. Substitution will be made
# for them, so you can put entered username (local part) and domain name
# in the right place of your query. There variables are:
# $(local_part) , $(domain) , $(newpass) , $(newpass_crypt)
#
# If a $(domain) is empty (not given by the remote user) the default domain
# name is used in its place.
# $(newpass) contains plain password
# $(newpass_crypt) contains its crypted form
#
# MYSQL_CHPASS_CLAUSE UPDATE popbox \
# SET clearpw='$(newpass)', \
# password_hash='$(newpass_crypt)' \
# WHERE local_part='$(local_part)' \
# AND domain_name='$(domain)'
#
asia_ji 回复于:2007-10-12 11:00:19
[root@mail ~]# more /etc/authdaemonrc
##VERSION: $Id: authdaemonrc.in,v 1.13 2005/10/05 00:07:32 mrsam Exp $
#
# Copyright 2000-2005 Double Precision, Inc. See COPYING for
# distribution information.
#
# authdaemonrc created from authdaemonrc.dist by sysconftool
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# This file configures authdaemond, the resident authentication daemon.
#
# Comments in this file are ignored. Although this file is intended to
# be sourced as a shell script, authdaemond parses it manually, so
# the acceptable syntax is a bit limited. Multiline variable contents,
# with the \ continuation character, are not allowed. Everything must
# fit on one line. Do not use any additional whitespace for indentation,
# or anything else.
##NAME: authmodulelist:2
#
# The authentication modules that are linked into authdaemond. The
# default list is installed. You may selectively disable modules simply
# by removing them from the following list. The available modules you
# can use are: authuserdb authmysql authcustom authpipe
authmodulelist="authmysql"
##NAME: authmodulelistorig:3
#
# This setting is used by Courier's webadmin module, and should be left
# alone
authmodulelistorig="authmysql"
##NAME: daemons:0
#
# The number of daemon processes that are started. authdaemon is typically
# installed where authentication modules are relatively expensive: such
# as authldap, or authmysql, so it's better to have a number of them running.
# PLEASE NOTE: Some platforms may experience a problem if there's more than
# one daemon. Specifically, SystemV derived platforms that use TLI with
# socket emulation. I'm suspicious of TLI's ability to handle multiple
# processes accepting connections on the same filesystem domain socket.
#
# You may need to increase daemons if as your system load increases. Symptoms
# include sporadic authentication failures. If you start getting
# authentication failures, increase daemons. However, the default of 5
# SHOULD be sufficient. Bumping up daemon count is only a short-term
# solution. The permanent solution is to add more resources: RAM, faster
# disks, faster CPUs...
daemons=10
##NAME: authdaemonvar:2
#
# authdaemonvar is here, but is not used directly by authdaemond. It's
# used by various configuration and build scripts, so don't touch it!
authdaemonvar=/usr/local/courier-authlib/var/spool/authdaemon
##NAME: DEBUG_LOGIN:0
#
# Dump additional diagnostics to syslog
#
# DEBUG_LOGIN=0 - turn off debugging
# DEBUG_LOGIN=1 - turn on debugging
# DEBUG_LOGIN=2 - turn on debugging + log passwords too
#
# ** YES ** - DEBUG_LOGIN=2 places passwords into syslog.
#
# Note that most information is sent to syslog at level 'debug', so
# you may need to modify your /etc/syslog.conf to be able to see it.
DEBUG_LOGIN=0
##NAME: DEFAULTOPTIONS:0
#
# A comma-separated list of option=value pairs. Each option is applied
# to an account if the account does not have its own specific value for
# that option. So for example, you can set
# DEFAULTOPTIONS="disablewebmail=1,disableimap=1"
# and then enable webmail and/or imap on individual accounts by setting
# disablewebmail=0 and/or disableimap=0 on the account.
DEFAULTOPTIONS=""
##NAME: LOGGEROPTS:0
#
# courierlogger(1) options, e.g. to set syslog facility
#
LOGGEROPTS=""
##NAME: LDAP_TLS_OPTIONS:0
#
# Options documented in ldap.conf(5) can be set here, prefixed with 'LDAP'.
# Examples:
#
#LDAPTLS_CACERT=/path/to/cacert.pem
#LDAPTLS_REQCERT=demand
#LDAPTLS_CERT=/path/to/clientcert.pem
#LDAPTLS_KEY=/path/to/clientkey.pem
asia_ji 回复于:2007-10-12 11:02:09
[root@mail ~]# more /etc/postfix/master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp unix - n n - - pipe
# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail unix - n n - - pipe
# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp unix - n n - - pipe
# flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix - n n - 2 pipe
# flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
# ${nexthop} ${user} ${extension}
#
#mailman unix - n n - - pipe
# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}
asia_ji 回复于:2007-10-12 11:04:09
[root@mail ~]# more /etc/postfix/main.cf
# Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter
# list, see the postconf(5) manual page (command: "man 5 postconf").
#
# For common configuration examples, see BASIC_CONFIGURATION_README
# and STANDARD_CONFIGURATION_README. To find these documents, use
# the command "postconf html_directory readme_directory", or go to
# http://www.postfix.org/.
#
# For best results, change no more than 2-3 parameters at a time,
# and test if Postfix still works after every change.
# SOFT BOUNCE
#
# The soft_bounce parameter provides a limited safety net for
# testing. When soft_bounce is enabled, mail will remain queued that
# would otherwise bounce. This parameter disables locally-generated
# bounces, and prevents the SMTP server from rejecting mail permanently
# (by changing 5xx replies into 4xx replies). However, soft_bounce
# is no cure for address rewriting mistakes or mail routing mistakes.
#
#soft_bounce = no
# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
queue_directory = /var/spool/postfix
# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/local/postfix/sbin
# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/local/postfix/libexec
# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes. Specify the name of a user
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
mail_owner = postfix
# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
#myhostname = mail.dlfhw.cn
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld
#mydomain = dlfhw.cn
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# [email]user@that.users.mailhost[/email].
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
# proxy or network address translation unit. This setting extends
# the address list specified with the inet_interfaces parameter.
#
# You must specify your proxy/NAT addresses when your system is a
# backup MX host for other domains, otherwise mail delivery loops
# will happen when the primary MX host is down.
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain. On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all names or addresses of users that are local with respect
# to $mydestination, $inet_interfaces or $proxy_interfaces.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
#
# To turn off local recipient checking in the SMTP server, specify
# local_recipient_maps = (i.e. empty).
#
# The default setting assumes that you use the default Postfix local
# delivery agent for local delivery. You need to update the
# local_recipient_maps setting if:
#
# - You define $mydestination domain recipients in files other than
# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
# For example, you define $mydestination domain recipients in
# the $virtual_mailbox_maps files.
#
# - You redefine the local delivery agent in master.cf.
#
# - You redefine the "local_transport" setting in main.cf.
#
# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
# feature of the Postfix local delivery agent (see local(8)).
#
# Details are described in the LOCAL_RECIPIENT_README file.
#
# Beware: if the Postfix SMTP server runs chrooted, you probably have
# to access the passwd file via the proxymap service, in order to
# overcome chroot restrictions. The alternative, having a copy of
# the system passwd file in the chroot jail is just not practical.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify a bare username, an @domain.tld
# wild-card, or specify a [email]user@domain.tld[/email] address.
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
# The unknown_local_recipient_reject_code specifies the SMTP server
# response code when a recipient domain matches $mydestination or
# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
# and the recipient address or address local-part is not found.
#
# The default setting is 550 (reject mail) but it is safer to start
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
unknown_local_recipient_reject_code = 550
# TRUST AND RELAY CONTROL
# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in postconf(5).
asia_ji 回复于:2007-10-12 11:06:44
[root@mail ~]# /usr/local/postfix/sbin/postconf -a
cyrus
dovecot
[root@mail ~]# /usr/local/postfix/sbin/postconf -n
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/local/postfix/sbin
config_directory = /etc/postfix
daemon_directory = /usr/local/postfix/libexec
debug_peer_level = 2
html_directory = /chroot/www/postfix_html
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/postfix/man
message_size_limit = 14336000
mynetworks = 61.189.86.0/26, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /chroot/mail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 20971520
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_transport = maildrop
virtual_uid_maps = static:1001
marion 回复于:2007-10-12 11:11:59
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
以上第二行前一定要有空格。
marion 回复于:2007-10-12 11:13:07
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
以上第二行起后面的行前一定要有空格。
marion 回复于:2007-10-12 11:15:24
引用:Oct 12 10:43:37 mail postfix/smtpd[2407]: sql_select option missing
Oct 12 10:43:37 mail postfix/smtpd[2407]: auxpropfunc error no mechanism available
检查一下sasl能否正常工作,并查看一下/usr/local/lib/sasl2/smtp.conf的内容是否正确。
改动过任何配置文件后可靠的做法是重启相关的服务,切记!
asia_ji 回复于:2007-10-12 12:56:41
引用:原帖由 marion 于 2007-10-12 11:15 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7456319&ptid=987344]
检查一下sasl能否正常工作,并查看一下/usr/local/lib/sasl2/smtp.conf的内容是否正确。
改动过任何配置文件后可靠的做法是重启相关的服务,切记!
空格是都有的,还是那个问题:temporary failure. Command output: /usr/local/bin/maildrop: Unable to change to home directory.
另外sasl服务正常,想求证一下:/usr/local/lib/sasl2/smtp.conf最终的内容应该是什么?
是这样:
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
还是这样:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
marion 回复于:2007-10-12 13:51:44
引用:是这样:
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
如上
asia_ji 回复于:2007-10-12 14:00:50
marion,您好!有些具体的问题想和您请教!能否通过msn?
asia_ji 回复于:2007-10-12 14:03:55
我的msn:
[email]asia_ji@msn.com[/email]
您的msn是:[email]yongliang@live.com[/email]吗?
marion 回复于:2007-10-12 16:19:34
引用:原帖由 asia_ji 于 2007-10-12 10:19 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7455856&ptid=987344]
(temporary failure. Command output: /usr/local/bin/maildrop: Unable to change to home directory. )
这是由于什么原因导致的??
Oct 12 10:05:26 mail postfix/pickup[11414]: 4112426B23: uid=1001 ...
问题已经解决,原因是以下两行中在/chroot/mail后少了个"/"符号,修改为/choort/mail/ 即可。
MYSQL_HOME_FIELD concat('/chroot/mail',maildir)
MYSQL_MAILDIR_FIELD concat('/chroot/mail',maildir)
asia_ji 回复于:2007-10-12 16:50:12
两个 “/” 让我郁闷了两天,不过亦非常值得,非常感谢 marion ,认识你非常高兴。
天使别哭 回复于:2007-10-13 16:40:58
:wink: 太详细了,需要用一两天才能实践完成
cnhawk386 回复于:2007-10-13 17:13:00
引用:原帖由 cnhawk386 于 2007-10-12 10:51 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7456116&ptid=987344]
SYS_MYSQL_TABLE = mailbox
SYS_MYSQL_ATTR_USERNAME = username
SYS_MYSQL_ATTR_DOMAIN = domain
SYS_MYSQL_ATTR_PASSWD = password
以上用来指定验正用户登录里所用到的表,以及用户名、域名和用户密码分 ...
no answer????
zdyldy 回复于:2007-10-14 11:59:33
#/usr/local/postfix/sbin/postconf -a
cyrus
dovecot
#vi /etc/postfix/main.cf
############################CYRUS-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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
#vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
#/usr/local/postfix/sbin/postfix reload
[root@localhost postfix]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host. (看看这里啊,为什么自己就把连接关闭了呢.)
#[root@localhost postfix]#
下面是贴子给出的正确的配置,可是我在执行 telnet localhost 25的时候就自动关闭了.帮我解决一下啊.
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 Welcome to our mail.benet.org ESMTP,Warning: Version not Available!
ehlo mail.benet.org
250-mail.benet.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
#/usr/local/postfix/sbin/postconf -a
cyrus
dovecot
#vi /etc/postfix/main.cf
############################CYRUS-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
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
#vi /usr/local/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
#/usr/local/postfix/sbin/postfix reload
[root@localhost postfix]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host. 自动关闭了,是怎么回事啊?
[root@localhost postfix]#
下面是给出的正确的配置.
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 Welcome to our mail.benet.org ESMTP,Warning: Version not Available!
ehlo mail.benet.org
250-mail.benet.org
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
我的第二问题就是,我公司有100个用户,我怎么把用户添加进来呢.给我写一例子好么.例如其中一个用户是yuanll
公司的域名是test.org 机器名是mail.test.org
cndefu 回复于:2007-10-15 16:01:30
真的是超精华版呀
Weikey 回复于:2007-10-15 16:19:47
强烈建议楼主把安装过程做成一个HTML文档哦(顺便把一些常见问题也编辑进去)!这样最直观了!阅读也更方便!流芳百世啊!我代表党和人民感谢你!
[ 本帖最后由 Weikey 于 2007-10-15 16:27 编辑 ]
zdyldy 回复于:2007-10-15 18:36:35
[root@mail DBD-mysql-3.0002_4]# perl Makefile.PL
Can't locate DBI/DBD.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at Makefile.PL line 23.
[root@mail DBD-mysql-3.0002_4]# make
make: *** 没有指明目标并且找不到makefile 停止
[root@mail DBD-mysql-3.0002_4]#
请问 marion 老大这是什么意思啊。
marion 回复于:2007-10-15 21:45:12
这个我还真的没有尝试过,不敢妄言。不知道其他朋友有没有解决办法?:em14:
我回头去查一查相关材料,如果你有了结果,也希望能共享出来。
[ 本帖最后由 marion 于 2007-10-15 21:46 编辑 ]
marion 回复于:2007-10-15 21:48:52
多承二位谬赞,如果对大家有所帮助,也算是没有白忙活了……
marion 回复于:2007-10-15 21:51:44
你的第一步“ perl Makefile.PL”由于依赖关系不满足而没有完成,错误提示“Can't locate DBI/DBD.pm ”已经指明缺乏DBI/DBD.pm ;若想省功夫,直接去发行版光盘上找到perl-DBI的rpm包安装应该可以解决此问题。
zdyldy 回复于:2007-10-16 17:58:28
回复 #146 zdyldy 的帖子
你的第一步“ perl Makefile.PL”由于依赖关系不满足而没有完成,错误提示“Can't locate DBI/DBD.pm ”已经指明缺乏DBI/DBD.pm ;若想省功夫,直接去发行版光盘上找到perl-DBI的rpm包安装应该可以解决此问题。
非常感谢,问题解决了。
zdyldy 回复于:2007-10-16 18:12:06
marion 老大,我现在除了病毒库那块,前面的都安装完了,有两个问题没有解决。
第一个问题是:
这是我运行的结果,系统自动关闭了。安装完postfix的时候是没有问题的,完全可用。可是安装完cyrus-sasl后,来启用这个认证,就这样了。
[root@mail Auth]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Connection closed by foreign host.
[root@mail Auth]#
这是日志信息。
Oct 16 16:42:45 mail postfix/master[5292]: warning: process /usr/local/postfix/libexec/smtpd pid 5351 exit status 1
Oct 16 16:42:45 mail postfix/master[5292]: warning: /usr/local/postfix/libexec/smtpd: bad command startup -- throttling
Oct 16 16:43:45 mail postfix/smtpd[5376]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Oct 16 16:43:45 mail postfix/smtpd[5376]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Oct 16 16:43:45 mail postfix/smtpd[5376]: fatal: no SASL authentication mechanisms
Oct 16 16:43:46 mail postfix/master[5292]: warning: process /usr/local/postfix/libexec/smtpd pid 5376 exit status 1
Oct 16 16:43:46 mail postfix/master[5292]: warning: /usr/local/postfix/libexec/smtpd: bad command startup -- throttling
第二个问题是:
我在流览器里输入http://mail.test.com 进入extmail页面。
我是不是该点击注册用户呢,来建立我公司的所有用户。还是该怎么把我公司的用户全添加到邮箱里呢。
当我点击注册用户时,跳转到了令外一个界面,提示 指定域名test.com域名不存在。
我把图截下来了,可是怎么发上去呢。
zdyldy 回复于:2007-10-16 18:13:32
第二个问题是:
我在流览器里输入http://mail.test.com 进入extmail页面。
我是不是该点击注册用户呢,来建立我公司的所有用户。还是该怎么把我公司的用户全添加到邮箱里呢。
当我点击注册用户时,跳转到了令外一个界面,提示 指定域名test.com域名不存在。
我把图截下来了,可是怎么发上去呢。
不好意思,打错了,不是注册用户,而是免费注册邮箱。
zdyldy 回复于:2007-10-16 18:19:02
你好这是我截的两个图片。
输入新建文件夹的名称.rar
ypxns 回复于:2007-10-16 18:50:01
背景:我的系统上存在两个域名,一个本地域名设为pp.com,一个虚拟域名设为test.com
marion兄 ,我已经按照你的做法把邮件系统搭建起来了,但是测试的时候发生以下问题:
问题一:当我使用OE登录邮件服务器时,发生如下情况:我用的是系统帐号登录的!我检查了POP3服务和认证模块,好像也没有什么问题!我以为帐号的密码错了,后来重新改了密码,但仍然是这样的情况!(见附图)后来我改用虚拟账号看看,可结果还是一样!
关于认证,我的后台认证服务如下:(支持login 和plain)
/usr/local/sasl2/sbin/saslauthd -a shadow pam
我的/var/log/maillog如下:
Oct 14 00:47:59 mail pop3d: Connection, ip=[192.168.1.10]
Oct 14 00:47:59 mail pop3d: LOGIN FAILED, user=test, ip=[192.168.1.10]
Oct 14 00:48:04 mail pop3d: Disconnected, ip=[192.168.1.10]
Oct 14 00:48:10 mail pop3d: Connection, ip=[192.168.1.10]
Oct 14 00:48:10 mail pop3d: LOGIN FAILED, user=test, ip=[192.168.1.10]
Oct 14 00:48:15 mail pop3d: Disconnected, ip=[192.168.1.10]
……………………………………………..
不知道各位做的时候有没有出现类似的问题?????
问题二:当我使用系统帐号登录邮件服务器,在邮件服务器上来给某个用户发邮件,该用户用Extmail来收邮件,发现以下问题:
来自: [email]test@pp.com[/email] 将该来信人加到地址本中
发给: undisclosed-recipients:;
日期: Sun, 14 Oct 2007 00:29:43 +0800 (CST)
收件人的地址没有显示出来而是像上面的 情况!!不知道这是怎么回事???????
[ 本帖最后由 ypxns 于 2007-10-16 18:52 编辑 ]
ypxns 回复于:2007-10-16 18:55:16
你先进入EXTMAN邮件服务管理后台进行添加域名(记的要将允许用户注册这个勾打上),再进行添加用户就可以了!
ypxns 回复于:2007-10-16 19:04:34
Oct 16 16:43:45 mail postfix/smtpd[5376]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
从上面的日志来看, SASL mechanisms没有,检查一下smtpd.conf文件有没有声明:
mech_list:PLAIN LOGIN
或者是 在 编译时没有把上面的认证方式给添加进去!!
marion 回复于:2007-10-16 19:47:18
对于第一个问题,你可以开启authdaemon的日志,通过更为详细的认证信息可以很方便的定位错误所在。如果根据认证的详细信息仍无法定位错误,你可以把相关的日志发上来。
对于第二个问题,我没有看太明白你所要描述的问题:em14: ,不好意思,不过,你也应该通过相关的日志信息来排查错误原因。可以把相关的日志发上来帮你看看。
同时,很感谢你回答其他朋友的问题:em02:
zdyldy 回复于:2007-10-17 14:27:09
配置完后,在extmail中建立帐户后,可以收发邮件了。但是用客服端软件outlook配置连接提示:查找邮件服务器SMTP和POP3成功,登陆到接收邮件服务器(pop3)报错,信息为:因为POP3接收邮件服务器不接受您的用户名和密码,所以Outlook无法连接到该服务器。是不是我们配置的帐户有问题?
zdyldy 回复于:2007-10-17 15:48:36
Oct 17 14:05:55 mail pop3d: Connection, ip=[10.166.211.88]
Oct 17 14:05:55 mail pop3d: LOGIN FAILED, user=yuancj, ip=[10.166.211.88]
Oct 17 14:06:00 mail pop3d: Disconnected, ip=[10.166.211.88]
Oct 17 14:06:02 mail postfix/smtpd[7787]: connect from unknown[10.166.211.88]
Oct 17 14:06:03 mail postfix/smtpd[7787]: warning: mysql query failed: Table 'extmail.extmail' doesn't exist
Oct 17 14:06:03 mail postfix/smtpd[7787]: NOQUEUE: reject: RCPT from unknown[10.166.211.88]: 451 4.3.0 <[email]yuancj@oli.cn[/email]>: Temporary lookup failure; from=<[email]yuancj@oli.cn[/email]> to=<[email]yuancj@oli.cn[/email]> proto=SMTP helo=<jsgl3>
Oct 17 14:06:03 mail postfix/cleanup[7794]: 07C462C4A6E: message-id=<[email]20071017060603.07C462C4A6E@mail.oli.cn[/email]>
Oct 17 14:06:03 mail postfix/qmgr[6588]: 07C462C4A6E: from=<[email]double-[email]bounce@mail.oli.cn[/email][/email]>, size=687, nrcpt=1 (queue active)
Oct 17 14:06:03 mail postfix/smtpd[7787]: disconnect from unknown[10.166.211.88]
Oct 17 14:06:03 mail postfix/local[7796]: 07C462C4A6E: to=<[email]root@mail.oli.cn[/email]>, orig_to=<postmaster>, relay=local, delay=0.04, delays=0.02/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 17 14:06:03 mail postfix/qmgr[6588]: 07C462C4A6E: removed
这是我用outlook配置时的maillog信息。好像错误在"extmail.extmail"这是不是寻找extmail数据库下面的extmail表的意思,如果是那我该怎么改成mailbox表。
[ 本帖最后由 zdyldy 于 2007-10-17 15:52 编辑 ]
marion 回复于:2007-10-17 20:39:12
引用:……这是我用outlook配置时的maillog信息。好像错误在"extmail.extmail"这是不是寻找extmail数据库下面的extmail表的意思,如果是那我该怎么改成mailbox表。
这个应该是在authmysqlrc中修改。
[ 本帖最后由 marion 于 2007-11-2 11:33 编辑 ]
ypxns 回复于:2007-10-17 20:56:42
我在文件/etc/authdaemonrc中启用了调试,日志文件/var/log/maillog如下:
Oct 15 18:23:18 mail pop3d: Connection, ip=[192.168.1.10]
Oct 15 18:23:18 mail authdaemond: received auth request, service=pop3, authtype=login
Oct 15 18:23:18 mail authdaemond: authmysql: trying this module
Oct 15 18:23:18 mail authdaemond: SQL query: SELECT username, password, "", '1000', '1000', concat('/var/mailbox/',maildir), concat('/var/mailbox/',maildir), "", name, "" FROM mailbox WHERE username = "ypxns_98"
Oct 15 18:23:18 mail authdaemond: zero rows returned
Oct 15 18:23:18 mail authdaemond: no password available to compare
Oct 15 18:23:18 mail authdaemond: authmysql: REJECT - try next module
Oct 15 18:23:18 mail authdaemond: FAIL, all modules rejected
Oct 15 18:23:18 mail pop3d: LOGIN FAILED, user=ypxns_98, ip=[192.168.1.10]
Oct1518:23:23mailpop3d:Disconnected,ip=[192.168.1.10]……………………………………………..
从提示的信息来看,说mysql中没有可以对比的密码,难道是我的数据库中没有存储用户密码吗??我查看了一下Mysql,其结果如下所示:用户密码是存在的!
mysql> select * from mailbox;
+-------------------+----------+------------------------------------+----------+------+----------+----------------------------+-------------------+----------+--------------+----------+-----------+-----------+---------------------+---------------------+--------+------------------+--------------+-------------+----------------+----------------+-------------+-------------+
| username | uid | password | clearpwd | name | mailhost | maildir | homedir | quota | netdiskquota | domain | uidnumber | gidnumber | createdate | expiredate | active | disablepwdchange | disablesmtpd | disablesmtp | disablewebmail | disablenetdisk | disableimap | disablepop3 |
+-------------------+----------+------------------------------------+----------+------+----------+----------------------------+-------------------+----------+--------------+----------+-----------+-----------+---------------------+---------------------+--------+------------------+--------------+-------------+----------------+----------------+-------------+-------------+
| [email]ypxns_98@test.com[/email] | ypxns_98 | $1$6N6Xoc8p$SWfYUchlpANM3g0lFLdA10 | | yp | | test.com/ypxns_98/Maildir/ | test.com/ypxns_98 | 5242880S | 5242880S | test.com | 1000 | 1000 | 2007-10-13 22:15:13 | 2008-10-12 22:14:42 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| [email]pp@test.com[/email] | pp | $1$eBeLYmGD$OLZHGHKtjyP677JxqT/oj1 | | pp | | test.com/pp/Maildir/ | test.com/pp | 5242880S | 5242880S | test.com | 1000 | 1000 | 2007-10-13 15:50:02 | 2008-10-12 15:49:49 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
+-------------------+----------+------------------------------------+----------+------+----------+----------------------------+-------------------+----------+--------------+----------+-----------+-----------+---------------------+---------------------+--------+------------------+--------------+-------------+----------------+----------------+-------------+-------------+
2 rows in set (0.03 sec)
当我用authtest的时候,日志和上面一样
[root@mail sbin]# ./authtest -s pop3 ypxns_98 123456
Authentication FAILED: Operation not permitted
[root@mail sbin]#
另外我 问一 下,关于那个校验码,我rpm安装perl-gd的时候,提示需要libgd.so.2,但是这个在/usr/lib/和/usr/local/lib/下都存在,可是 好像仍然找不到!!!!所以后来我就把它给注释掉了!!!
[ 本帖最后由 ypxns 于 2007-10-17 21:05 编辑 ]
ypxns 回复于:2007-10-17 21:14:25
引用:原帖由 liheng 于 2007-9-18 23:11 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7369834&ptid=987344]
marion 兄,我猜想也是这里的问题,刚开始还没反映过来,还没想明白应该在哪里改。刚刚终于想通了。
事后经过确认确实也是这里的问题,
解决方法:
在 outlook 里的帐号名写全([email]test@test.com[/email])就OK了,mar ...
这个 和我一样的问题,原来是这样的啊!恩,再试一下!
zdyldy 回复于:2007-10-18 08:29:30
回复 #159 zdyldy 的帖子
[quota]……这是我用outlook配置时的maillog信息。好像错误在"extmail.extmail"这是不是寻找extmail数据库下面的extmail表的意思,如果是那我该怎么改成mailbox表。[/quota]
这个应该是在authmysqlrc中修改。
感谢帮忙!
我进那个文件看了啊,好像没有错误。对应的表是extmail,对应的表是mailbox。麻繁再帮我看一下,是哪里出了问题呢?
marion 回复于:2007-10-18 09:08:03
对应的“数据库”应该为extmail,对应的表为mailbox。
另,你再检查一下main.cf中关于虚拟域配置的部分。修改之后别忘了重启相关的服务。
如果还不行,把你的相关文件贴上来。
[ 本帖最后由 marion 于 2007-10-18 09:10 编辑 ]
zdyldy 回复于:2007-10-18 10:29:09
以上的方法在CentOS5上面适用吗?
rhel 5 上可以。
zdyldy 回复于:2007-10-18 10:49:48
回复 #163 zdyldy 的帖子
对应的“数据库”应该为extmail,对应的表为mailbox。
另,你再检查一下main.cf中关于虚拟域配置的部分。修改之后别忘了重启相关的服务。
如果还不行,把你的相关文件贴上来。
请看outlook上提示的错误信息。
发送测试电子邮件消息:outlook无法接到发送邮件服务器(smtp),可能是发送服务器的ssl或端口设置不正确。请在“高级”选项项卡上的“其它设置”中检查端口和ssl设置。
qdwmail 回复于:2007-10-18 10:50:55
楼主做一个PDF吧,方便大家下载
MYSQLER 回复于:2007-10-18 10:55:17
telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
一直在这没有任何反应
zdyldy 回复于:2007-10-18 13:07:02
回复 #163 zdyldy 的帖子
对应的“数据库”应该为extmail,对应的表为mailbox。
另,你再检查一下main.cf中关于虚拟域配置的部分。修改之后别忘了重启相关的服务。
如果还不行,把你的相关文件贴上来。
这是我main.cf文件的全部内容。
# Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter
# list, see the postconf(5) manual page (command: "man 5 postconf").
#
# For common configuration examples, see BASIC_CONFIGURATION_README
# and STANDARD_CONFIGURATION_README. To find these documents, use
# the command "postconf html_directory readme_directory", or go to
# http://www.postfix.org/.
#
# For best results, change no more than 2-3 parameters at a time,
# and test if Postfix still works after every change.
# SOFT BOUNCE
#
# The soft_bounce parameter provides a limited safety net for
# testing. When soft_bounce is enabled, mail will remain queued that
# would otherwise bounce. This parameter disables locally-generated
# bounces, and prevents the SMTP server from rejecting mail permanently
# (by changing 5xx replies into 4xx replies). However, soft_bounce
# is no cure for address rewriting mistakes or mail routing mistakes.
#
#soft_bounce = no
# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
queue_directory = /var/spool/postfix
# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/local/postfix/sbin
# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/local/postfix/libexec
# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes. Specify the name of a user
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
mail_owner = postfix
# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = mail.oli.cn
#myhostname = virtual.domain.tld
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain = oli.cn
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# [email]user@that.users.mailhost[/email].
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
myorigin = oli.cn
#myorigin = $mydomain
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
# proxy or network address translation unit. This setting extends
# the address list specified with the inet_interfaces parameter.
#
# You must specify your proxy/NAT addresses when your system is a
# backup MX host for other domains, otherwise mail delivery loops
# will happen when the primary MX host is down.
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain. On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, oli.cn, mail.oli.cn
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all names or addresses of users that are local with respect
# to $mydestination, $inet_interfaces or $proxy_interfaces.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
#
# To turn off local recipient checking in the SMTP server, specify
# local_recipient_maps = (i.e. empty).
#
# The default setting assumes that you use the default Postfix local
# delivery agent for local delivery. You need to update the
# local_recipient_maps setting if:
#
# - You define $mydestination domain recipients in files other than
# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
# For example, you define $mydestination domain recipients in
# the $virtual_mailbox_maps files.
#
# - You redefine the local delivery agent in master.cf.
#
# - You redefine the "local_transport" setting in main.cf.
#
# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
# feature of the Postfix local delivery agent (see local(8)).
#
# Details are described in the LOCAL_RECIPIENT_README file.
#
# Beware: if the Postfix SMTP server runs chrooted, you probably have
# to access the passwd file via the proxymap service, in order to
# overcome chroot restrictions. The alternative, having a copy of
# the system passwd file in the chroot jail is just not practical.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify a bare username, an @domain.tld
# wild-card, or specify a [email]user@domain.tld[/email] address.
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
# The unknown_local_recipient_reject_code specifies the SMTP server
# response code when a recipient domain matches $mydestination or
# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
# and the recipient address or address local-part is not found.
#
# The default setting is 550 (reject mail) but it is safer to start
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
unknown_local_recipient_reject_code = 550
# TRUST AND RELAY CONTROL
# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in postconf(5).
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.
#
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network. Instead, specify an explicit
# mynetworks list by hand, as described below.
#
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
mynetworks = 10.166.211.0/24, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
# The relay_domains parameter restricts what destinations this system will
# relay mail to. See the smtpd_recipient_restrictions description in
# postconf(5) for detailed information.
#
# By default, Postfix relays mail
# - from "trusted" clients (IP address matches $mynetworks) to any destination,
# - from "untrusted" clients to destinations that match $relay_domains or
# subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces or $proxy_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
# These destinations do not need to be listed in $relay_domains.
#
# Specify a list of hosts or domains, /file/name patterns or type:name
# lookup tables, separated by commas and/or whitespace. Continue
# long lines by starting the next line with whitespace. A file name
# is replaced by its contents; a type:name table is matched when a
# (parent) domain appears as lookup key.
#
# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction description in postconf(5).
#
#relay_domains = $mydestination
# INTERNET OR INTRANET
# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport(5) table. When
# no relayhost is given, mail is routed directly to the destination.
#
# On an intranet, specify the organizational domain name. If your
# internal DNS uses no MX records, specify the name of the intranet
# gateway host instead.
#
# In the case of SMTP, specify a domain, host, host:port, [host]:port,
# [address] or [address]:port; the form [host] turns off MX lookups.
#
# If you're connected via UUCP, see also the default_transport parameter.
#
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
# REJECTING UNKNOWN RELAY USERS
#
# The relay_recipient_maps parameter specifies optional lookup tables
# with all addresses in the domains that match $relay_domains.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown relay users. This feature is off by default.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify an @domain.tld wild-card, or specify
# a [email]user@domain.tld[/email] address.
#
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
# INPUT RATE CONTROL
#
# The in_flow_delay configuration parameter implements mail input
# flow control. This feature is turned on by default, although it
# still needs further development (it's disabled on SCO UNIX due
# to an SCO bug).
#
# A Postfix process will pause for $in_flow_delay seconds before
# accepting a new message, when the message arrival rate exceeds the
# message delivery rate. With the default 100 SMTP server process
# limit, this limits the mail inflow to 100 messages a second more
# than the number of messages delivered per second.
#
# Specify 0 to disable the feature. Valid delays are 0..10.
#
#in_flow_delay = 1s
# ADDRESS REWRITING
#
# The ADDRESS_REWRITING_README document gives information about
# address masquerading or other forms of address rewriting including
# username->Firstname.Lastname mapping.
# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
#
# The VIRTUAL_README document gives information about the many forms
# of domain hosting that Postfix supports.
# "USER HAS MOVED" BOUNCE MESSAGES
#
# See the discussion in the ADDRESS_REWRITING_README document.
# TRANSPORT MAP
#
# See the discussion in the ADDRESS_REWRITING_README document.
# ALIAS DATABASE
#
# The alias_maps parameter specifies the list of alias databases used
# by the local delivery agent. The default list is system dependent.
#
# On systems with NIS, the default is to search the local alias
# database, then the NIS alias database. See aliases(5) for syntax
# details.
#
# If you change the alias database, run "postalias /etc/aliases" (or
# wherever your system stores the mail alias file), or simply run
# "newaliases" to build the necessary DBM or DB file.
#
# It will take a minute or so before changes become visible. Use
# "postfix reload" to eliminate the delay.
#
#alias_maps = dbm:/etc/aliases
alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
zdyldy 回复于:2007-10-18 13:07:52
接上贴
# The alias_database parameter specifies the alias database(s) that
# are built with "newaliases" or "sendmail -bi". This is a separate
# configuration parameter, because alias_maps (see above) may specify
# tables that are not necessarily all under control by Postfix.
#
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
# ADDRESS EXTENSIONS (e.g., user+foo)
#
# The recipient_delimiter parameter specifies the separator between
# user names and address extensions (user+foo). See canonical(5),
# local(8), relocated(5) and virtual(5) for the effects this has on
# aliases, canonical, virtual, relocated and .forward file lookups.
# Basically, the software tries user+foo and .forward+foo before
# trying user and .forward.
#
#recipient_delimiter = +
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user. Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail
# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception: delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf. The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus
# The fallback_transport specifies the optional transport in master.cf
# to use for recipients that are not found in the UNIX passwd database.
# This parameter has precedence over the luser_relay parameter.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf. The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =
# The luser_relay parameter specifies an optional destination address
# for unknown recipients. By default, mail for unknown@$mydestination,
# unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
# as undeliverable.
#
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
#
# luser_relay works only for the default Postfix local delivery agent.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must specify "local_recipient_maps =" (i.e. empty) in
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
#luser_relay = $[email]user@other.host[/email]
#luser_relay = $[email]local@other.host[/email]
#luser_relay = admin+$local
# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. The file
# SMTPD_ACCESS_README provides an overview.
# The header_checks parameter specifies an optional table with patterns
# that each logical message header is matched against, including
# headers that span multiple physical lines.
#
# By default, these patterns also apply to MIME headers and to the
# headers of attached messages. With older Postfix versions, MIME and
# attached message headers were treated as body text.
#
# For details, see "man header_checks".
#
#header_checks = regexp:/etc/postfix/header_checks
# FAST ETRN SERVICE
#
# Postfix maintains per-destination logfiles with information about
# deferred mail, so that mail can be flushed quickly with the SMTP
# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
# See the ETRN_README document for a detailed description.
#
# The fast_flush_domains parameter controls what destinations are
# eligible for this service. By default, they are all domains that
# this server is willing to relay mail to.
#
#fast_flush_domains = $relay_domains
# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that follows the 220
# code in the SMTP server's greeting banner. Some people like to see
# the mail version advertised. By default, Postfix shows no version.
#
# You MUST specify $myhostname at the start of the text. That is an
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
# PARALLEL DELIVERY TO THE SAME DESTINATION
#
# How many parallel deliveries to the same user or domain? With local
# delivery, it does not make sense to do massively parallel delivery
# to the same user, because mailbox updates must happen sequentially,
# and expensive pipelines in .forward files can cause disasters when
# too many are run at the same time. With SMTP deliveries, 10
# simultaneous connections to the same domain could be sufficient to
# raise eyebrows.
#
# Each message delivery transport has its XXX_destination_concurrency_limit
# parameter. The default is $default_destination_concurrency_limit for
# most delivery transports. For the local delivery agent the default is 2.
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20
# DEBUGGING CONTROL
#
# The debug_peer_level parameter specifies the increment in verbose
# logging level when an SMTP client or server host name or address
# matches a pattern in the debug_peer_list parameter.
#
debug_peer_level = 1
# The debug_peer_list parameter specifies an optional list of domain
# or network patterns, /file/name patterns or type:name tables. When
# an SMTP client or server host name or address matches a pattern,
# increase the verbose logging level by the amount specified in the
# debug_peer_level parameter.
#
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
# The debugger_command specifies the external command that is executed
# when a Postfix daemon program is run with the -D option.
#
# Use "command .. & sleep 5" so that the debugger can attach before
# the process marches on. If you use an X-based debugger, be sure to
# set up your XAUTHORITY environment variable before starting Postfix.
#
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
# If you can't use X, use this to capture the call stack when a
# daemon crashes. The result is in a file in the configuration
# directory, and is named after the process name and the process ID.
#
# debugger_command =
# PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
# echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
# >$config_directory/$process_name.$process_id.log & sleep 5
#
# Another possibility is to run gdb under a detached screen session.
# To attach to the screen sesssion, su root and run "screen -r
# <id_string>" where <id_string> uniquely matches one of the detached
# sessions (from "screen -list").
#
# debugger_command =
# PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
# -dmS $process_name gdb $daemon_directory/$process_name
# $process_id & sleep 1
# INSTALL-TIME CONFIGURATION INFORMATION
#
# The following parameters are used when installing a new Postfix version.
#
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/sbin/sendmail
# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path = /usr/bin/newaliases
# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq
# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = postdrop
# html_directory: The location of the Postfix HTML documentation.
#
html_directory = /var/www/postfix_html
# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/local/postfix/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /etc/postfix
# readme_directory: The location of the Postfix README files.
#
readme_directory = no
#========================CYRUS-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
#smtpd_sasl_auth_enable = yes
#smtpd_sasl_local_domain = $myhostname
#smtpd_sasl_security_options = noanonymous
#smtpd_sasl_application_name = smtpd
#smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
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 = Welcome to our $myhostname ESMTP,Warning: Version not Available!
#========================Virtual Mailbox Settings=========================
virtual_mailbox_base = /var/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:2525
virtual_gid_maps = static:2525
virtual_transport = maildrop
#virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
#=====================QUOTA Settings===========================
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 Tidy your mailbox and try again lager.
virtual_overquota_bounce = yes
zdyldy 回复于:2007-10-18 13:12:39
十五、安装clamav-0.91.2
最新的clamav-0.91.2需要zlib-1.2.2以上的版本的支持,而RHEL4上的版本为zlib-1.2.1,因此您需要先升级zlib
1、安装zlib-1.2.3
#tar zvxf zlib-1.2.3.tar.gz
#cd zlib-1.2.3
#./configure --prefix=/usr --shared
#make
#make test
2、安装clamav-0.91.2
添加ClamAV运行所需的组和用户:
#groupadd clamav
marion 老大 请看一下 安装zlib-1.2.3
怎么没有
make install
难到这个不用安装么,还是忘写了呢。
yecheng_110 回复于:2007-10-18 16:24:28
LZ能贴一下支持虚拟域和虚拟用户所用到的SQL表吗?
extmail 这个table里面的表是如何建立的?
[ 本帖最后由 yecheng_110 于 2007-10-18 16:29 编辑 ]
zdyldy 回复于:2007-10-18 17:05:40
在另外一台机器上可以用IP地址访问我的extmail
为什么用域名不行呢。
在另外一台机器上,可以解析出我的域名啊,是哪里出了问题呢。
而在我的linux服务器上,用哪种方式都可以访问。
marion 回复于:2007-10-19 10:12:14
引用:marion 老大 请看一下 安装zlib-1.2.3
怎么没有
make install
难到这个不用安装么,还是忘写了呢。
要make install,是忘记写上了。:emn28:
marion 回复于:2007-10-19 10:14:47
引用:原帖由 zdyldy 于 2007-10-18 17:05 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7480248&ptid=987344]
在另外一台机器上可以用IP地址访问我的extmail
为什么用域名不行呢。
在另外一台机器上,可以解析出我的域名啊,是哪里出了问题呢。
而在我的linux服务器上,用哪种方式都可以访问。
如果能解析域名却无法用域名访问,应该是你的apache虚拟主机的问题。
marion 回复于:2007-10-19 10:16:21
引用:原帖由 yecheng_110 于 2007-10-18 16:24 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7479911&ptid=987344]
LZ能贴一下支持虚拟域和虚拟用户所用到的SQL表吗?
extmail 这个table里面的表是如何建立的?
……使用extman源码目录下docs目录中的extmail.sql和init.sql建立数据库:
# cd /var/www/extsuite/extman
# mysql -u root -p <extmail.sql
# mysql -u root -p <init.sql
…………
MYSQLER 回复于:2007-10-19 10:47:07
marion 兄请教一下
小弟只想做内网邮件,不做病毒防护,越简单越好,请指点
zdyldy 回复于:2007-10-19 15:56:51
这是我的http.conf 文件请帮忙看一下啊,就是不能用域名访问.
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/usr/local/apache" will be interpreted by the
# server as "/usr/local/apache/logs/foo.log".
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk. If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/usr/local/apache"
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
<IfModule !mpm_netware_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User vmail
Group vmail
</IfModule>
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. [email]admin@your-domain.com[/email]
#
#ServerAdmin [email]you@example.com[/email]
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#DocumentRoot "/var/www"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
CustomLog logs/access_log common
#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
#CustomLog logs/access_log combined
</IfModule>
<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#
#Scriptsock logs/cgisock
</IfModule>
#
# "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/usr/local/apache/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/httpd/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile /etc/httpd/magic
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off
# Supplemental configuration
#
# The configuration files in the /etc/httpd/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
#Include /etc/httpd/extra/httpd-mpm.conf
# Multi-language error messages
#Include /etc/httpd/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
#Include /etc/httpd/extra/httpd-autoindex.conf
# Language settings
#Include /etc/httpd/extra/httpd-languages.conf
# User home directories
#Include /etc/httpd/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include /etc/httpd/extra/httpd-info.conf
# Virtual hosts
#Include /etc/httpd/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include /etc/httpd/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include /etc/httpd/extra/httpd-dav.conf
# Various default settings
#Include /etc/httpd/extra/httpd-default.conf
# Secure (SSL/TLS) connections
#Include /etc/httpd/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<VirtualHost mail.oli.cn:80>
ServerName mail.oli.cn:80
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>
victorchang 回复于:2007-10-19 16:54:09
我按着文档做的,在开始的时候TELNET 127.0.0.1 25 进行测试都正常呀,
到最后全部调试完,只能WEB方式发邮件,收不到邮件,用FOXMAIL方式不能发和收呀...
我把配置写在这里,看哪位老大帮忙看一下呀...
需要说明的是:我在开始测试WEB发邮件时,总是会提示/var/mailbox/one234.....目录为存的提示,我将one234目录权限设置了一下,就可以发了,,可能是没有权限建立邮件目录的文件吧...
还请MARION多多帮助,弄了一天了,,都快疯了!!!
1./etc/postfix/main.cf
-------------------------------------------------
myhostname = one234.net
myorigin = one234.net
mydomain = one234.net
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 59.108.37.0/24, 127.0.0.0/8
virtual_mailbox_base = /var/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:2525
virtual_gid_maps = static:2525
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
##########################QUOTA Settings########################
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 Tidy your mailbox and try again later.
virtual_overquota_bounce = yes
-------------------------------------------------------------------------------------
2.我把/etc/log/maillog删除了,不知道能不能自动再创建一个...
3.
[root@one234 postfix]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
停在这里了,没有任何反应.
4./usr/lib/sasl2/smtpd.conf
--------------------------------------------------------------------------------------
pwcheck_method: authdaemond
log_level:3
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
5.修改/etc/authdaemonrc 文件
authmodulelist="authmysql"
authmodulelistorig="authmysql"
daemons=10
编辑/etc/authmysqlrc 为以下内容
MYSQL_SERVER localhost
MYSQL_PORT 3306 (指定你的mysql监听的端口,这里使用默认的3306)
MYSQL_USERNAME user (我的MYSQL 管理员帐户)
MYSQL_PASSWORD passwordl (我的MYSQL密码)
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_DATABASE extmail
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_UID_FIELD '2525'
MYSQL_GID_FIELD '2525'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD concat('/var/mailbox/',maildir)
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD concat('/var/mailbox/',maildir)
[ 本帖最后由 victorchang 于 2007-10-19 17:14 编辑 ]
victorchang 回复于:2007-10-19 16:56:24
[color=Red]<VirtualHost mail.oli.cn:80>
ServerName mail.oli.cn:80
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>[/color]
这段你加错地方了...
应该加在httpd.conf所在目录的extra目录的httpd-vhost文件中..
[ 本帖最后由 victorchang 于 2007-10-19 17:15 编辑 ]
marion 回复于:2007-10-19 17:11:48
引用:<VirtualHost mail.oli.cn:80>
ServerName mail.oli.cn:80
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>
将如上改为
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mail.oli.cn:80
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>
victorchang 回复于:2007-10-20 02:05:37
########################Virtual Mailbox Settings########################
virtual_mailbox_base = /var/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:2525
virtual_gid_maps = static:2525
virtual_transport = virtual
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
##########################QUOTA Settings########################
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 Tidy your mailbox and try again later.
virtual_overquota_bounce = yes
没人回复,我就重新做了一遍,做完就一遍就测试一下TELNET 25的操作,结果发现在加完以上的内容后,进行TELNET 127.0.0.1 25 没有反应的原因之处.
有请marion帮助!
抽象派 回复于:2007-10-20 02:57:35
修改相应的头文件指向
# mv /usr/inculde/db4 /usr/inculde/db4.OFF
# rm /usr/inculde/db_cxx.h
# rm /usr/inculde/db.h
# rm /usr/inculde/db_185.h
# ln -sv /usr/local/BerkeleyDB/include /usr/include/db4
# ln -sv /usr/local/BerkeleyDB/include/db.h /usr/include/db.h
# ln -sv /usr/local/BerkeleyDB/include/db_cxx.h /usr/include/db_cxx.h
楼主这段写错了include写成inculde
只是笔误.不影响操作.大家注意一下就好.
victorchang 回复于:2007-10-20 03:47:57
我现在可以发邮件,通过FOXMAIL也可以了,
但在WEBMAIL和FOXMAIL方式都不能收邮件,不知道问题出在哪,
请帮助!!
marion 回复于:2007-10-20 09:04:06
引用:原帖由 抽象派 于 2007-10-20 02:57 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7486963&ptid=987344]
修改相应的头文件指向
# mv /usr/inculde/db4 /usr/inculde/db4.OFF
# rm /usr/inculde/db_cxx.h
# rm /usr/inculde/db.h
# rm /usr/inculde/db_185.h
# ln -sv /usr/local/BerkeleyDB/include /u ...
谢朋友指正,我去修改过来。
marion 回复于:2007-10-20 09:09:16
引用:原帖由 victorchang 于 2007-10-20 03:47 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7486971&ptid=987344]
我现在可以发邮件,通过FOXMAIL也可以了,
但在WEBMAIL和FOXMAIL方式都不能收邮件,不知道问题出在哪,
请帮助!!
看来是多试一次总会有结果的的:)
要想解决问题,你要贴上来的应该是相关的日志!比如对于不能收邮件,你就应该telnet一下本机的110端口(使用客户端登录收邮件也可以)登录邮箱进行邮件收取测试;如果因错误无法进行,日志就是帮助排错的重要信息了。
zdyldy 回复于:2007-10-20 10:08:41
回复 #178 zdyldy 的帖子
QUOTE:
<VirtualHost mail.oli.cn:80>
ServerName mail.oli.cn:80
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>
将如上改为
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mail.oli.cn:80
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
ScriptAlias /extman/cgi /var/www/extsuite/extman/cgi
Alias /extman /var/www/extsuite/extman/html
</VirtualHost>
改过了啊,还是不行啊,用域名还是无法显示。 用IP地址可以访问。
[ 本帖最后由 zdyldy 于 2007-10-20 10:23 编辑 ]
zdyldy 回复于:2007-10-20 10:11:38
我还有一个问题啊,怎么实现群发呢。
我在alias域里设置了一下。可是不好使呢,就不知道在叫哪里设置了。
marion 回复于:2007-10-20 13:28:41
重启httpd服务了没?
这个恐怕你得补充apache设置的有关知识了。
marion 回复于:2007-10-20 13:30:35
引用:原帖由 zdyldy 于 2007-10-20 10:11 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7487201&ptid=987344]
我还有一个问题啊,怎么实现群发呢。
我在alias域里设置了一下。可是不好使呢,就不知道在叫哪里设置了。
有个非常简单的方法,你可以去extman的后台进行群发。
zdyldy 回复于:2007-10-20 13:59:06
回复 #187 zdyldy 的帖子
重启httpd服务了没?
这个恐怕你得补充apache设置的有关知识了。
重启了,可是不好使,按你发的帖子不就能用么。怎么到我这里出了问题呢。唉。
marion 回复于:2007-10-20 14:36:39
引用:原帖由 zdyldy 于 2007-10-20 13:59 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7487780&ptid=987344]
回复 #187 zdyldy 的帖子
重启了,可是不好使,按你发的帖子不就能用么。怎么到我这里出了问题呢。唉。
这个只是你的apache本身的问题,跟邮件服务器没有关系,因为你使用IP可以访问。我给出的仅仅是关于extmail和extman的相关部分的设置。恐怕其他人的都是可以的……
建议去认真检查虚拟主机的设置。
victorchang 回复于:2007-10-20 15:00:24
引用:原帖由 marion 于 2007-10-20 09:09 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7487042&ptid=987344]
看来是多试一次总会有结果的的:)
要想解决问题,你要贴上来的应该是相关的日志!比如对于不能收邮件,你就应该telnet一下本机的110端口(使用客户端登录收邮件也可以)登录邮箱进行邮件收取测试;如果因 ...
首先试试MIRON的回复.
我进行了TELNET 110 测试,在客户端和服务器端.
都提示:+OK hello there ..
至于日志,我昨天将MAILLOG文件给删除了,再就没有生成过日志,我手动建立了一个/VAR/LOG/MAILLOG后,也没有生成任何信息.
在/var/log/message 只有这些日志,不知道有没有用.
Oct 20 19:55:49 one234 sshd(pam_unix)[19372]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.40.182.181 user=nfsnobody
Oct 20 19:55:52 one234 sshd(pam_unix)[19374]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.40.182.181 user=rpcuser
Oct 20 19:55:55 one234 sshd(pam_unix)[19376]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.40.182.181 user=rpc
Oct 20 19:55:58 one234 sshd(pam_unix)[19378]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=59.40.182.181 user=gopher
Oct 20 20:01:01 one234 crond(pam_unix)[19380]: session opened for user root by (uid=0)
Oct 20 20:01:01 one234 crond(pam_unix)[19380]: session closed for user root
Oct 20 20:03:03 one234 sshd(pam_unix)[19384]: session opened for user root by root(uid=0)
Oct 20 20:58:23 one234 sshd(pam_unix)[19457]: session opened for user root by root(uid=0)
Oct 20 21:01:01 one234 crond(pam_unix)[19493]: session opened for user root by (uid=0)
Oct 20 21:01:01 one234 crond(pam_unix)[19493]: session closed for user root
[root@one234 ~]#
marion 回复于:2007-10-20 18:51:45
必须要maillog日志。
你怎么会删除它!!
建议把maillog的属主和属组改为postfix试一下。
yinglikx2006 回复于:2007-10-20 22:08:19
我在安装完EXTMAIL后,访问我的email.thinkce.net后,页面是空白,这是什么原因那, 请各位帮忙,
victorchang 回复于:2007-10-21 00:06:18
引用:原帖由 marion 于 2007-10-20 18:51 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7488360&ptid=987344]
必须要maillog日志。
你怎么会删除它!!
建议把maillog的属主和属组改为postfix试一下。
maillog已经生成日志,按你说的,改成了postfix属组..
我进行了telnet 127.0.0.1 110
user xxx
pass xxx
测试后,生成的日志为:
pop3d:-ERR chdir Maildir failed
zyhui 回复于:2007-10-21 12:34:44
在我安装好clamav、amavisd和SpamAssassin以后,发现图形日志分析不能用了,图片显示不出来,之前还是能用的,这是怎么回事儿?
MYSQLER 回复于:2007-10-21 13:32:54
marion
我按照你的一步步来做.一切都正常,安装完了extmail,还没有安装extman,按照你的提示说可以用web访问了,可是当我访问时出现500 Internal Server Error
查看日志
cat suexec_log
[2007-10-21 03:46:34]: user mismatch (nobody instead of www)
[2007-10-21 03:46:39]: user mismatch (nobody instead of www)
[2007-10-21 03:46:44]: user mismatch (nobody instead of www)
[2007-10-21 03:46:45]: user mismatch (nobody instead of www)
[2007-10-21 03:47:06]: user mismatch (nobody instead of www)
[2007-10-21 03:47:09]: user mismatch (nobody instead of www)
[2007-10-21 03:47:09]: user mismatch (nobody instead of www)
[2007-10-21 03:47:10]: user mismatch (nobody instead of www)
[2007-10-21 03:47:11]: user mismatch (nobody instead of www)
[2007-10-21 03:47:11]: user mismatch (nobody instead of www)
[2007-10-21 03:50:10]: user mismatch (nobody instead of www)
[2007-10-21 03:57:59]: user mismatch (nobody instead of www)
[2007-10-21 03:58:02]: user mismatch (nobody instead of www)
[2007-10-21 03:58:03]: user mismatch (nobody instead of www)
[2007-10-21 03:58:03]: user mismatch (nobody instead of www)
[2007-10-21 03:58:04]: user mismatch (nobody instead of www)
[2007-10-21 03:58:05]: user mismatch (nobody instead of www)
[2007-10-21 03:58:05]: user mismatch (nobody instead of www)
[2007-10-21 03:58:06]: user mismatch (nobody instead of www)
[2007-10-21 03:58:07]: user mismatch (nobody instead of www)
[2007-10-21 03:58:07]: user mismatch (nobody instead of www)
[2007-10-21 03:58:08]: user mismatch (nobody instead of www)
[2007-10-21 03:58:09]: user mismatch (nobody instead of www)
[2007-10-21 03:58:09]: user mismatch (nobody instead of www)
[2007-10-21 03:58:10]: user mismatch (nobody instead of www)
[2007-10-21 04:03:05]: user mismatch (nobody instead of www)
[2007-10-21 04:04:25]: user mismatch (nobody instead of www)
[2007-10-21 04:04:26]: user mismatch (nobody instead of www)
[2007-10-21 04:11:51]: user mismatch (nobody instead of www)
[2007-10-21 04:11:52]: user mismatch (nobody instead of www)
[2007-10-21 04:24:20]: user mismatch (nobody instead of www)
[2007-10-21 04:24:21]: user mismatch (nobody instead of www)
[2007-10-21 04:24:22]: user mismatch (nobody instead of www)
[2007-10-21 13:20:28]: user mismatch (nobody instead of www)
错误日志
[Sun Oct 21 03:58:07 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 03:58:07 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 03:58:08 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 03:58:08 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 03:58:08 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 03:58:09 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 03:58:09 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 03:58:09 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 03:58:09 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 03:58:10 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 03:58:10 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 04:03:05 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 04:03:05 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 04:03:05 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 04:04:25 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 04:04:25 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 04:04:26 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 04:04:26 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 04:11:51 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 04:11:51 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
[Sun Oct 21 04:11:52 2007] [error] [client 192.168.1.7] Premature end of script headers: index.cgi
[Sun Oct 21 04:11:52 2007] [error] [client 192.168.1.7] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
marion 回复于:2007-10-21 20:09:31
装完extman后再进行访问!
marion 回复于:2007-10-21 20:11:06
这样的信息太过简单;
参照前面的帖子,打开authdaemon的日志功能,而后再登录一次,根据相关的日志分析问题症结所在。
marion 回复于:2007-10-21 20:13:01
这个没有遇见过,还真没有办法给你确定的答案。你可以尝试着定位下问题所在。如果有了结果,希望把结果发上来,以供其他人参照。
marion 回复于:2007-10-21 20:13:52
安装完extman后再来访问……
zyhui 回复于:2007-10-21 21:52:09
引用:原帖由 marion 于 2007-10-21 20:13 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7490448&ptid=987344]
这个没有遇见过,还真没有办法给你确定的答案。你可以尝试着定位下问题所在。如果有了结果,希望把结果发上来,以供其他人参照。
查了半天也没查出问题,图片都成红叉了。
在测试的时候还发现个问题,过滤器不能用,查了其他帖子发现标题类型的过滤器有bug,但是别的类型的过滤器可以用,可我的什么类型的过滤器都不能用。
日志:
Oct 21 21:50:55 mail postfix/smtpd[5020]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Oct 21 21:50:56 mail postfix/smtpd[5020]: connect from fk-out-0910.google.com[209.85.128.187]
Oct 21 21:50:58 mail postfix/smtpd[5020]: 27EAC708E6: client=fk-out-0910.google.com[209.85.128.187]
Oct 21 21:50:59 mail postfix/cleanup[5027]: 27EAC708E6: message-id=<[email]ed7994e80710210650u6610175ah1e8e739dd45ef8a@mail.gmail.com[/email]>
Oct 21 21:50:59 mail postfix/qmgr[4461]: 27EAC708E6: from=<[email]email.zyh@gmail.com[/email]>, size=2230, nrcpt=1 (queue active)
Oct 21 21:51:06 mail postfix/smtpd[5032]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Oct 21 21:51:06 mail postfix/smtpd[5032]: connect from localhost.localdomain[127.0.0.1]
Oct 21 21:51:06 mail postfix/smtpd[5032]: CA37F7099C: client=localhost.localdomain[127.0.0.1]
Oct 21 21:51:06 mail postfix/cleanup[5027]: CA37F7099C: message-id=<[email]ed7994e80710210650u6610175ah1e8e739dd45ef8a@mail.gmail.com[/email]>
Oct 21 21:51:06 mail postfix/smtpd[5032]: disconnect from localhost.localdomain[127.0.0.1]
Oct 21 21:51:06 mail postfix/qmgr[4461]: CA37F7099C: from=<[email]email.zyh@gmail.com[/email]>, size=2676, nrcpt=1 (queue active)
Oct 21 21:51:06 mail amavis[3822]: (03822-14) Passed CLEAN, [209.85.128.187] [209.85.128.187] <[email]email.zyh@gmail.com[/email]> -> <[email]hehe@onecheng.com[/email]>, Message-ID: <[email]ed7994e80710210650u6610175ah1e8e739dd45ef8a@mail.gmail.com[/email]>, mail_id: Ewdj4WtIwct3, Hits: 0, size: 2228, queued_as: CA37F7099C, 7452 ms
Oct 21 21:51:06 mail postfix/smtp[5029]: 27EAC708E6: to=<[email]hehe@onecheng.com[/email]>, relay=127.0.0.1[127.0.0.1]:10024, delay=9.5, delays=2/0.02/0.01/7.5, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as CA37F7099C)
Oct 21 21:51:06 mail postfix/qmgr[4461]: 27EAC708E6: removed
Oct 21 21:51:07 mail postfix/pipe[5033]: CA37F7099C: to=<[email]hehe@onecheng.com[/email]>, relay=maildrop, delay=0.29, delays=0.12/0.06/0/0.11, dsn=2.0.0, status=sent (delivered via maildrop service)
Oct 21 21:51:07 mail postfix/qmgr[4461]: CA37F7099C: removed
zdyldy 回复于:2007-10-22 09:45:40
我公司有两个域名,分别为oyun.cn和oyun08.com
我在mailbox里建立了两个用户名:zdyldy@oyun.cn和[email]zdyldy@oyun08.com[/email]
现在要实现的是给这两个邮件地址中的任意一个发邮件,这两个地址都可以收到邮件.
我该怎么做呢.
zdyldy 回复于:2007-10-22 10:36:58
请问
[email]root@extmail.org[/email]的密码怎么修改啊.
marion 回复于:2007-10-22 17:07:38
进入mysql,直接使用SQL命令修改即可。
安全起见,建议新建管理员帐号。
marion 回复于:2007-10-22 17:12:47
具体实现方法很繁琐,建议使用本版提供的“postfix中文权威指南”来了解相关的实现方法。
junger 回复于:2007-10-22 18:08:04
让postfix重新加载配置文件
# /usr/local/postfix/sbin/postfix reload
postfix/postfix-script: fatal: the Postfix mail system is not running
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.13.1/8.13.1; Thu, 18 Oct 2007 18:47:04 -0400
ehlo mail.zhang.org
250-localhost.localdomain Hello zone [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
没有这两行250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
vi /etc/postfix/main.cf
# Global Postfix configuration file. This file lists only a subset
# of all parameters. For the syntax, and for a complete parameter
# list, see the postconf(5) manual page (command: "man 5 postconf").
#
# For common configuration examples, see BASIC_CONFIGURATION_README
# and STANDARD_CONFIGURATION_README. To find these documents, use
# the command "postconf html_directory readme_directory", or go to
# http://www.postfix.org/.
#
# For best results, change no more than 2-3 parameters at a time,
# and test if Postfix still works after every change.
# SOFT BOUNCE
#
# The soft_bounce parameter provides a limited safety net for
# testing. When soft_bounce is enabled, mail will remain queued that
# would otherwise bounce. This parameter disables locally-generated
# bounces, and prevents the SMTP server from rejecting mail permanently
# (by changing 5xx replies into 4xx replies). However, soft_bounce
# is no cure for address rewriting mistakes or mail routing mistakes.
#
#soft_bounce = no
# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
queue_directory = /var/spool/postfix
# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/local/postfix/sbin
# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/local/postfix/libexec
# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes. Specify the name of a user
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
mail_owner = postfix
# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = mail.zhang.org
#myhostname = virtual.domain.tld
# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain = zhang.org
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites. If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# [email]user@that.users.mailhost[/email].
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
myorigin = zhang.org
#myorigin = $mydomain
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
junger 回复于:2007-10-22 18:10:14
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
# proxy or network address translation unit. This setting extends
# the address list specified with the inet_interfaces parameter.
#
# You must specify your proxy/NAT addresses when your system is a
# backup MX host for other domains, otherwise mail delivery loops
# will happen when the primary MX host is down.
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain. On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see VIRTUAL_README).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# STANDARD_CONFIGURATION_README).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,zhang.org,mail.zhang.org
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all names or addresses of users that are local with respect
# to $mydestination, $inet_interfaces or $proxy_interfaces.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
#
# To turn off local recipient checking in the SMTP server, specify
# local_recipient_maps = (i.e. empty).
#
# The default setting assumes that you use the default Postfix local
# delivery agent for local delivery. You need to update the
# local_recipient_maps setting if:
#
# - You define $mydestination domain recipients in files other than
# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
# For example, you define $mydestination domain recipients in
# the $virtual_mailbox_maps files.
#
# - You redefine the local delivery agent in master.cf.
#
# - You redefine the "local_transport" setting in main.cf.
#
# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
# feature of the Postfix local delivery agent (see local(8)).
#
# Details are described in the LOCAL_RECIPIENT_README file.
#
# Beware: if the Postfix SMTP server runs chrooted, you probably have
# to access the passwd file via the proxymap service, in order to
# overcome chroot restrictions. The alternative, having a copy of
# the system passwd file in the chroot jail is just not practical.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify a bare username, an @domain.tld
# wild-card, or specify a [email]user@domain.tld[/email] address.
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
# The unknown_local_recipient_reject_code specifies the SMTP server
# response code when a recipient domain matches $mydestination or
# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
# and the recipient address or address local-part is not found.
#
# The default setting is 550 (reject mail) but it is safer to start
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
unknown_local_recipient_reject_code = 550
# TRUST AND RELAY CONTROL
# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix. See the smtpd_recipient_restrictions parameter
# in postconf(5).
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.
#
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network. Instead, specify an explicit
# mynetworks list by hand, as described below.
#
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
mynetworks = 192.168.1.0/24, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
# The relay_domains parameter restricts what destinations this system will
# relay mail to. See the smtpd_recipient_restrictions description in
# postconf(5) for detailed information.
#
# By default, Postfix relays mail
# - from "trusted" clients (IP address matches $mynetworks) to any destination,
# - from "untrusted" clients to destinations that match $relay_domains or
# subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces or $proxy_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
……
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/sbin/sendmail
# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path = /usr/bin/newaliases
# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq
# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = postdrop
# html_directory: The location of the Postfix HTML documentation.
#
html_directory = /var/www/postfix_html
# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/local/postfix/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /etc/postfix
# readme_directory: The location of the Postfix README files.
#
readme_directory = no
############################CYRUS-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
#smtpd_sasl_auth_enable = yes
#smtpd_sasl_local_domain = $myhostname
#smtpd_sasl_security_options = noanonymous
#smtpd_sasl_application_name = smtpd
#smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!
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 = Welcome to our $myhostname ESMTP,Warning: Version not Available!
下面是一些日志:# tail /var/log/messages
Oct 18 17:26:03 zone named[14788]: named.local:7: using RFC1035 TTL semantics
Oct 18 17:26:03 zone named[14788]: zone localhost/IN: loaded serial 20070301
Oct 18 17:26:03 zone named[14788]: zone zhang.org/IN: NS 'nameserver.zhang.org' has no address records (A or AAAA)
Oct 18 17:26:03 zone named[14788]: zone zhang.org/IN: loaded serial 20071810
Oct 18 17:26:03 zone named[14788]: running
Oct 18 17:32:15 zone su(pam_unix)[14794]: session opened for user redhat by root(uid=0)
Oct 18 17:32:58 zone su(pam_unix)[14822]: session opened for user root by root(uid=2527)
Oct 18 17:33:00 zone su(pam_unix)[14841]: session opened for user root by root(uid=0)
Oct 18 18:26:07 zone su(pam_unix)[15110]: session opened for user redhat by root(uid=0)
Oct 18 18:26:18 zone su(pam_unix)[15139]: session opened for user root by root(uid=2527)
# tail /var/log/maillog
Oct 18 22:05:11 zone postfix/postqueue[15046]: warning: Mail system is down -- accessing queue directly
Oct 18 18:16:48 zone postfix/postfix-script[15099]: starting the Postfix mail system
Oct 18 18:16:48 zone postfix/master[15100]: fatal: bind 0.0.0.0 port 25: Address already in use
Oct 18 18:18:03 zone sendmail[15102]: l9IMGsDq015102: from=redhat@zhang.org, size=32, class=0, nrcpts=1, msgid=<[email]200710182217.l9IMGsDq015102@localhost.localdomain[/email]>, proto=ESMTP, daemon=MTA, relay=zone [127.0.0.1]
Oct 18 18:18:04 zone sendmail[15104]: l9IMGsDq015102: to=root@zhang.org, delay=00:00:19, xdelay=00:00:01, mailer=esmtp, pri=120032, relay=zhang.org. [66.116.125.144], dsn=4.0.0, stat=Deferred: Connection refused by zhang.org.
Oct 18 18:27:31 zone postfix/postfix-script[15177]: fatal: the Postfix mail system is not running
Oct 18 18:32:48 zone postfix/postfix-script[15181]: fatal: the Postfix mail system is not running
Oct 18 18:34:43 zone postfix/postfix-script[15185]: fatal: the Postfix mail system is not running
Oct 18 18:46:51 zone postfix/postfix-script[15192]: fatal: the Postfix mail system is not running
Oct 18 18:49:14 zone sendmail[15194]: l9IMl4hP015194: zone [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
postfix基于cyrus-sasl的认证功能也开启了,另外我以前做的discuz也打不开了!!!
请问高手,问题出在哪里?
[ 本帖最后由 junger 于 2007-10-22 18:15 编辑 ]
yinglikx2006 回复于:2007-10-22 18:36:04
marion 兄,我装了extmail,extman后,我访问
http://email.thinkcore.net/extmail/cgi/index.cgi和
http://email.thinkcore.net/extman/cgi/index.cgi
是页面都是空白,什么错误也没有,
日志内容:
[root@email www]# tail -n 40 /var/log/mail
mail/ maillog maillog.1
[root@email www]# tail -n 40 /var/log/maillog
Oct 22 17:50:32 email postfix/cleanup[4817]: warning: 5CA8CE30194: virtual_alias_maps map lookup problem for [email]root@thinkcore.net[/email]
Oct 22 17:50:32 email postfix/pickup[4906]: warning: 5D098E30194: message has been queued for 3 days
Oct 22 17:50:32 email postfix/pickup[4906]: 5D098E30194: uid=0 from=<root>
Oct 22 17:50:32 email postfix/cleanup[4817]: warning: 5D098E30194: virtual_alias_maps map lookup problem for [email]root@thinkcore.net[/email]
Oct 22 17:51:32 email postfix/pickup[4906]: warning: 5B31EE30194: message has been queued for 1 days
Oct 22 17:51:32 email postfix/pickup[4906]: 5B31EE30194: uid=0 from=<root>
Oct 22 17:51:32 email postfix/cleanup[4817]: warning: 5B31EE30194: virtual_alias_maps map lookup problem for [email]root@thinkcore.net[/email]
Oct 22 17:51:32 email postfix/pickup[4906]: 5C142E30194: uid=0 from=<root>
Oct 22 17:51:32 email postfix/cleanup[4817]: warning: 5C142E30194: virtual_alias_maps map lookup problem for [email]root@thinkcore.net[/email]
Oct 22 17:51:32 email postfix/pickup[4906]: warning: 5D5D6E30194: message has been queued for 2 days
Oct 22 17:51:32 email postfix/pickup[4906]: 5D5D6E30194: uid=0 from=<root>
Oct 22 17:51:32 email postfix/cleanup[4817]: warning: 5D5D6E30194: virtual_alias_maps map lookup problem for [email]root@thinkcore.net[/email]
Oct 22 17:51:32 email postfix/pickup[4906]: warning: 5DBC8E30194: message has been queued for 3 days
Oct 22 17:51:32 email postfix/pickup[4906]: 5DBC8E30194: uid=0 from=<root>
Oct 22 17:51:32 email postfix/cleanup[4817]: warning: 5DBC8E30194: virtual_alias_maps map lookup problem for [email]root@thinkcore.net[/email]
Oct 22 17:52:32 email postfix/pickup[4906]: warning: 5BC02E30194: message has been queued for 1 days
Oct 22 17:52:32 email postfix/pickup[4906]: 5BC02E30194: uid=0 from=<root>
Oct 22 17:52:32 email postfix/cleanup[4817]: 5BC02E30194: message-id=<[email]20071022095232.5BC02E30194@email.thinkcore.net[/email]>
Oct 22 17:52:32 email postfix/qmgr[416]: 5BC02E30194: from=<[email]root@thinkcore.net[/email]>, size=319121, nrcpt=1 (queue active)
Oct 22 17:52:32 email postfix/pickup[4906]: 5E185E3018A: uid=0 from=<root>
Oct 22 17:52:32 email postfix/cleanup[4817]: 5E185E3018A: message-id=<[email]20071022095232.5E185E3018A@email.thinkcore.net[/email]>
Oct 22 17:52:32 email postfix/qmgr[416]: 5E185E3018A: from=<[email]root@thinkcore.net[/email]>, size=483649, nrcpt=1 (queue active)
Oct 22 17:52:32 email postfix/pickup[4906]: warning: 61829E30193: message has been queued for 2 days
Oct 22 17:52:32 email postfix/pickup[4906]: 61829E30193: uid=0 from=<root>
Oct 22 17:52:32 email postfix/cleanup[4817]: 61829E30193: message-id=<[email]20071022095232.61829E30193@email.thinkcore.net[/email]>
Oct 22 17:52:32 email postfix/qmgr[416]: 61829E30193: from=<[email]root@thinkcore.net[/email]>, size=110532, nrcpt=1 (queue active)
Oct 22 17:52:32 email postfix/pickup[4906]: warning: 62F16E30189: message has been queued for 3 days
Oct 22 17:52:32 email postfix/pickup[4906]: 62F16E30189: uid=0 from=<root>
Oct 22 17:52:32 email postfix/cleanup[4817]: 62F16E30189: message-id=<[email]20071022095232.62F16E30189@email.thinkcore.net[/email]>
Oct 22 17:52:32 email postfix/local[4917]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Oct 22 17:52:32 email postfix/local[4918]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Oct 22 17:52:32 email postfix/local[4917]: 5BC02E30194: to=<[email]root@thinkcore.net[/email]>, orig_to=<root>, relay=local, delay=136228, delays=136228/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 22 17:52:32 email postfix/qmgr[416]: 62F16E30189: from=<[email]root@thinkcore.net[/email]>, size=3276, nrcpt=1 (queue active)
Oct 22 17:52:32 email postfix/qmgr[416]: 5BC02E30194: removed
Oct 22 17:52:32 email postfix/local[4918]: 5E185E3018A: to=<[email]root@thinkcore.net[/email]>, orig_to=<root>, relay=local, delay=49828, delays=49828/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 22 17:52:32 email postfix/qmgr[416]: 5E185E3018A: removed
Oct 22 17:52:32 email postfix/local[4918]: 62F16E30189: to=<[email]root@thinkcore.net[/email]>, orig_to=<root>, relay=local, delay=309030, delays=309030/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 22 17:52:32 email postfix/qmgr[416]: 62F16E30189: removed
Oct 22 17:52:33 email postfix/local[4917]: 61829E30193: to=<[email]root@thinkcore.net[/email]>, orig_to=<root>, relay=local, delay=222630, delays=222629/0.01/0/1.1, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 22 17:52:33 email postfix/qmgr[416]: 61829E30193: removed
yinglikx2006 回复于:2007-10-22 18:43:21
并且我的telnet localhost 25 一切都正常啊,请问这是那里配置的问题呢?
zdyldy 回复于:2007-10-23 09:31:00
回复 #204 zdyldy 的帖子
具体实现方法很繁琐,建议使用本版提供的“postfix中文权威指南”来了解相关的实现方法。
marion老,您说的“postfix中文权威指南”在哪呢.我怎么才能看到呢.
marion 回复于:2007-10-23 11:26:30
引用:Oct 18 18:16:48 zone postfix/postfix-script[15099]: starting the Postfix mail system
Oct 18 18:16:48 zone postfix/master[15100]: fatal: bind 0.0.0.0 port 25: Address already in use
这个表明你的25端口在使用中,建议查看是否sendmil仍在运行!!!
marion 回复于:2007-10-23 11:30:10
如果postfix没有问题,你应该去apache的日志文件中查看问题所在。
marion 回复于:2007-10-23 11:31:57
引用:原帖由 zdyldy 于 2007-10-23 09:31 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7497271&ptid=987344]
回复 #204 zdyldy 的帖子
marion老,您说的“postfix中文权威指南”在哪呢.我怎么才能看到呢.
本版的置顶帖子中有提供下载!!!!
zdyldy 回复于:2007-10-23 13:24:46
[root@mail Mail-SPF-v2.005]# perl Makefile.PL
# running Build.PL
/usr/bin/perl Build.PL
Creating custom builder _build/lib/MyModuleBuilder.pm in _build/lib
Checking whether your kit is complete...
Looks good
Checking prerequisites...
- ERROR: Error is not installed
- ERROR: version is not installed
ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions
of the modules indicated above before proceeding with this installation
Creating new 'Build' script for 'Mail-SPF' version 'v2.005'
[root@mail Mail-SPF-v2.005]#
[ 本帖最后由 zdyldy 于 2007-10-23 16:20 编辑 ]
victorchang 回复于:2007-10-23 13:30:55
1.我的不能WEBMAIL不能收邮件的问题已经解决.
按手册做的是mydestination = $mydomain, $myhostname
执行命令:postconf -e mydestination=
将/ETC/POSTFIX/MAIN.CF文件中设置成mydestination=
就可以收邮件了,但是现在遇新的问题:
在收到新邮件后,没有办法进入邮箱查询.提示错误:
Can't open /var/mailbox/one234.net/cy/Maildir//./new/1193138694.Vfd00I1ec34cM605786.localhost.localdomain, Permission denied
我就这个文件执行权限设置chmod -R 777 后,就可以正常进入邮箱了.
2.通过exman新建了帐户test,并通过WEBMAIL方式给自己发信,和另外一个邮箱发信..
另外一个邮箱是公网的,收到了,本身没有收到.
/VAR/LOG/MAILLOG提示信息:
t>, size=507, nrcpt=2 (queue active)
Oct 23 14:18:28 localhost postfix/virtual[4821]: warning: maildir access problem for UID/GID=2525/2525: create maildir file /var/mailbox/one234.net/test/Maildir/tmp/1193141908.P4821.localhost.localdomain: Permission denied
[ 本帖最后由 victorchang 于 2007-10-23 14:26 编辑 ]
zdyldy 回复于:2007-10-23 14:40:51
QUOTE:
原帖由 zdyldy 于 2007-10-23 09:31 发表
回复 #204 zdyldy 的帖子
marion,您说的“postfix中文权威指南”在哪呢.我怎么才能看到呢.
本版的置顶帖子中有提供下载!!!!
http://marion.cublog.cn 是这个网站么,怎么没找到呢.
victorchang 回复于:2007-10-23 15:35:13
引用:原帖由 zdyldy 于 2007-10-23 14:40 发表 [url=http://bbs.chinaunix.net/redirect.php?goto=findpost&pid=7499644&ptid=987344]
QUOTE:
原帖由 zdyldy 于 2007-10-23 09:31 发表
回复 #204 zdyldy 的帖子
marion,您说的“postfix中文权威指南”在哪呢.我怎么才能看到呢.
本版的置顶帖子中有提供下载!!!!
http://marion.cublog ...
你应该学会GOOGLE搜呀..
http://www.sbear.cn/archives/63
junger 回复于:2007-10-23 16:15:21
安装Courier authentication library
# tar jxvf courier-authlib-0.59.3.tar.bz2
# cd courier-authlib-0.59.3
#./configure
--prefix=/usr/local/courier-authlib
--sysconfdir=/etc
--without-authpam
--without-authldap
--without-authpwd
--without-authshadow
--without-authvchkpw
--without-authpgsql
--with-authmysql
--with-mysql-libs=/usr/local/mysql/lib/mysql
--with-mysql-includes=/usr/local/mysql/inculde/mysql
--with-redhat
--with-authmysqlrc=/etc/authmysqlrc
--with-authdaemonrc=/etc/authdaemonrc
CFLAGS="-march=i686 -O2 -fexpensive-optimizations"
CXXFLAGS="-march=i686 -O2 -fexpensive-optimizations"
# make;make install
make all-recursive
make[1]: Entering directory `/usr/local/src/courier-authlib-0.59.3'
Making all in gdbmobj
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
Making all in md5
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/md5'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/md5'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/md5'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/md5'
Making all in sha1
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/sha1'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/sha1'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/sha1'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/sha1'
Making all in libhmac
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
Making all in numlib
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/numlib'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/numlib'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/numlib'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/numlib'
Making all in makedat
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/makedat'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/makedat'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/makedat'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/makedat'
Making all in userdb
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/userdb'
Making all in rfc822
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
Making all in random128
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/random128'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/random128'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/random128'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/random128'
Making all in liblock
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblock'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblock'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/liblock'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/liblock'
Making all in liblog
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblog'
make all-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblog'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/liblog'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/liblog'
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3'
Compiling authmysql.c
In file included from authmysql.c:18:
authmysql.h:8:19: mysql.h: No such file or directory
authmysql.h:9:20: errmsg.h: No such file or directory
make[2]: *** [authmysql.lo] Error 1
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/courier-authlib-0.59.3'
make: *** [all] Error 2
make install-recursive
make[1]: Entering directory `/usr/local/src/courier-authlib-0.59.3'
Making install in gdbmobj
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/gdbmobj'
Making install in md5
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/md5'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/md5'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/md5'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/md5'
Making install in sha1
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/sha1'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/sha1'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/sha1'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/sha1'
Making install in libhmac
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/libhmac'
Making install in numlib
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/numlib'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/numlib'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/numlib'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/numlib'
Making install in makedat
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/makedat'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/makedat'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/makedat'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/makedat'
Making install in userdb
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make install-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make[4]: Entering directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make[4]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/courier-authlib/man/man8" || mkdir -p -- "/usr/local/courier-authlib/man/man8"
/usr/bin/install -c -m 644 './makeuserdb.8' '/usr/local/courier-authlib/man/man8/makeuserdb.8'
/usr/bin/install -c -m 644 './userdb.8' '/usr/local/courier-authlib/man/man8/userdb.8'
/usr/bin/install -c -m 644 './userdbpw.8' '/usr/local/courier-authlib/man/man8/userdbpw.8'
make[4]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/userdb'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/userdb'
Making install in rfc822
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make install-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make[4]: Entering directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/rfc822'
Making install in random128
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/random128'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/random128'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/random128'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/random128'
Making install in liblock
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblock'
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblock'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/liblock'
make[2]: Leaving directory `/usr/local/src/courier-authlib-0.59.3/liblock'
Making install in liblog
make[2]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblog'
make install-am
make[3]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblog'
make[4]: Entering directory `/usr/local/src/courier-authlib-0.59.3/liblog'
test -z "/usr/local/courier-authlib/sbin" || mkdir -p -- "/usr/local/courier-authlib/sbin"
/bin/sh ./libtool --mode= |