利用Ubuntu ExtMail 30分钟配置好一个功能强大的邮件(2)

它们询问你问题
Country Name (2 letter code) [AU]: //国家
State or Province Name (full name) [Some-State]: //省
Locality Name (eg, city) []: //城市
Organization Name (eg, company) [Internet Widgits Pty Ltd]: //组织名称
Organizational Unit Name (eg, section) []: 组织单位名称
Common Name (eg, YOUR name) []: 通用名称
Email Address []: 邮件地址

13.Apache2配置:
vi  /etc/apache2/sites-available/mail
<VirtualHost *>
        ServerAdmin admin@linuxidc.com
        ServerName mail.linuxidc.com
        DocumentRoot /var/www/extsuite/extmail/html
        Alias /extmail/cgi/ /var/www/extsuite/extmail/dispatch.fcgi/
        Alias /extmail /var/www/extsuite/extmail/html
        <Ifmodule mod_fastcgi.c>
                FastCgiExternalServer /var/www/extsuite/extmail/dispatch.fcgi -host 127.0.0.1:8888 -idle-timeout 240
        </Ifmodule>
        <Location "/extmail/cgi">
                SetHandler fastcgi-script
        </Location>
        ScriptAlias /extman/cgi/ /var/www/extsuite/extman/cgi/
        Alias /extman /var/www/extsuite/extman/html
        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        SuexecUserGroup vuser vgroup
</VirtualHost>

14.编辑/var/www/extsuite/extmail/dispatch-init文件:
vi  /var/www/extsuite/extmail/dispatch-init
MAXFORK=10
最后启动fastcgi server:
/var/www/extsuite/extmail/dispatch-init start
如果没有意外将启动10个dispatch.fcgi守护进程,可以通过以下命令将启动命令加到rc.local中,实现自启动:
echo "/var/www/extsuite/extmail/dispatch-init start">>/etc/rc.local

15.SMTP认证
1).更改saslauthd
vi /etc/default/saslauthd
更改如下几项
START=yes    //设置开机自动启动
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

2). 创建文件/etc/pam.d/smtp
vi /etc/pam.d/smtp
内容如下:
auth    required   pam_mysql.so user=extmail passwd=extmail host=127.0.0.1 db=extmail table=mailbox usercolumn=username passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=extmail passwd=extmail host=127.0.0.1 db=extmail table=mailbox usercolumn=username passwdcolumn=password crypt=1
解释一下:其实就是定义一个查询的方式 crypt=1或者0表示加密或者不加密  注意对照你的数据库还有用户名密码 请保持跟自己的一致

3).由于postfix处于chroot,要想调用到saslauthd 必须更改socket文件
mkdir -p /var/spool/postfix/var/run/saslauthd
vi /etc/postfix/sasl/smtpd.conf

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wydxsd.html