|
由于turbomail安装后,只能限制25个人员使用,并且每次发送时会在内容后加一段限制内容,并且占cpu率高了些。
针对以上问题,感觉还是在centos上安装postfix dovecot来构建企业免费邮箱。以下是安装操作笔记。
第一步卸载sandmail
yum remove sandmail
第二步:安装postfix ,dovecot,cyrus-sasl,直接yum安装
yum -y install devecot
yum -y install postfix
yum -y install cyrus-sasl
三、修改postfix的配置文件
[iyunv@ser ~]# vim /etc/postfix/main.cf
myhostname = mail.smart-card.com
mydomain = smart-card.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks_style = subnet
mynetworks = 192.168.1.0/24, 127.0.0.0/8
relay_domains = $mydestination //如果注释掉可以发送邮件到外部邮箱
mail_spool_directory = /var/spool/mail
#the mailsize limit 10Mmessage_size_limit = 10485760default_process_limit = 50default_destination_concurrency_limit = 20smtpd_sasl_auth_enable = yessmtpd_sasl_local_domain = $myhostnamesmtpd_sasl_application_name = smtpdbroken_sasl_auth_clients = yessmtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,reject_unauth_destinationsmtpd_client_restrictions = permit_sasl_authenticatedsmtpd_sasl_security_options = noanonymous
重启 postfix 服务
[iyunv@ser ~]# service postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[iyunv@ser ~]# chkconfig postfix on
[iyunv@ser ~]# chkconfig dovecot on
修改dovecot的配置文件
vim /etc/dovecot.conf
protocols = imap imaps pop3 pop3s(在后面启动dovecot时,说端口已经被使用,lsof -i tcp:端口,是pop3s占用了,如果出现这样的情况,把这里的pop3s去掉。)
listen = *
在iptables 里开放25,110,143端口
[iyunv@ser ~]# chkconfig saslauthd on
修改 /etc/sysconfig/saslauthd
[iyunv@ser ~]# vim /etc/sysconfig/saslauthd
# Directory in which to place saslauthd's listening socket, pid file, and so
# on. This directory must already exist.
SOCKETDIR=/var/run/saslauthd
# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled with the ablity to use.
MECH=shadow
# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
# for the list of accepted flags.
FLAGS=
修改 /usr/lib/sasl2/smtpd.conf
[iyunv@ser ~]# vim /usr/lib64/sasl2/smtpd.conf
pwcheck_method: saslauthd
测试 saslauthd
[iyunv@ser ~]# service saslauthd restart
四.Dovecot 配置 Dovecot.conf
mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
service dovecot restart
然后在foxmail里就可以收发邮件了
添加邮件账号
useradd -g mail -s /sbin/nologin -d /home/MailUsers/redmine redmine
如果不建立用户目录则可以用以下命令
useradd -g mail -s /sbin/nologin -M redmine
passwd redmine
为了方便管理人员变更情况,所以在/home目录下建立了一个MailUsers目录了,以后如果要删除某账号
即可以用 userdel -r redmine,就可以删除该用户所有数据了 |
|