Hiya,
I've succeeded in making Maildrop work with Vmailmgr, mainly by abusing
Qmail. I'll show my configuration and then ask for a better way to do
this.
Qmail switches to the example user and checks the .qmail-default file:
| example@churchill:~$ cat .qmail-default
| |maildrop .mailfilters/assassinate_spam
| |vdeliver
| example@churchill:~$
This is the .mailfilters/assassinate_spam file:
| # /home/example/.mailfilter/assassinate_spam
|
| exception {
| xfilter "spamc"
| }
|
| if (/^X-Spam-Flag: YES/)
| {
| EXITCODE=99
| to "!assa...@em.ca"
| }
|
| EXITCODE=0
| exit
The idea is to use Maildrop's exit codes to control whether or not Qmail
will proceed to the line with "|vdeliver". Maildrop returns 99 if Spam
Assassin finds spam, which tells Qmail to not continue to "|vdeliver".
If no spam is found Maildrop returns 0 without delivering anything, and
Qmail runs Vdeliver to deliver the message.
I can't use 'to "|vdeliver"' because Maildrop offers a pipe and Vdeliver
expects a real file on standard input. Is there any way to get Maildrop
to offer Vdeliver a file descriptor of the real file?
Does anyone have a better way to use Maildrop with Vmailmgr? If so,
what is it?