atom feed19 messages in net.sourceforge.lists.courier-usersRe: [courier-users] [SOLVED]Autorepli...
FromSent OnAttachments
Anton BasistovJun 28, 2005 4:02 am 
Tim HunterJun 28, 2005 6:36 am 
Anton BasistovJun 28, 2005 7:21 am 
Tim HunterJun 28, 2005 7:33 am 
Anton BasistovJul 1, 2005 3:06 pm 
Sam VarshavchikJul 1, 2005 3:51 pm 
Anton BasistovJul 2, 2005 1:57 am 
David BruhaJul 3, 2005 4:37 am 
Sam VarshavchikJul 3, 2005 5:44 am 
David BruhaJul 3, 2005 2:09 pm 
Sam VarshavchikJul 3, 2005 3:34 pm 
Anton BasistovJul 4, 2005 4:31 am 
Gordon MessmerJul 4, 2005 8:47 am 
David BruhaJul 4, 2005 11:41 am 
Anton BasistovJul 4, 2005 1:19 pm 
Sam VarshavchikJul 4, 2005 6:07 pm 
David BruhaJul 5, 2005 3:45 am 
Gordon MessmerJul 5, 2005 10:20 am 
Anton BasistovJul 5, 2005 11:37 pm 
Subject:Re: [courier-users] [SOLVED]Autoreplies, .mailfilter and .mailfilters/default
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Jul 4, 2005 6:07:13 pm
List:net.sourceforge.lists.courier-users

David Bruha writes:

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 .mailfilter file.

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:

include "/etc/courier/maildroprcs/userfilter"

that contains:

exception { include "$HOME/.mailfilter" }

Now we can enable user defined mail filters for any users we want.

Sam: 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 deliver mail.

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.