groupadd -g 1200 postdrop
groupadd -g 1000 postfix
useradd -M -u 1000 -g postfix -G postdrop -s /sbin/nologin postfix
tar zxvf postfix-2.4.6.tar.gz
gunzip postfix-2.4.6-vda-ng-patch.gz
patch -p1 < ../ postfix-2.4.6-vda-ng-patch.gz
bash 001.sh
make && make install
postconf -n > main2.cf
mv main.cf main.cf.bak
mv main2.cf main.cf
postfix start
vi main.cf
inet_interfaces = all
myhostname=
mydomain=
myorigin=
mydestination=
home_mailbox= Maildir/
构建dovecot
useradd -M -s /sbin/nologin dovecot
tar zxvf dovecot-1.1.4.tar.gz
./configure --sysconfdir=/etc --with-mysql
make && make install
co /etc/dovecot.example.conf /etc/dovecot.conf
vi dovecot.conf
vi /etc/pam.d/dovecot
auth required pam_nologin.so
auth include system-auth
account include system-auth
session include system-auth
/usr/local/sbin/dovecot -c /etc/dovecot.conf
netstat -anptu | grep dovecot
设置Cryus SASL
cp /usr/lib/sasl2/Sendmail.conf /usr/lib/sasl2/smptd.conf
vi main.cf
smtpd_sasl_auth_enable = yes
amptd_sasl_security_options = noanonymous
mynetwork = 127.0.0.1
smptd_recipient_restrictions = permit_mynetwork, permit_sasl_authenticated, reject_unauth_destination
设置群组
vi main.cf
alias_maps = hash:/etc/aliases
vi /etc/aliases
阅读(2509) | 评论(1) | 转发(0) |