分类: BSD
2008-11-04 08:32:04
groupadd vmail -g 1001
useradd vmail -u 1001 -g 1001
wget
jvxf maildrop-2.0.2.tar.bz2
./configure --enable-sendmail=/usr/sbin/sendmail --enable-trusted-users='root vmail' --enable-syslog=1 --enable-maildirquota --enable-maildrop-uid=1001 --enable-maildrop-uid=1001 --with-trashquota --with-dirsync
make
make install
注意源码的,将courierauthconfig 命令链接到/usr/bin里,假设装在:
/usr/local/courier-authlib/bin/courierauthconfig,则:
ln -s /usr/local/courier-authlib/bin/courierauthconfig /usr/bin/courierauthconfig
这样出来的才会ourier Authentication Library extension enabled.
maildrop -v
maildrop 2.0.2 Copyright 1998-2005 Double Precision, Inc.
GDBM extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.
如果没有显示Courier Authentication Library extension enabled.说明你的maidrop还不支持courier auth,请仔细检查,重新编译
maildrop建议不要自定义目录安装,可以减少不必要的麻烦,很方便:直接在已经编译的目录 make uninstall 就行
配置main.cf和master.cf使调用maildrop
========================
vi /etc/postfix/main.cf
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
========================
vi /etc/postfix/master.cf
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -w 90 -d} ${recipient} ${user} ${extension}${nexthop}
调试maildrop是否正常工作
从其他邮箱发一份邮件到你新建立的email地址,看到类似log记录
May 10 07:21:05 mail postfix/pipe[13994]: 78DCC156AE7: to=<>, relay=maildrop, delay=0, status=sent
(domain.com)
看到relay=maildrop 并且log没有报错,则说明maildrop已经正常工作
FAQ:
1. 编译安装的时候出现以下报错configure: error: pcre.h not found - install PCRE from
请安装pcre-devel包
剑心通明注:个人建议用安装,其他的配置不变就可以了。