- 论坛徽章:
- 0
|
http://www.week5.net 2004年12月08日
本文讨论的是qmail+vpopmail+sqwebmail+qmailadmin+mysql+maildrop来实现邮件内容过滤的解决方法。
首先,是一个老外写的,方法比较不错,但需要用手工为每个用户设置。
vpopmail, maildrop and sqwebmail
I tend to get a bunch of questions on getting these three to work together. It"s not quite trivial, but indeed possible...
This is the vpopmail and maildrop FAQ, not the qmail and maildrop FAQ. It only covers what"s specific for vpopmail.
Karel Zvara notes that...
Vpopmail"s vdelivermail scans .qmail files for "/Maildir/" to distinguish among
storing in maildir, forwarding to another address and spawning external
application. Therefore it works with vdelivermail when I place .qmail in users
directory (e.g. /var/vpopmail/domains/karpo.cz/zvara) with the content
"/usr/local/bin/maildrop Maildir/mailfilter" (my config, paths are subject to
change icon_smile.gif )
Setting up the files
The main problem is that this will not work with vdeliver. This means that you will have to create a .qmail file for every one of your users - something that will look funny in vqadmin, if you use that.
Imagine you have a virtual domain, say "almqvist.net". "johan" is a user in that domain. Go to the domain directory, into the user"s directory and into the Maildir. Create a file named "maildirfilterconfig" with the following example contents: (This file is used by sqwebmail to determine which filter file the user edits from the web interface)
MAILDIRFILTER=/var/qmail/domains/almqvist.net/johan/Maildir/mailfilter
MAILDIR=/var/qmail/domains/almqvist.net/johan/Maildir
This needs to be adapted if your users" Maildirs are somewhere else, of course.
Next, set up the users .qmail file (in the example, "/var/qmail/domains/almqvist.net/.qmail-johan" as follows:
|/usr/bin/maildrop ./johan/Maildir/mailfilter
Richard Huff remarked that you also need to create a mailfilter file for this to work. You can do this either from sqwebmail (which I"d recommend) or from the console (if you"re setting this up for many users). See man maildropfilter.
Done! Now, you"re ready to set up mail filters in /var/qmail/domains/almqvist.net/johan/Maildir/mailfilter - or through SqWebmail.
I hope this works... send me mail if something seems wrong...
它的网址:http://www.almqvist.net/johan/qmail/vpopmail+maildrop.html
还有一个,就是gadfly写的一篇文章,用过更改qmailadmin的源代码,和编写了两个shell,来实现的。这个我认为目前最好的解决方法。无论你通过sqwebmail或者是outlook等等msa,就起作用的。以上我都亲自实验过了,都没有问题的。希望对大家完善qmail的功能,有所帮助。 |
|