Re: Checking from an external file?

Philip Rhoades via Courier-maildrop <[email protected]> Mon, 19 May 2025 18:55:43 +1000
Newsgroups gmane.mail.maildrop
Message-ID <[email protected]>
Milan,

Progress! - see below . .


On 2025-05-19 15:46, Milan Obuch wrote:
> There are two problems in your file I see right now:
> 
> 151 is line number where to look for syntax error. In your case, this
> points to a 'else' statement which has no 'if' condition.
> 
> This came from copying blindly my maildrop (partial) recipe, you have
> 
>   (gdbmopen('.list.db','N'))
> 
> instead of
> 
>   if (gdbmopen('.list.db','N'))
> 
> which explains the missing 'if'.


I should have tried that . .


> Additionally, first line in file you sent is
> 
> eteo Global maildrop filter file - see "## PHR" below
> 
> and I have no idea where it came from - is it some other copy-paste
> error, or you have some 'eteo' local command specific to your system...
> 
> I'd expect this one throwing some kind of runtime error after you
> correct the first one.


Ah . . that was an accidental paste - not sure how I did that . . 
thanks.

No errors now . . and mail is delivered but only to the standard 
maildir:

I tried these:

   Luxury Watch #13
   Subject: Luxury Watch #13
   "Subject: Luxury Watch #13" subject

in .list but I still get:

   MAILDIR=""

I guess I am getting the syntax wrong in the .list file for the key 
value lookup?


> I think you need more experiments to get something out of this. In
> particular, I recommend reading 'man maildropfilter', where you can
> find 'lookup' function, which can be better suited for your use case (I
> don't know whether you like matching the subject exactly, or do some
> pattern matching, those are completely different animals and come with
> different considerations).


Yes, I will look at that - I think once I have he DB working it should 
greatly simplify what I do.  Also, yes, I would prefer to use regexes 
instead of exact matches for the Subjects . .

Thanks again!

P.
-- 
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  [email protected]