1.更新 ports
# cvsup -gL 2 -h cvsup.freebsdchina.org /usr/share/examples/cvsup/ports-supfile
2. 安装 openssl+apache 服务器
# cd /usr/ports/security/openssl
# make install
# make clean
# cd /usr/ports/www/apache2
# make install
# make clean
# vi /etc/rc.conf
apache2_enable="YES"
3. 安装 openwebmail
# cd /usr/ports/mail/openwebmail/
# make WITH_QUOTA=yes install
# make clean
4. 安装 postfix ,在安装过程中用yes回答提出的问题
# cd /usr/ports/mail/postfix/
# make install
# make clean
# vi /etc/rc.conf
为了能启动postfix加入:
sendmail_enable="YES"
sendmail_flags="-bd"
sendmail_pidfile="/var/spool/postfix/pid/master.pid"
sendmail_outbound_enable="NO"
sendmail_submit_enable="NO"
5. 安装 vm-pop3d
# cd /usr/ports/mail/vm-pop3d
# make install
# make clean
6. 配置 postfix
# vi /usr/local/etc/postfix/main.cf
添加:
myhostname = nero.3322.org
mydomain = nero.3322.org
virtual_alias_maps=hash:/usr/local/etc/postfix/virtual
alias_maps=hash:/usr/local/etc/postfix/aliases
default_privs=nobody
allow_mail_to_commands = alias,forward,include
allow_mail_to_files = alias,forward,include
下面我加入一个 nero.3322.org 的虚拟域,并添加一个用户llzqq
# vi /usr/local/etc/postfix/virtual
添加:
nero.3322.org anything //之间用[tab]
llzqq@nero.3322.org llzqq.nero.3322.org //之间用[tab]
执行下面的命令,生成 virtual.db:
# cd /usr/local/etc/postfix/
# postmap virtual
# vi /usr/local/etc/postfix/aliases
添加:
llzqq.nero.3322.org:/var/spool/virtual/nero.3322.org/llzqq
执行下面的命令,生成 aliases.db:
# cd /usr/local/etc/postfix
# postalias aliases
7. 配置 vm-pop3d 使其开机自动执行
# cd /usr/local/etc/rc.d
# mv vm-pop3d.sh.sample vm-pop3d.sh
配置 openwebmail 支持 nero.3322.org 域,创建下面的文件:
# vi /usr/local/www/cgi-bin/openwebmail/etc/sites.conf/nero.3322.org
=========================== nero.3322.org =======================
auth_module auth_vdomain.pl
auth_withdomain yes
mailspooldir /var/spool/virtual/nero.3322.org
use_syshomedir no
use_homedirspools no
enable_autoreply no
enable_setforward no
enable_vdomain yes
vdomain_admlist llzqq //这里设置了这个域的管理员
vdomain_maxuser 500
vdomain_vmpop3_pwdpath /usr/local/etc/virtual
vdomain_vmpop3_pwdname passwd
vdomain_vmpop3_mailpath /var/spool/virtual
vdomain_postfix_aliases /usr/local/etc/postfix/aliases
vdomain_postfix_virtual /usr/local/etc/postfix/virtual
vdomain_postfix_postalias /usr/local/sbin/postalias
vdomain_postfix_postmap /usr/local/sbin/postmap
# quota设置部分
quota_module quota_du.pl
quota_limit 52400 //定义了邮箱大小
quota_threshold 85
delmail_ifquotahit no
delfile_ifquotahit no
=========================== nero.3322.org =======================
# mkdir -p /var/spool/virtual/nero.3322.org
# chown nobody /var/spool/virtual/nero.3322.org
# chgrp mail /var/spool/virtual/nero.3322.org
# mkdir -p /usr/local/etc/virtual/nero.3322.org
# touch /usr/local/etc/virtual/nero.3322.org/passwd
# chmod 644 /usr/local/etc/virtual/nero.3322.org/passwd
# htpasswd /usr/local/etc/virtual/nero.3322.org/passwd llzqq
# chmod 755 /usr/local/www/cgi-bin/openwebmail/etc/users
# sync
# reboot
8. 最后通过浏览器登陆到OPENWEBMAIL
http://nero.3322.org/cgi-bin/openwebmail/openwebmail.pl
相关文章:
1. Win11右键没有压缩选项怎么办?Win11右键没有压缩选项的解决方法2. Win11开机后出现explorer.exe应用程序错误怎么解决? exe应用程序错误解决办法3. Win11发布预览版Build 22000.1639更新补丁KB5022905推送(附更新修复内容汇总)4. KB5022845导致Win1122H2更新驱动失败 Surface出现0x80070103错误5. win最稳定的版本推荐6. 为Win12让路:Win11 2023终极正式版来了7. 你没有权限在此位置中保存文件请与管理员联系以或得相应权限8. Win11 预览版25300怎么开启文件资源管理器图库隐藏功能?9. Win11 release preview通道是什么?release preview频道更新Win11好吗?10. Win11控制面板一直闪烁怎么回事?Win11控制面板打不开一直闪解决方法