我在FreeBSD 6.2 上组建的邮件系统
我在FreeBSD 6.2 上组建的邮件系统(我实验了3次,均成功)我在FreeBSD 6.2release上组建的邮件系统(参照<<在FreeBSD 6上组建ISP级的邮件系统>>文章的改动与注意点)
FreeBSD 6.2release for i386
各个软件版本的选择,均出于稳定第一的考虑
我的系统硬件:SC1420 cpu 2.8Ghz (支持em64)
分区
/ 2G
swap 2G
/home 2G
/usr 8g
/var 10G
/data 255G (余下全部,邮件存储目录)
三、安装数据库 MySQL
#cd /usr/ports/databases/mysql41-server/
#make install clean
在/etc/rc.conf 加入
mysql_enable="YES"
启动MySQL (我干脆reboot了机器)
#/usr/local/etc/rc.d/mysql-server start
四、安装Apache
1、安装apache server
#cd /usr/ports/www/apache20/
#make install clean
在/etc/rc.conf 中加入:
apache20_enable="YES"
出现下列Options 时,我什么也没有选,直接选OK
Options for gettext 0.14.5_2
[ ] EXAMPLES install example files
[ ] HTMLMAN install man pages in HTML format
##########
启动apache server
# /usr/local/etc/rc.d/apache2.sh start
2、安装PHP
#cd /usr/ports/lang/php5/
#make install clean
出现下列Options 时,我的选择如下:
Options for php5 5.1.6_3
[X] CLI Build CLI version
[X] CGI Build CGI version
[X] APACHE Build Apache module
[ ] DEBUG Enable debug
[X] SUHOSIN Enable Suhosin protection system
[X] MULTIBYTE Enable zend multibyte support
[ ] IPV6 Enable ipv6 support
[ ] REDIRECT Enable force-cgi-redirect support (CGI only)
[ ] DISCARD Enable discard-path support (CGI only)
[X] FASTCGI Enable fastcgi support (CGI only)
[X] PATHINFO Enable path-info-check support (CGI only)
##########
在/usr/local/etc/apache20/httpd.conf 里加入
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
加入目录索引 index.php,约在httpd.conf 的212行
DirectoryIndex index.html index.php
restart或reload Apache 使之生效
启动apache server
# /usr/local/etc/rc.d/apache2.sh start
3.我不专门安装PHP 扩展,在安装phpmyadmin时会自动安装的。
4、安装phpmyadmin 管理数据库
#cd /usr/ports/databases/phpmyadmin/
#make install clean
在这里建议大家,如果没有必要尽量不要安装GD库免得浪费时间,大家可据自己需要选择安装模块
Options for phpMyAdmin 2.9.0.2
[ ] BZ2 bzip2 library support
[ ] GD GD library support
[ ] MYSQLI Improved MySQL support
[X] OPENSSL OpenSSL support
[ ] PDF PDFlib support (implies GD)
[ ] ZLIB ZLIB support
[X] MCRYPT MCrypt library support
[X] MBSTRING Multi-byte character-set string support
5、安装extman
extman 是extmail用户后台管理系统,官方网站为[url]www.extmail.org[/url] 下载解压
#tar zxvf extman-13-20060102.tar.gz
#cd extman-0.13-20060102/docs
#mysql -u root -p <extmail.sql
Enter password:
#mysql -u root -p <init.sql
Enter password:
extmail.sql添加了两个MySQL用户
1、只读用户:extmail 密码:extmail
2、读/写用户:webman 密码:webman
init.sql 里,对extmail数据库添加了下面的记录
a、添加了一个别名记录 [email]support@extmail.org[/email] ->[email]test@extmail.org[/email]
b、增加了 extmail.org 域
c、增加了[email]test@extmail.org[/email]的邮箱密码为test。
d、增加了extman 的管理员[email]root@extmail.org[/email] 密码为extmail
五、安装邮件系统
安装下面三个软件要注意先后顺序
1、安装 Courier-IMAP
#cd /usr/ports/mail/courier-imap/
#make install clean
选择openssl、MySQL
在/etc/rc.conf 加入
courier_authdaemond_enable="YES"
courier_imap_pop3d_enable="YES"
courier_imap_imapd_enable="YES"
修改authdaemond的权限
#/usr/local/etc/rc.d/courier-authdaemond start
#chmod -R +x /var/run/authdaemond/
authdaemond 启动完成后,检查/var/run/authdaemond 下面是否产生socket 文件,因为认证时是通过这个文件读取密码的。
如果没有这一步: chmod -R +x /var/run/authdaemond/
会出现:
Jan 12 10:31:17 sun1 maildrop[992]: Temporary authentication failure.
Jan 12 10:31:17 sun1 postfix/pipe[957]: 47B6A4B017: to=<[email]xxx@xxx.edu.cn[/email]>, relay=mai
ldrop, delay=0.09, delays=0.08/0/0/0.01, dsn=4.3.0, status=deferred (temporary fail
ure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/lo
cal/bin/maildrop: Temporary authentication failure. )
设置/usr/local/etc/authlib/authdaemonrc
#cp authdaemonrc authdaemonrc.bak
ee authdaemonrc
在authdaemonrc 加入下面的内容(或修改,我是在原文上修改的)
authmodulelist="authmysql"
authmodulelistorig="authmysql"
version="authdaemond.mysql"
daemons=5
authdaemonvar=/var/run/authdaemond
subsystem=mail
DEBUG_LOGIN=2
DEFAULTOPTIONS="wbnodsn=1"
上面DEBUG_LOGIN=2 是为了调试方便,等系统完全测试完成,可改为 0,即不显示调试信息。
设置/usr/local/etc/authlib/authmysqlrc
#cp authmysqlrc authmysqlrc.bak
ee authmysqlrc
加入下面的内容 (或修改,我是在原文上修改的)
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE extmail
MYSQL_SELECT_CLAUSE SELECT username,password,"",uidnumber,gidnumber,\
CONCAT('/data/domains/',homedir), \
CONCAT('/data/domains/',maildir), \
quota, \
name \
FROM mailbox \
WHERE username = '$(local_part)@$(domain)'
大家要注意,我的邮件保存的目录是/data/domains ,你可以跟据你的需要改为自己的目录。
用户名和密码是extmail 这个具体需要看extman 软件包中的docs 目录中的extmail.sql,很多人无法通上发信认证,很可能以上面两个文件配置有关。
创建pop3/imap 的配置文件
#cp pop3d.cnf.dist pop3d.cnf
#cp imapd.cnf.dist imapd.cnf
2、安装 Cyrus-SASL2
#cd /usr/ports/security/cyrus-sasl2
#make install WITH_AUTHDAEMON=yes
创建 /usr/local/lib/sasl2/smtpd.conf 加入下面的内容
pwcheck_method:authdaemond
log_level:3
mech_list:PLAIN LOGIN
authdaemond_path:/var/run/authdaemond/socket
检查/usr/local/lib/sasl2/smtpd.conf,这个文件的每一行后面是否多了一些空格,要把空格删除。
很多人无法通上发信认证,很可能与多了一些空格有关。
3、安装Postfix
#cd /usr/ports/mail/postfix
#make install clean
选择PCRE、SASL2 、TLS、MySQL、VDA ,安装过程中有两个提问,直接按回车,使用系统默认的回答。
#echo postfix: root >> /etc/aliases
#/usr/local/bin/newaliases
#mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
#ln -s /usr/local/sbin/sendmail /usr/sbin/sendmail
如果出现ln: /usr/sbin/sendmail: File exists 提示,把/usr/sbin/sendmail改名再链接。
设置postfix 随系统启动
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
创建/etc/periodic.conf 加入下面的内容
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
配置/usr/local/etc/postfix/main.cf ,在你安装时,只需要修改####BASE#### 部分即可
#mv main.cf main.cf.bak
这个配置文件已经加入了maildrop的支持
###################BASE##################
myhostname=mail.extmail.org #机器的名字
mydomain = extmail.org #你的域名
#mydestination = $myhostname #与下一行二选一
mydestination = #要通过虚拟域用户(虚拟帐户)发信认证,mydestination = 必须设置为空。
#将$myhostname 从mydestination里去掉,否则postfix会认为$myhostname 放的是系统帐户,
#很多人无法通过虚拟域用户发信认证,很可能与此有关。
local_recipient_maps =
command_directory = /usr/local/sbin
#local_transport = virtual
smtpd_banner = extmail.org ESMTP Mail System
message_size_limit = 14680064 #邮件大小
#mailbox_size_limit = 512000000
#################MySQL################
virtual_alias_maps =mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
#virtual_gid_maps = static:125
#virtual_gid_maps = static:1000
virtual_mailbox_base = /data/domains #邮件保存的目录
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
#virtual_mailbox_limit = 512000000
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
#virtual_minimum_uid = 125
#virtual_minimum_uid = 1000
#virtual_transport = virtual
virtual_transport = maildrop:
maildrop_destination_recipient_limit = 1
#virtual_uid_maps = static:125
#virtual_uid_maps = static:1000
################Quota################
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql_virtual_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry,the user's Maildir has overdrawn his diskspace quota ,please tray again later.
virtual_overquota_bounce = yes
##############SASL####################
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_unauth_pipelining,
reject_invalid_hostname,
reject_rbl_client cbl.anti-spam.org.cn #CBL 服务器 具体请看anti-spam.org.cn
#注意上面几行前面是有空格的。
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
html_directory = no
setgid_group = maildrop
manpage_directory = /usr/local/man
daemon_directory = /usr/local/libexec/postfix
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
以下四个文件在extman 软件包Docs 目录里,使用时,直接复制到/usr/local/etc/postfix 目录即可。
mysql_virtual_alias_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = alias
select_field = goto
where_field = address
additional_conditions = AND active = '1'
mysql_virtual_domains_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = domain
select_field = description
where_field = domain
additional_conditions = AND active = '1'
mysql_virtual_mailbox_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = maildir
where_field = username
additional_conditions = AND active = '1'
mysql_virtual_mailbox_limit_maps.cf
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = quota
where_field = username
additional_conditions = AND active = '1'
至此postfix 基本设置完成,但还不能收发邮件。
4、安装maildrop
我们在设置邮件服务器时MTA 部分还是使用posfix 本身的帐户进行处理邮件,由于maildrop 不能和postfix 与同一用户身份处理邮件,所以我们新开一个用户用户maildrop 处理。
添加vgroup
#pw groupadd vgroup -g 1000
添加vuser
#pw useradd vuser -g 1000 -u 1000 -s /sbin/nologin -d /sbin/nologin -c "virtual mail user"
安装maildrop,记得要把WITH_AUTHLIB=yes 加上
#cd /usr/ports/mail/maildrop
#make install WITH_AUTHLIB=yes
选择AUTH_MYSQL
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Options for maildrop 2.0.1 x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [ ] AUTH_LDAP LDAP support x x
x x [X] AUTH_MYSQL MySQL support x x
x x [ ] AUTH_PGSQL PostgreSQL support x x
x x [ ] AUTH_USERDB Userdb support x x
x x [ ] AUTH_VCHKPW Vpopmail/vchkpw support x x
修改/usr/local/etc/postfix/master.cf ,把maildrop 原先已有的记录注译(即删除旧记录),加上下面的内容
maildrop unix - n n - - pipe
flags=DRhu user=vuser argv=/usr/local/bin/maildrop -d ${user}@${nexthop} ${recipient} ${user} ${extension} ${nexthop}
或者把 原来master.cf 文件中的user=vmail 改为 vuser,其余不变也可以。
设置邮件存储目录
#mkdir -p /data/domains/extmail.org/test
#/usr/local/bin/maildirmake /data/domains/extmail.org/test/Maildir
#chown -R 1000:1000 /data/domains/
至此,我们的邮件系统基础部分已经安装完成了。重启系统,开始进行测试。
六、测试系统
1、测试maildrop 是否正常
建议进入系统后去检查/etc/rc.conf 中的服务是否正常。
注意邮件系统用户名格式是:[email]user@domain.ltd[/email] ,是支持多域的,和平时用的有点不一样。
用SecureCRT 新开 二个窗口,其中一个用于输入命令,一个查看maillog
#tail -f /var/log/maillog
观察下面的操作,证明maildrop 已投递正常
#echo "test" | maildrop -V 10 -d [email]test@extmail.org[/email]
maildrop: authlib: groupid=1000
maildrop: authlib: userid=1000
maildrop: authlib: logname=test@extmail.org, home=/home/data/domains/extmail.org/test, mail=/home/data/domains/extmail.org/test/Maildir/
maildrop: Changing to /home/data/domains/extmail.org/test
Message start at 0 bytes, envelope sender=test@extmail.org
maildrop: Attempting .mailfilter
WARN: quota string '5242880' not parseable
maildrop: Delivery complete.
maillog 将会有如下显示
Mar 10 14:39:58 mail authdaemond: Authenticated: sysusername=, sysuserid=1000, sysgroupid=1000,
homedir=/home/data/domains/extmail.org/test, address=test@extmail.org, fullname=Test user,
maildir=/home/data/domains/extmail.org/test/Maildir/, quota=5242880, options=
Mar 10 14:39:58 mail authdaemond: Authenticated: clearpasswd=, passwd={crypt}uywiuN.XggXXc
八、安装extmail /extman
1、设置apache 的运行身份
修改/usr/local/etc/apache2/httpd.conf
#User www
#Group www
User vuser
Group vgroup
在httpd.conf 加入下面的内容
Alias /extman/cgi/ /usr/local/www/apache2/cgi-bin/extman/cgi/
Alias /extman /usr/local/www/apache2/cgi-bin/extman/html/
<Location "/extman/cgi">
SetHandler cgi-script
Options +ExecCGI
AllowOverride All
</Location>
# config for ExtMail
Alias /extmail/cgi/ /usr/local/www/apache2/cgi-bin/extmail/cgi/
Alias /extmail /usr/local/www/apache2/cgi-bin/extmail/html/
<Location "/extmail/cgi">
SetHandler cgi-script
Options +ExecCGI
AllowOverride All
</Location>重启apahce
#/usr/local/etc/rc.d/apache2.sh restart
Performing sanity check on apache2 configuration:
Syntax OK
Stopping apache2.
Waiting for PIDS: 461.
Performing sanity check on apache2 configuration:
Syntax OK
Starting apache2.
2、安装extmail
从extmail官方网站:[url]www.extmail.org[/url] 下载最新版式
tar zxvf extmail-23-20060219.tar.gz
#cp -r extmail-0.23-20060219/ /usr/local/www/apache2/cgi-bin/extmail
创建配置文件
#cd /usr/local/www/cgi-bin/extmail/
#cp webmail.cf.default webmail.cf
修改配置文件,我只把需要修改的地方贴出来
# sys_config, the config file and webmail programe root
SYS_CONFIG = /usr/local/www/apache2/cgi-bin/extmail/
# sys_langdir, the i18n dir
SYS_LANGDIR = /usr/local/www/apache2/cgi-bin/extmail/lang
# sys_templdir, the template dir
SYS_TEMPLDIR = /usr/local/www/apache2/cgi-bin/extmail/html
# sys_netdisk_on, default is off
SYS_NETDISK_ON = 1
# maildir_base, the base dir of user maildir, use absolute path
# if not set.
SYS_MAILDIR_BASE = /home/data/domains
# if mysql, all relate paramters should prefix as SYS_MYSQL
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /tmp/mysql.sock
打开你的浏览器,输入[url]http://ip/extmail[/url] 即可看到登陆窗口
用户名:test
密码:test
域名:extmail.org
3、安装extman
从extmail 官方网站下载软件包,解压复制到/usr/local/www/apache2/cgi-bin目录。
#cd /usr/local/www/cgi-bin/extman/编辑 webman.cf
# sys_config, the config file and webman programe root
SYS_CONFIG = /usr/local/www/cgi-bin/extman/
# sys_langdir, the i18n dir
SYS_LANGDIR = /usr/local/www/cgi-bin/extman/lang
# sys_templdir, the template dir
SYS_TEMPLDIR = /usr/local/www/cgi-bin/extman/html
# maildir_base, the base dir of user maildir, use absolute path
# if not set.
SYS_MAILDIR_BASE = /data/domains
# if mysql, all relate paramters should prefix as SYS_MYSQL
SYS_MYSQL_USER = webman
SYS_MYSQL_PASS = webman
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /tmp/mysql.sock
创建/tmp/extman
#mkdir /tmp/extman
#chmod 777 /tmp/extman/
创建软件包的链接
#cd extman/libs/Ext/
#./buildlink.sh build /usr/local/www/cgi-bin/extmail/libs/Ext/
打开浏览器输入[url]http://ip/extman[/url]
用户名:[email]root@extmail.org[/email] 密码:extmail
其他需要安装的软件
/usr/ports/databases/p5-DBI
/usr/ports/databases/p5-DBD-mysql
/usr/ports/devel/p5-File-Tail
/usr/ports/devel/p5-Time-HiRes
/usr/ports/net/rrdtool
make install clean
最后我所安装的软件
apache-2.0.59 Version 2 of Apache web server with prefork MPM.
autoconf-2.59_2 Automatically configure source code on many Un*x platforms
automake-1.9.6 GNU Standards-compliant Makefile generator (1.9)
courier-authlib-base-0.58_2 Courier authentication library base
courier-authlib-mysql-0.58_2 MySQL support for the Courier authentication library
courier-imap-4.1.1,1 IMAP (and POP3) server that provides access to Maildir mail
cyrus-sasl-2.1.22 RFC 2222 SASL (Simple Authentication and Security Layer)
expat-2.0.0_1 XML 1.0 parser written in C
freetype2-2.2.1_1 A free and portable TrueType font rendering engine
gettext-0.14.5_2 GNU gettext package
gmake-3.81_1 GNU version of 'make' utility
help2man-1.36.4_1 Automatically generating simple manual pages from program o
libart_lgpl-2.3.17_1 Library for high-performance 2D graphics
libiconv-1.9.2_2 A character set conversion library
libltdl-1.5.22 System independent dlopen wrapper
libmcrypt-2.5.7_2 Multi-cipher cryptographic library (used in PHP)
libtool-1.5.22_2 Generic shared library support script
libxml2-2.6.26 XML parser library for GNOME
m4-1.4.4 GNU m4
maildrop-2.0.2 Mail delivery agent (MDA) with filtering abilities
mysql-client-4.1.21 Multithreaded SQL database (client)
mysql-server-4.1.21 Multithreaded SQL database (server)
p5-DBD-mysql-3.0007 MySQL driver for the Perl5 Database Interface (DBI)
p5-DBI-1.52 The perl5 Database Interface. Required for DBD::* modules
p5-File-Tail-0.99.3 Perl Module to read the end of a file as it\'s appended to
p5-Storable-2.15 Persistency for perl data structures
p5-Time-HiRes-1.91,1 A perl5 module implementing High resolution time, sleep, an
p5-gettext-1.05_1 Message handling functions
pcre-6.7 Perl Compatible Regular Expressions library
perl-5.8.8 Practical Extraction and Report Language
php5-5.1.6_3 PHP Scripting Language (Apache Module and CLI)
php5-mbstring-5.1.6_3 The mbstring shared extension for php
php5-mcrypt-5.1.6_3 The mcrypt shared extension for php
php5-mysql-5.1.6_3 The mysql shared extension for php
php5-pcre-5.1.6_3 The pcre shared extension for php
php5-session-5.1.6_3 The session shared extension for php
phpMyAdmin-2.9.0.2 A set of PHP-scripts to manage MySQL over the web
pkg-config-0.21 A utility to retrieve information about installed libraries
png-1.2.12_1 Library for manipulating PNG images
postfix-2.3.3,1 A secure alternative to widely-used Sendmail
rrdtool-1.2.15 Round Robin Database Tools
sysconftool-0.15 Helps to install application configuration files 赞一个。。。。呵呵。
期待6.2的Release。。。。。 楼主的qq号是多少,我做了N遍了就是不成功 Jan 17 16:09:46 mail postfix/trivial-rewrite[723]: fatal: mysql:/usr/local/etc/postfix/my sql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
启动BSD的时候为什么出现这个错误 偶freebsd 全是tar 编译安装了.不错.支持.顶 [quote][b]下面是引用wjm1019于2007-01-17 16:21发表的FreeBSD启动的时候为什么出现这个问题:[/b]
Jan 17 16:09:46 mail postfix/trivial-rewrite[723]: fatal: mysql:/usr/local/etc/postfix/my sql_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem
启动BSD的时候为什么出现这个错误[/quote]
1.在/usr/local/etc/postfix/下有mysql_virtual_alias_maps.cf文件吗?
2.mysql_virtual_alias_maps.cf文件中是什么内容?
3.下列步骤做了吗?
######################################
安装 Courier-IMAP
#cd /usr/ports/mail/courier-imap/
#make install clean
选择openssl、MySQL
在/etc/rc.conf 加入
courier_authdaemond_enable="YES"
courier_imap_pop3d_enable="YES"
courier_imap_imapd_enable="YES"
修改authdaemond的权限
#/usr/local/etc/rc.d/courier-authdaemond.sh start
#chmod -R +x /var/run/authdaemond/
authdaemond 启动完成后,检查/var/run/authdaemond 下面是否产生socket 文件,因为认证时是通过这个文件读取密码的。
如果没有这一步
chmod -R +x /var/run/authdaemond/
会出现:
Jan 12 10:31:17 sun1 maildrop[992]: Temporary authentication failure.
Jan 12 10:31:17 sun1 postfix/pipe[957]: 47B6A4B017: to=<[email]xxx@xxx.edu.cn[/email]>, relay=mai
ldrop, delay=0.09, delays=0.08/0/0/0.01, dsn=4.3.0, status=deferred (temporary fail
ure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/lo
cal/bin/maildrop: Temporary authentication failure. )
设置/usr/local/etc/authlib/authdaemonrc
#mv authdaemonrc authdaemonrc.bak
ee authdaemonrc
在authdaemonrc 加入下面的内容
authmodulelist="authmysql"
authmodulelistorig="authmysql"
version="authdaemond.mysql"
daemons=5
authdaemover=/var/run/authdaemond
subsystem=mail
DEBUG_LOGIN=2
DEFAULTOPTIONS="wbnodsn=1"
上面DEBUG_LOGIN=2 是为了调试方便,等系统完全测试完成,可改为 0,即不显示调试信息。
设置/usr/local/etc/authlib/authmysqlrc
#mv authmysqlrc authmysqlrc.bak
ee authmysqlrc
加入下面的内容
MYSQL_SERVER localhost
MYSQL_USERNAME extmail
MYSQL_PASSWORD extmail
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE extmail
MYSQL_SELECT_CLAUSE SELECT username,password,"",uidnumber,gidnumber,\
CONCAT('/home/data/domains/',homedir), \
CONCAT('/home/data/domains/',maildir), \
quota, \
name \
FROM mailbox \
WHERE username = '$(local_part)@$(domain)'
大家要注意,我的邮件保存的目录是/home/data/domains ,你可以跟据你的需要改为自己的目录。
用户名和密码是extmail 这个具体需要看extman 软件包中的docs 目录中的extmail.sql,很多人无法通上发信认证,很可能以上面两个文件配置有关。
创建pop3/imap 的配置文件
#cp pop3d.cnf.dist pop3d.cnf
#cp imapd.cnf.dist imapd.cnf
###################################### 谢谢wjm1019 的指正,对原文做了修改. qq:82326500
先在版上约好时间最好.
要不然你把你的计算机权限打开,我帮你调试一下? 今天更新了笔误部分.觉得应该可以按部就班的安装好了. Hi bsdunix
我根据你的文章创建邮件系统是碰到了一些问题
在启动apache2的时候出现如下的问题
错误提示是 :yntax error on line 934 of /usr/local/etc/apache2/httpd.conf:
Invalid command 'Format:' , perhaps mis-spelled or defined by a module not included in
the server configuration
第934行的配置文件是:Format:Action handler-name /cgi-script/location /usr/local/etc/apache2/httpd.conf文件中第934行语法错误
估计是编辑器的问题引起的问题,最好把要添加的内容用UltraEdit软件保存为unix格式的文件,
再在freebsd下用ee 编辑器把保存的unix格式的文件读入。
实在不行,就在freebsd 的控制台下用ee 一个一个字符敲
随便说一下,在邮件系统的安装过程中,编辑器很讲究。细心、耐心很重要。
祝你顺利。 Can't open file /standard/error.html: file not found at /usr/local/www/cgi-bin/extman/cgi/index.cgi line 22
extmail可以.但.extman出现以上的错误.@@@ [quote][b]下面是引用net_lin于2007-02-07 13:17发表的:[/b]
Can't open file /standard/error.html: file not found at /usr/local/www/cgi-bin/extman/cgi/index.cgi line 22
extmail可以.但.extman出现以上的错误.@@@[/quote]
webman.cf里配置有问题,模板路径或者模板名称不正确。注意extman的版本。0.2*以前的默认模板叫standard,0.2*的就改为default了 我登入extman/cgi/index.cgi 出现错误,这是怎么回事啊
Global symbol "$CFG" requires explicit package name at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp.pm line 103. BEGIN not safe after errors--compilation aborted at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp.pm line 125. Compilation failed in require at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp/Login.pm line 19. BEGIN failed--compilation aborted at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp/Login.pm line 19. Compilation failed in require at /usr/local/www/cgi-bin/extman/cgi/index.cgi line 20. [quote][b]下面是引用zhang3784于2007-02-08 16:17发表的:[/b]
我登入extman/cgi/index.cgi 出现错误,这是怎么回事啊
Global symbol "$CFG" requires explicit package name at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp.pm line 103. BEGIN not safe after errors--compilation aborted at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp.pm line 125. Compilation failed in require at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp/Login.pm line 19. BEGIN failed--compilation aborted at /usr/local/www/cgi-bin/extman/libs/Ext/MgrApp/Login.pm line 19. Compilation failed in require at /usr/local/www/cgi-bin/extman/cgi/index.cgi line 20.[/quote]
不是吧?楼上的是否漏了做哪些步骤?例如buildlink.sh 是忘记了、buildlink.sh
但进入后加新用户,出现的错误:新用户 [email]apple@ute.cn[/email] 添加失败, 原因: Unknown column 'mailhost' in 'field list' 都可以了,使用outlook时,还是会跳出来输入密码,通不过啊,
我的MSN:zhang3784@hotmail.com请高手指点,谢谢!!! extman-0[1].2beta3.tar extmail应该用哪个版本? extmail应该用1.0.0版本(现在),
我原来用1.0.0p5版。 我的extmail为何登入,出现这个,不能登入了
Go Back Re-Login
Session expired, please login again! 在 extman 中添加一个域,再添加一个用户看看。。。 [quote][b]下面是引用xhl于2007-01-17 17:06发表的:[/b]
偶freebsd 全是tar 编译安装了.不错.支持.顶[/quote]
页:
[1]