As I have written, we have the -M .mailfilters/default parameter set in
the maildrop call and I assume maildrop won't execute the .mailfilter
The -M option has absolutely nothing to do with the processing of a
I don't think you understand what the -M option really does. You should
review this option's entire description the maildrop man page. The entire
description and not just the first two paragraphs.
file in user's homedir. Therefore I have created a workaround and before
the final delivery instruction (well - the final include file ;)) in
the .mailfilters/default I am calling another include file:
Now we can enable user defined mail filters for any users we want.
Is this the correct way? Or is there a better alternative?
No, this is definitely wrong. You CANNOT include something like .mailfilter
from .mailfilters/default. This is because the -M option _disables_ all
mail delivery commands, such as "to" or "cc". The only thing you can do
from a .mailfilters/foo file is specify maildrop's exit code, and print
arbitrary messages to stdout using the echo command. It is logically
impossible for you to invoke .mailfilter in this fashion, and still actually
So, either you are only imagining that you are delivering mail, or you are
not using the -M option, or you are using the -M option and invoking
maildrop a second time without the -M option. Take your pick.