分类: BSD
2008-04-17 09:24:38
dbname = extmail
table = mailbox
select_field = quota
where_field = username
additional_conditions = AND active = '1'
至此postfix 基本设置完成,但还不能收发邮件。
4、安装maildrop
我们在设置邮件服务器时MTA 部分还是使用posfix 本身的帐户进行处理邮件,由于maildrop 不能和postfix 与同一用户身份处理邮件,所以我们新开一个用户用户maildrop 处理。
添加vgroup
pw groupadd vgroup -g 1000
添加vuser
%pw useradd vuser -g 1000 -u 1000 -s /sbin/nologin -d /sbin/nologin -c "virtual mail user"
安装maildrop,记得要把WITH_AUTHLIB=yes 加上
%cd /usr/ports/mail/maildrop
%make install WITH_AUTHLIB=yes
选择AUTH_MYSQL
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
x Options for maildrop 2.0.1 x
x lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk x
x x [ ] AUTH_LDAP LDAP support x x
x x [X] AUTH_MYSQL MySQL support x x
x x [ ] AUTH_PGSQL PostgreSQL support x x
x x [ ] AUTH_USERDB Userdb support x x
x x [ ] AUTH_VCHKPW Vpopmail/vchkpw support x x
修改/usr/local/etc/postfix/master.cf ,把maildrop 原先已有的记录注译(即删除旧记录),加上下面的内容
maildrop unix - n n - - pipe
flags=DRhu user=vuser argv=/usr/local/bin/maildrop -d ${user}@${nexthop} ${recipient} ${user} ${extension} ${nexthop}