Install qmail on FreeBSD 6.2 via ports

2009-05-13 07:36:06来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

作者: 李忍 , QQ: 235749 , Email: levopat_AT_gmail_DOT_com, MSN: pat.li_AT_msn_DOT_com
Step 1 *Install qmail*
引用:
代码:
cd /usr/ports/mail/qmail
make config
引用:
#deselect following
[ ] QMTPC_PATCH send email using qmtp protocol
[ ] RCDLINK create rc.d/qmail.sh
[ ] QEXTRA enable QUEUE_EXTRA e-mail copy featur
代码:
make install clean
/var/qmail/scripts/enable-qmail
Step 2 *Create qmail's boot script*
引用:
代码:
vi /var/qmail/rc
代码:
env env - PATH="/var/qmail/bin:$PATH" \
qmail-start ./Maildir/
代码:
chmod +x /var/qmail/rc
/var/qmail/configure/config-fast `hostname`
Step 3 *Install vpopmail*
引用:
代码:
mysqladmin -uroot -p create vpopmail
mysql -u root -p mysql
mysql> GRANT ALL ON *.* TO "vpopmail"@"localhost" IDENTIFIED BY "vpopmail";
mysql> FLUSH PRIVILEGES;
代码:
cd /usr/ports/mail/vpopmail
make WITH_MYSQL=yes \
WITH_MYSQL_SERVER=localhost \
WITH_MYSQL_USER=vpopmail \
WITH_MYSQL_PASSWD=vpopmail\
WITH_MYSQL_DB=vpopmail \
WITH_MYSQL_LIMITS=yes \
WITH_SMTP_AUTH_PATCH=yes \
install clean
引用:
#Options for ucspi-tcp 0.88_2
#select all
Step 4 *Install maildrop*
引用:
代码:
cd /usr/ports/mail/maildrop/
make install clean
代码:
pw user mod vpopmail -s /bin/sh
引用:
vi /usr/local/etc/mailfilter.conf
代码:
`test -f .whitelist`
if ($RETURNCODE==0)
{
    if ($SENDER ne '' && lookup($SENDER, '.whitelist'))
        to ./Maildir/
}
`test -f .blacklist && test -d ./Maildir/.Trash`
if ($RETURNCODE==0)
{
  if ($SENDER ne '' && lookup($SENDER, '.blacklist'))
    to ./Maildir/.Trash/
}
# size less 100K
if($SIZE
引用:
# ls -l /usr/local/etc/mailfilter.conf
代码:
-rw-------  1 vpopmail  vchkpw  525 Apr  1 16:03 /usr/local/etc/mailfilter.conf
Step 5 *Install qmailadmin*
引用:
代码:
cd /usr/ports/mail/qmailadmin
sed 's/cgi-bin.default/cgi-bin/g' Makefile > Makefile.tmp
sed 's/data.default/data/g' Makefile.tmp > Makefile
代码:
make WITH_MODIFY_QUOTA=yes \
WITH_DOMAIN_AUTOFILL=yes \
WITH_SPAM_DETECTION=yes \
SPAM_COMMAND='|preline /usr/local/bin/maildrop /usr/local/etc/mailfilter.conf' \
install
代码:
/usr/local/vpopmail/bin/vadddomain `hostname` 123
/usr/local/vpopmail/bin/vadduser test@`hostname` 123
Step 6 *Install daemontools*
引用:

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:KDE应用程序-Kscope(源代码阅读软件)

下一篇:rsync实现跨网段文件同步