Re: [exim] Sqlite Lookup absolute filename (was Exim 4.94.2 …

Top Page
Delete this message
Reply to this message
Author: Heiko Schlittermann
Date:  
To: exim-users
Subject: Re: [exim] Sqlite Lookup absolute filename (was Exim 4.94.2 - security update released)
Heiko Schlittermann via Exim-users <exim-users@???> (Di 04 Mai 2021 17:44:23 CEST):
> Odhiambo Washington via Exim-users <exim-users@???> (Di 04 Mai 2021 17:00:36 CEST):
> > On Tue, May 4, 2021 at 4:52 PM Heiko Schlittermann via Exim-users <
> > temporarily rejected after DATA: failed to expand ACL string "${lookup
> > sqlite,file=/var/spool/exim/db/greylist.db {SELECT host from resenders
> > WHERE helo='${quote_sqlite:$sender_helo_name}' AND
> > host='$sender_host_address';} {1}}": absolute file name expected for
> > "sqlite" lookup
>
> I'm checking it. Give me a minute.
> --
> Heiko


Is there any chance setting the global sqlite_dbfile option?

According to the spec file

    9.26 More about SQLite
    ----------------------


    SQLite is different to the other SQL lookups because a filename is required in
    addition to the SQL query. An SQLite database is a single file, and there is no
    daemon as in the other SQL databases.


    The preferred way of specifying the file is by using the sqlite_dbfile option,
    set to an absolute path.


    A deprecated method is available, prefixing the query with the filename
    separated by white space. This means that the path name cannot contain white
    space. It also means that the query cannot use any tainted values, as that
    taints the entire query including the filename - resulting in a refusal to open
    the file.


    Here is a lookup expansion example:


    sqlite_dbfile = /some/thing/sqlitedb
    ...
    ${lookup sqlite {select name from aliases where id='userx';}}



I cannot find any reference to the syntax you're using.
Maybe I'm stupid.

${lookup      
 sqlite,file=/var/spool/exim/db/greylist.db {SELECT host from resenders      
 WHERE helo='${quote_sqlite:$sender_helo_name}' AND                          
 host='$sender_host_address';} {1}}



--
Heiko