主页 > 未分类 > ubuntu安装配置sendmail openwebmail邮件服务器

ubuntu安装配置sendmail openwebmail邮件服务器

1.安装sendmail

apt-get install sendmail

配置saslauthd改为开机自动启动

vi /etc/default/saslauthd

START=yes

更改接收域名

vi /etc/mail/local-host-names

xdty.org

mail.xdty.org

ourbits.us

mail.ourbits.us

更改允许发送的地址

vi /etc/mail/sendmail.mc

DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=0.0.0.0')dnl

DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=0.0.0.0')dnl

生成配置

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

重启服务

service sendmail restart

2.安装pop3服务

apt-get install dovecot-common dovecot-pop3d

编辑配置文件

vi /etc/dovecot/dovecot.conf

protocols = pop3

disable_plaintext_auth = no

ssl = no

mail_location = mbox:~/mail:INBOX=/var/mail/%u

重启服务

service dovecot restart

3.安装openwebmail,通过web管理邮件系统

进入/var/www目录下载文件并解压

cd /var/www

wget http://openwebmail.org/openwebmail/download/release/openwebmail-2.53.tar.gz

tar xf openwebmail-2.53.tar.gz

安装perl支持

apt-get install perl-suid libapache2-mod-perl2

编辑apache2配置

vi /etc/apache2/sites-available/default

        ScriptAlias /cgi-bin/ /var/www/cgi-bin/

        <Directory "/var/www/cgi-bin">

配置openwebmail

编辑auth_unix.conf文件

cp /var/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf /var/www/cgi-bin/openwebmail/etc/

vi /var/www/cgi-bin/openwebmail/etc/auth_unix.conf

passwdmkdb              none

passwdfile_encrypted    /etc/shadow

配置dbm.conf文件

cp /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf /var/www/cgi-bin/openwebmail/etc

vi /var/www/cgi-bin/openwebmail/etc/dbm.conf

dbm_ext                 .pag

配置openwebmail.conf文件

vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

ow_cgidir               /var/www/cgi-bin/openwebmail

ow_htmldir              /var/www/data/openwebmail

ow_htmlurl              /data/openwebmail

default_iconset         Cool3D.Chinese.Simplified

default_language        zh_CN.GB2312

使配置文件生效

/var/www/cgi-bin/openwebmail/openwebmail-tool.pl –init

生成软连接

mkdir /var/www/openwebmail

cd /var/www/openwebmail

ln -s /var/www/data/openwebmail/redirect.html index.html

打开http://url/openwebmail登录,测试邮件系统是否配置成功。

转载请注明出处 http://www.xdty.org/?p=985

发表评论

邮箱地址不会被公开。 必填项已用*标注