当前位置: 主页 > 服务器技术 > Mail服务器 > postfix在debian 3.1下安装方法

postfix在debian 3.1下安装方法

时间:2009-12-9来源:互联网 点击:

7、courier-authlib
mail~#wget http://www.courier-mta.org/beta/courier-authlib/courier-authlib-0.56.20050709.tar.bz2
mail~#su - wxt
wxt@mail:~$ tar xjvf /usr/src/mail/courier-authlib-0.56.20050709.tar.bz2 -C /tmp
wxt@mail:~$cd /tmp/courier-authlib-0.56.20050709/
wxt@mail:~$./configure --with-authmysql=yes --with-mailuser=www --with-mailgroup=www
--with-mysql-libs=/opt/mysql/lib/mysql --with-mysql-includes=/opt/mysql/include
/mysql --prefix=/opt/courier-authlib
wxt@mail:~$make
wxt@mail:~$exit
mail~#make install

8、courier-imap
mail~#wget http://www.courier-mta.org/beta/imap/courier-imap-4.0.3.20050702.tar.bz2
mail~#tar zxvf courier-imap-4.0.3.20050702.tar.bz2
mail~#su - wxt
wxt@mail:~$./configure --enable-unicode=utf-8,iso-8859-1,gb2312,gbk,gb18030,big5 --prefix=/opt/courier-imap --disable-root-check --with-trashquota --with-dirsync
  哪果没能完成,出错提示如下
configure: WARNING: === Courier authentication library not found.
configure: WARNING: === You need to download and install
configure: WARNING: === http://www.courier-mta.org/download.php#authlib first.
configure: WARNING: === If courier-authlib is installed in a non-default
configure: WARNING: === directory, set the COURIERAUTHCONFIG environment
configure: WARNING: === variable to the full path to the courierauthconfig
configure: WARNING: === binary and rerun this configure script.
configure: WARNING:
configure: error: courierauthconfig not found
设置变量COURIERAUTHCONFIG
wxt@mail:~$./export COURIERAUTHCONFIG=/opt/courier-authlib/bin/courierauthconfig
wxt@mail:~$./configure --enable-unicode=utf-8,iso-8859-1,gb2312,gbk,gb18030,big5 --prefix=/opt/courier-imap --disable-root-check --with-trashquota --with-dirsync
完成
wxt@mail:~$make
没有完成,出错提示如下
tlspasswordcache.c:9:25: openssl/ssl.h: No such file or directory
tlspasswordcache.c:10:25: openssl/err.h: No such file or directory
tlspasswordcache.c:11:26: openssl/rand.h: No such file or directory
make[3]: *** [tlspasswordcache.o] Error 1
make[3]: Leaving directory `/tmp/courier-imap-4.0.3.20050702/tcpd‘
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/courier-imap-4.0.3.20050702/tcpd‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/courier-imap-4.0.3.20050702‘
make: *** [all] Error 2
没有找到openssl/ssl.h 等头文件
apt-get install libssl-dev或编译安装openssl,也就是要回头检查一下,安装openssl的时候,是不是哪个地方有问题
有可能是这一步没做,做一下 #ln -s /opt/openssl/include/openssl /usr/include/openssl
wxt@mail:~$make
没有完成,出错提示如下
Compiling imaplogin.c
imaplogin.c:35:32: courierauth.h: No such file or directory
imaplogin.c:36:37: courierauthdebug.h: No such file or directory
imaplogin.c:156: warning: `struct authinfo‘ declared inside parameter list
imaplogin.c:156: warning: its scope is only this definition or declaration, which is probably not what you want
imaplogin.c: In function `login_callback‘:
imaplogin.c:166: error: dereferencing pointer to incomplete type
imaplogin.c:167: warning: implicit declaration of function `auth_getoption‘
imaplogin.c:167: error: dereferencing pointer to incomplete type
imaplogin.c:168: warning: assignment makes pointer from integer without a cast
imaplogin.c:172: error: dereferencing pointer to incomplete type
imaplogin.c:177: error: dereferencing pointer to incomplete type
imaplogin.c:181: error: dereferencing pointer to incomplete type
imaplogin.c:196: error: dereferencing pointer to incomplete type
imaplogin.c:197: error: dereferencing pointer to incomplete type
imaplogin.c:220: warning: implicit declaration of function `auth_callback_default‘
imaplogin.c:224: error: dereferencing pointer to incomplete type
imaplogin.c:225: error: dereferencing pointer to incomplete type
imaplogin.c:230: error: dereferencing pointer to incomplete type
imaplogin.c:230: error: dereferencing pointer to incomplete type
imaplogin.c:240: error: dereferencing pointer to incomplete type
imaplogin.c:244: error: dereferencing pointer to incomplete type
imaplogin.c:248: error: dereferencing pointer to incomplete type
imaplogin.c:249: error: dereferencing pointer to incomplete type
imaplogin.c: In function `do_imap_command‘:
imaplogin.c:278: warning: implicit declaration of function `courier_authdebug_login‘
imaplogin.c:372: warning: implicit declaration of function `auth_login‘
imaplogin.c:373: warning: implicit declaration of function `courier_safe_printf‘
imaplogin.c: In function `main‘:
imaplogin.c:451: warning: implicit declaration of function `courier_authdebug_login_init‘
imaplogin.c: In function `login_imap‘:
imaplogin.c:596: warning: implicit declaration of function `DPRINTF‘
make[3]: *** [imaplogin.o] Error 1
make[3]: Leaving directory `/tmp/courier-imap-4.0.3.20050702/imap‘
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/courier-imap-4.0.3.20050702/imap‘
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/courier-imap-4.0.3.20050702‘
make: *** [all] Error 2
修改/tmp/courier-impa-4.3.20050702/imap/Makefile文件中变量CFLAGS,添加-I/opt/courier-authlib/include
保存
wxt@mail:~$make
wxt@mail:~$exit
mail:~#make install
完成
mail:~#imapd.rc /etc/init.d/imapd
mail:~#chmod 755 /etc/init.d/imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc3.d/S54imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc5.d/S54imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc0.d/K45imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc1.d/K45imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc2.d/K45imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc4.d/K45imapd
mail:~#ln -s /etc/init.d/imapd /etc/rc6.d/K45imapd
mail:~#cp pop3d.rc /etc/init.d/pop3d
mail:~#chmod 755 /etc/init.d/pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc3.d/S55pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc5.d/S55pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc0.d/K55pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc1.d/K55pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc2.d/K55pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc4.d/K55pop3d
mail:~#ln -s /etc/init.d/pop3d /etc/rc6.d/K55pop3d

9、postfixadmin
mail:~#wget http://high5.net/postfixadmin/download.php?file=postfixadmin-2.1.0.tgz
mail:~#tar zxvf download.php?file=postfixadmin-2.1.0.tgz -C /opt/apache/htdocs/
mail:~#cp config.inc.php.sample config.inc.php
// Language config
// Language files are located in ‘./languages‘.
$CONF[‘default_language‘] = ‘cn‘;

// Database Config
// ‘database_type‘ is for future reference.
$CONF[‘database_type‘] = ‘mysql‘;
$CONF[‘database_host‘] = ‘localhost‘;
$CONF[‘database_user‘] = ‘postfixadmin‘;
$CONF[‘database_password‘] = ‘postfixadmin‘;
$CONF[‘database_name‘] = ‘postfix‘;

$CONF[‘encrypt‘] = ‘cleartext‘;

// Mailboxes
// If you want to store the mailboxes per domain set this to ‘YES‘.
// Example: /usr/local/virtual/domain.tld/username@domain.tld
$CONF[‘domain_path‘] = ‘YES‘;
// If you don‘t want to have the domain in your mailbox set this to ‘NO‘.
// Example: /usr/local/virtual/domain.tld/username
$CONF[‘domain_in_mailbox‘] = ‘NO‘;

// Quota
// When you want to enforce quota for your mailbox users set this to ‘YES‘.
$CONF[‘quota‘] = ‘YES‘;
$CONF[‘quota_multiplier‘] = ‘1048576‘;

mail:~#chown -R wxt:wxt /opt/apache/htdocs/postfixadmin-2.1.0
mail:~#mysql</opt/apache/htdocs/postfixadmin-2.1.0/DATABASE_MYSQL.TXT

10、配置postfix
修改/etc/postfix/main.cf
#=============sasl2====================#
smtpd_sasl_auth_enable = yes
smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = wjjennluen.com
smtpd_recipient_restrictions = reject_unauth_destination

#=================mysql================#
virtual_transport = virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_mailbox_domains.cf
virtual_mailbox_base = /var/mailbox/
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql_mailbox_maps.cf
virtual_minimum_uid = 1004
virtual_uid_maps = static:1004
virtual_gid_maps = static:1004
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql_alias_maps.cf
mail:~#vi /etc/postfix/mysql/mysql_alias_maps.cf
user = postfix
password = postfix
dbname = postfix

table = alias
select_field = goto
where_field = address
additional_conditions = and active=‘1‘
mail:~#vi /etc/postfix/mysql/mysql_mailbox_domains.cf
user = postfix
password = postfix
dbname = postfix

table = alias
select_field = goto
where_field = address
additional_conditions = and active=‘1‘
mail:~#vi /etc/postfix/mysql/mysql_mailbox_maps.cf
user = postfix
password = postfix
dbname = postfix

table = mailbox
select_field = maildir
where_field = username
additional_conditions = and active=‘1‘

11、squirrelmail
mail:~#wget http://keihanna.dl.sourceforge.net/sourceforge/squirrelmail/squirrelmail-1.4.5-rc1.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fcompatibility-2.0.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fmsg_flags-1.4.3.1-1.4.3.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fchange_mysqlpass-3.2-.2.8.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fquota_usage-1.3-1.2.7.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Faddgraphics-2.3-1.0.3.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fusername-2.3-1.0.0.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fweather-4.1.1-1.2.tar.gz
mail:~#wget http://ufpr.dl.sourceforge.net/sourceforge/squirrelmail/zh_CN-1.4.5-20050713.tar.gz
mail:~#wget http://ufpr.dl.sourceforge.net/sourceforge/squirrelmail/zh_TW-1.4.5-20050713.tar.gz
mail:~#wget http://www.squirrelmail.org/countdl.php?fileurl=http%3A%2F%2Fwww.squirrelmail.org%2Fplugins%2Fattachment_doc.1.2-1.4.4.tar.gz
  解压squirrelmail到/opt/apache/htdocs/squirrelmail,中文补丁也解压到同样的目录,其它补丁解压到/opt/apache/htdocs/squirrelmail/plugin下,把各补丁下的sample配置文件复制为config.php,在/opt/apache/htdocs/squirrelmail下运行configure配置一下基本参数,完成。具体可看解开文件包内的INSTALL或者redme文件,注意要chown -R www:www /opt/apache/htdocs/squirrelmail

站长资讯网
.
分页: [1] [2]
TAG: postfix debian
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言