Dmitriy MiksIr said:
Jay Lee wrote:
Dmitriy MiksIr said:
Now, if user's .maildrop exists with 'to`, message deliver twice - in
included file and in maildroprc. What i need say for use deliver in
maildroprc only if user's .maildrop not exists, or exists without
'to`?
First, spamc does it's own size checking. The default size is 250k so
you can save a little by removing the if $size statement and adding -s
100000
to the spamc line.
Thanks =)
Now regarding your main issue, try using a little bash test to see if
the file exists or not:
if ( `test -f ../.maildrop` ) {
exception { include "../.maildrop" }
}
else {
to $DEFAULT }
This way, only one either the include statement is executed or the "to
$DEFAULT" is executed but there's no chance both will be executed. You
might need to fiddle with it a little but the general idea should be
good.
But if .maildrop exists and without 'to` (only comments, for example), i
miss mail?
Well I was assuming your .maildrop file would have a default delivery
instruction after all the if's but yes, if .maildrop ends without
executing a cc or to than then maildroprc will also exit cleanly without
ever having written the message to the Maildir. Just make sure your
.maildrop files have a default delivery specified at the end.
Jay