放大啦资源网 http://www.fangdala.com
当前位置首页 > 百科资料> 正文

Extmail

2023-02-19 04:32:46 暂无评论 百科资料

Extmail 是一个以perl语言编写,面向大容量/ISP级应用,免费的高性能Webmail软件,展田雷主要包括ExtMail、Extman两个部分的程序套件。

  • 外文名称 Extmail
  • 定义 perl语言编写
  • 面向 大容量/ISP级应用
  • 包括 免费的高性能Webmail软件

简介

  ExtMail套件用于提供从浏览器中登录、使用邮件系统的Web操作界面,而Extman套件用于提供从浏览器中管理邮件系统的Web操作界面。它以GPL版权释出,设计初衷是希望设计一个适应当前高速发展的IT应用环境,满足用户多变的需求,能快速进行开发、改进和升级,适应能力强的webmail系统。

  对于国内的电子邮件系统来说,无论是从系统功能、易用性还是中文化等方面,ExtMail 平台都是一个相当不错的选择。Extmail 套件可以提供给普通邮件用户使用,而Extman套件可以提供给邮件系统的管理员使用。

  Extmail还被设计成一个能够棉日束补替代目前国内外一些主流webmail软件的系统,例如:SqWebMail,OpenWebmail及squir微飞善某美皮末rel,Igenus等。

  Ext来自Mail Project 是一个活跃的开源邮件系统项目,目前由ExtMail 团队维护。该项于2005年9月18日正式启动,最初以W360百科ebMail软件为主,至今已逐步形成了ExtMail软件系列。整个项目的目标是开发出高效、 易用、富有生命力的邮件系统(方案),经过粗略的统计,截止2009年10月份,已有超过8000个服务器在运行ExtMail软件,其中有超过4000 个运行在互联网上。

  目前Extmail的主要特任素食胡劳点集中如下:

  支持Maildir,索引技术,速度超快 支持多国语言同屏显示,真正国际邮 支持巨型邮箱(超过1GB)海量文件 支持无限尺寸附件,I/O能力强 模板化,多语言,修改非常容易.

安装

制作_yum轴仅_仓库

  编译CentOS-Base.repo文件

  vi /etc/yum.repos.d/Cen我绿制帝石tOS-Base.repo

  加入如下内容:

  # 该所客EMOS-Base.repo

  #

  # Created by ExtMail Dev Team: http://www.extmail. org/

  #

  # $Id$

听写弦  [EMOS-base]

  name=EMOS-Base

  baseurl=http://mirror. extmail. org/yum/emos/1.5/os/$basearch/

  gpgcheck=0

  pri木至迫学感乡劳ority=0

  protect=0

  [EMOS-update]

  name=EMOS-U丝突依短岁测pdates

  ba言况又热改掌立seurl=http://mirror.<cite class="highlight" highlight="true" style="background-image: none; background-positio斯雨功技职很击你裂n: initial initial; background-repeat: initial init脸爱善士病任密病ial; ">extmail. org</cite>/yum/emos/1.5/updates/$basearch/

  gpgcheck=0

  prior谈轮微占湖五ity=0

  protect=0

  保存后,然后尝试执行经给行套殖编般挥沙时一下yum list 等操作,看看是否已经成功;

配置mta-postfix

  ⒈安装postfix

  # yum -y install postfix

  # yum remove sendmail

  ⒉配置postfix

  # postconf -n > /etc/postfix/main2. cf

  # mv /etc/postfix/main. cf /etc/postfix/main.&nbsp;cf. old

  # mv /etc/postfix/main2.&nb盐将八获上sp;cf /et扩论业企c/postfix/ main&nbsp;.&nbsp;cf

  编辑ma则让刻钢镇事预愿互娘冲in. cf:

  # vi /etc/postfix/main.&nbsp;cf

  增加如下内容:

  # hostname

  mynetworks = 127.0.0.1

  myhostname = mail.centos. bz

  mydestination = $mynetworks $myhostname

  # banner

  mail_name = Postfix - by <cite class="highlight" highlight="true">extmail.&nbsp;org</cite>

  smtpd_banner = $myhostname ESMTP $mail_name

  # response immediately

  smtpd_error_sleep_time = 0s

  # Message and return coolcode control

  message_size_limit = 5242880

  mailbox_size_limit = 5242880

  show_user_unknown_table_name = no

  # Queue lifetime control

  bounce_queue_lifetime = 1d

  maximal_queue_lifetime = 1d

  注:myhostname改为自己的。

  设置postfix开机自启:

  # chkconfig postfix on

配置courier-authlib

  ⒈安装Courier-Authlib

  安装以下软件包:

  # yum -y install courier-authlib

  # yum -y install courier-authlib-mysql

  删除并编辑/etc/authlib/authmysqlrc文件:

  # cat /dev/null >/etc/authlib/authmysqlrc

  # vi /etc/authlib/authmysqlrc

  增加如下内容:

  MYSQL_SERVER localhost

  MYSQL_USERNAME extmail

  MYSQL_PASSWORD extmail

  MYSQL_SOCKET /var/lib/mysql/mysql.sock

  MYSQL_PORT 3306

  MYSQL_OPT 0

  MYSQL_DATABASE extmail

  MYSQL_USER_TABLE mailbox

  MYSQL_CRYPT_PWFIELD password

  MYSQL_UID_FIELD uidnumber

  MYSQL_GID_FIELD gidnumber

  MYSQL_LOGIN_FIELD username

  MYSQL_HOME_FIELD homedir

  MYSQL_NAME_FIELD name

  MYSQL_MAILDIR_FIELD maildir

  MYSQL_QUOTA_FIELD quota

  MYSQL_SELECT_CLAUSE SELECT username,password,"",uidnumber,gidnumber,\

  CONCAT('/home/domains/',homedir),\

  CONCAT('/home/domains/',maildir),\

  quota,\

  name \

  FROM mailbox \

  WHERE username = '$(local_part)@$(domain)'

  修改authdaemonrc文件

  # vi /etc/authlib/authdaemonrc

  修改如下内容:

  authmodulelist="authmysql"

  authmodulelistorig="authmysql"

  或者使用如下命令直接修改:

  sed -i 's/authmodulelist=.*/authmodulelist="authmysql"/g' /etc/authlib/authdaemonrc

  sed -i 's/authmodulelistorig=.*/authmodulelistorig="authmysql"/g' /etc/authlib/authdaemonrc

  ⒉启动courier-authlib:

  # service courier-authlib start

  修改authdaemon socket目录权限

  # chmod 755 /var/spool/authdaemon/

配置maildrop

  ⒈安装maildrop

  # yum -y install maildrop

  配置<cite class="highlight" highlight="true">master . cf</cite> 为了使Postfix支持Maildrop,必须修改/etc/postfix/master&nbsp;. &nbsp;cf文件,注释掉原来的maildrop的配置内容,并改为:

  maildrop unix - n n - - pipe

  flags=DRhu user=vuser argv=maildrop -w 90 -d ${user}@${nexthop} ${recipient} ${user} ${extension} {nexthop}

  注意:flags前面有"两个空格"

  配置main. cf 由于maildrop不支持一次接收多个收件人,因此必须在main.&nbsp;cf里增加如下参数:

  # vi /etc/postfix/main. cf

  maildrop_destination_recipient_limit = 1

  ⒉测试maildrop对authlib支持

  # maildrop -v

  看是否出现以下内容:

  maildrop 2.1.0 Copyright 1998-2005 Double Precision,Inc.

  GDBM/DB extensions enabled.

  Courier Authentication Library extension enabled.

  Maildir quota extension enabled.

  This program is distributed under the terms of the GNU General Public

  License. See COPYING for additional information.

配置webmail-extmail

  ⒈安装ExtMail

  # yum -y install extsuite-webmail

  ⒉编辑<cite class="highlight" highlight="true" style="background-image: none; background-position: initial initial; background-repeat: initial initial; ">webmail . cf</cite>

  # cd /var/www/extsuite/extmail

  # cp webmail . cf.default <cite class="highlight" highlight="true" style="background-image: none; background-position: initial initial; background-repeat: initial initial; ">webmail . cf</cite>

  # vi webmail&nbsp;

  主要变动的内容见下:

  SYS_MYSQL_USER = extmail

  SYS_MYSQL_PASS = extmail

  SYS_MYSQL_DB = extmail

  更新cgi目录权限 由于SuEXEC的需要,必须将extmail的cgi目录修改成vuser:vgroup权限:

  # chown -R vuser:vgroup /var/www/extsuite/extmail/cgi/

配置管理后台-extman

  ⒈yum安装ExtMan

  # yum -y install extsuite-webman

  更新cgi目录权限 由于SuEXEC的需要,必须将extman的cgi目录修改成vuser:vgroup权限:

  # chown -R vuser:vgroup /var/www/extsuite/extman/cgi/

  链接基本库到Extmail

  # mkdir /tmp/extman

  # chown -R vuser:vgroup /tmp/extman

  注意事项:

  由于RedHat发行版中包含了一个叫tmpwatch的工具,该工具会定期扫描/tmp/下的文件,如果这些文件很久都没被使用,将被删除,因此如果后台长期不使用,/tmp/extman目录有可能被tmpwatch删除,所以要么定期登陆后台,要么修改 <cite class="highlight" highlight="true" style="background-image: none; background-position: initial initial; background-repeat: initial initial; ">webman</cite>;将临时目录修改到另一个地方。此处暂以/tmp/extman默认值为例。

  ⒉安装mysql数据库

  # yum -y install mysql mysql-server

  ⒊数据库初始化

  启动Mysql

  # service mysqld start

  # chkconfig mysqld on

  导入mysql数据库结构及初始化数据,root密码默认为空

  # mysql -u root -p < /var/www/extsuite/extman/docs/extmail.sql

  # mysql -u root -p < /var/www/extsuite/extman/docs/init.sql

  注意事项:

  上述导入初始化SQL时,默认的uidnumber/gidnumber都是1000,这和vuser:vgroup 的uid/gid一致,是因为maildrop投递时会从数据库里取uidnumber/gidnumber,而在master&nbsp;.&nbsp;cf里已经定义好了投递时的运行身份(vuser:vgroup),所以这两个字段的内容必须为1000,否则将出现投递错误,例如报0×06等错误。

  ⒋设置虚拟域和虚拟用户的配置文件

  # cd /var/www/extsuite/extman/docs

  # cp mysql_virtual_alias_maps. cf /etc/postfix/

  # cp mysql_virtual_domains_maps. cf /etc/postfix/

  # cp mysql_virtual_mailbox_maps. cf /etc/postfix/

  # cp mysql_virtual_sender_maps. cf /etc/postfix/

  配置main.&nbsp;cf:

  # vi /etc/postfix/main. cf

  增加以下内容:

  # extmail config here

  virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps. cf

  virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps. cf

  virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps. cf

  virtual_transport = maildrop:

  重启postfix :

  # service postfix restart

  ⒌测试authlib

  # /usr/sbin/authtest -s login postmaster@<cite class="highlight" highlight="true">extmail. org</cite> extmail

  结果如下:

  Authentication succeeded.

  Authenticated: postmaster@<cite class="highlight" highlight="true">extmail.&nbsp;org</cite> (uid 1000,gid 1000)

  Home Directory: /home/domains/<cite class="highlight" highlight="true">extmail. org</cite>/postmaster

  Maildir: /home/domains/<cite class="highlight" highlight="true">extmail.&nbsp;org</cite>/postmaster/Maildir/

  Quota: 104857600S

  Encrypted Password: $1$phz1mRrj$3ok6BjeaoJYWDBsEPZb5C0

  Cleartext Password: extmail

  Options: (none)

  这样表明ExtMan的正确安装,数据库也正确导入,courier-authlib能正确连接到mysql数据库

  最后访问http://mail.centos. bz/extmail/,如无意外,将看到webmail的登陆页,不过此时还没有加正式的用户,所以不能登陆,包括postmaster@<cite class="highlight" highlight="true">extmail. org</cite>;也不行。必须要登陆到http://mail.centos. bz/extman/ 里增加一个新帐户才能登陆。

  ExtMan的默认超级管理员帐户:root@<cite class="highlight" highlight="true">extmail.&nbsp;org</cite>;,初始密码:extmail*123*,登陆成功后,建议将密码修改,以确保安全。

  ⒍配置图形化日志

  启动mailgraph_ext

  # /usr/local/mailgraph_ext/mailgraph-init start

  启动cmdserver(在后台显示系统信息)

  # /var/www/extsuite/extman/daemon/cmdserver --daemon

  加入开机自启动:

  # echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.d/rc.local

  # echo "/var/www/extsuite/extman/daemon/cmdserver -v -d" >> /etc/rc.d/rc.local

  使用方法:等待大约15分钟左右,如果邮件系统有一定的流量,即可登陆到extman里,点"图形日志"即可看到图形化的日志。具体每天,周,月,年的则点击相应的图片进入即可。

配置cyrus-sasl

  ⒈安装cyrus-sasl

  删除系统的cyrus-sasl:

  # rpm -e cyrus-sasl --nodeps

  安装新的支持authdaemon的软件包

  # yum -y install cyrus-sasl cyrus-sasl-plain

  ⒉配置main.&nbsp;cf文件

  Postfix的SMTP认证需要透过Cyrus-SASL,连接到authdaemon获取认证信息。

  编辑main. cf

  # vi /etc/postfix/main.&nbsp;cf

  增加如下内容:

  # smtpd related config

  smtpd_recipient_restrictions =

  permit_mynetworks,

  permit_sasl_authenticated,

  reject_non_fqdn_hostname,

  reject_non_fqdn_sender,

  reject_non_fqdn_recipient,

  reject_unauth_destination,

  reject_unauth_pipelining,

  reject_invalid_hostname,

  # SMTP sender login matching config

  smtpd_sender_restrictions =

  permit_mynetworks,

  reject_sender_login_mismatch,

  reject_authenticated_sender_login_mismatch,

  reject_unauthenticated_sender_login_mismatch

  smtpd_sender_login_maps =

  mysql:/etc/postfix/mysql_virtual_sender_maps. cf,

  mysql:/etc/postfix/mysql_virtual_alias_maps. cf

  # SMTP AUTH config here

  broken_sasl_auth_clients = yes

  smtpd_sasl_auth_enable = yes

  smtpd_sasl_local_domain = $myhostname

  smtpd_sasl_security_options = noanonymous

  ⒊编辑smtpd.conf文件

  # vi /usr/lib/sasl2/smtpd.conf

  确保其内容为:

  pwcheck_method: authdaemond

  log_level: 3

  mech_list: PLAIN LOGIN

  authdaemond_path:/var/spool/authdaemon/socket

  重新启动postfix:

  # service postfix restart

  ⒋测试SMTP认证

  通过以下命令获得postmaster@<cite class="highlight" highlight="true">extmail. org</cite>;的用户名及密码的BASE64编码:

  # perl -e 'use MIME::Base64; print encoolcode_base64("postmaster\@<cite class="highlight" highlight="true">extmail.&nbsp;org</cite>")'

  内容如下:

  cG9zdG1hc3RlckBleHRtYWlsLm9yZw==

  # perl -e 'use MIME::Base64; print encoolcode_base64("extmail")'

  内容如下:

  ZXh0bWFpbA==

  然后本机测试:

  # telnet localhost 25

  其过程如下:

  Trying 127.0.0.1…

  Connected to localhost.localdomain (127.0.0.1).

  Escape character is '^]'.

  220 mail.<cite class="highlight" highlight="true">extmail. org</cite> ESMTP Postfix – by <cite class="highlight" highlight="true">extmail.&nbsp;org</cite>

  ehlo demo.domain.tld << 输入内容

  250-mail.<cite class="highlight" highlight="true">extmail. org</cite>

  250-PIPELINING

  250-SIZE 10240000

  250-VRFY

  250-ETRN

  250-AUTH LOGIN PLAIN

  250-AUTH=LOGIN PLAIN

  250-ENHANCEDSTATUScoolcodeS

  250-8BITMIME

  250 DSN

  auth login << 输入内容

  334 VXNlcm5hbWU6

  cG9zdG1hc3RlckBleHRtYWlsLm9yZw== << 输入内容

  334 UGFzc3dvcmQ6

  ZXh0bWFpbA== << 输入内容

  235 2.0.0 Authentication successful

  quit << 输入内容

  221 2.0.0 Bye

  最后出现235 Authentication Successful 表明认证成功了。

配置courier-imap

  ⒈安装Courier-imap

  默认的courier-authlib及courier-imap都会增加系统自启动设置,因此下一次服务器启动将自动启动相应的authlib及POP3服务

  # yum -y install courier-imap

  配置courier-imap

  由于Courier-imap的IMAP目录是按UTF-7编码的,ExtMail目前还没有正式支持IMAP目录,因此需要屏蔽IMAP,只提供pop3服务。而就目前的使用情况来看,IMAP使用的非常少,绝大部分OutLook/Foxmail用户都习惯使用POP3而非IMAP。

  # vi /usr/lib/courier-imap/etc/imapd

  修改内容如下:

  IMAPDSTART=NO

  # vi /usr/lib/courier-imap/etc/imapd-ssl

  修改内容如下:

  IMAPDSSLSTART=NO

  然后重新启动courier-imap:

  # service courier-imap start

  测试POP3 请按如下步骤输入pop3命令测试其是否正常工作,注意蓝色的信息是我们输入到POP3服务器的(请首先登录extman自行建立test@<cite class="highlight" highlight="true">extmail.&nbsp;org</cite>;用户,密码:extmail)

  # telnet localhost 110

  其过程如下:

  Trying 127.0.0.1…

  Connected to localhost.localdomain (127.0.0.1).

  Escape character is '^]'.

  +OK Hello there.

  user test@<cite class="highlight" highlight="true">extmail. org</cite> << 输入内容

  +OK Password required.

  pass extmail << 输入内容

  +OK logged in.

  list << 输入内容

  +OK POP3 clients that break here,they violate STD53.

  .

  quit << 输入内容

  +OK Bye-bye.

  Connection closed by foreign host.

最后说明

  至此,ExtMail的安装配置基本完成,如想配置内容,病毒过滤请到官方网站学习配置。登录extmail系统后台后,请及时修改密码或者用户名。最后需要确认的是,是否已经设置好邮件域名的MX记录或者A记录,这样才能正常收取邮件。

猜你喜欢