Re: Using Databases for event logging

Jeremy Harris via Exim-users <[email protected]>
Newsgroups gmane.mail.exim.user
Message-ID <[email protected]>
On 2025/06/11 4:12 PM, White, Phil via Exim-users wrote: 
> What is the correct method of connecting to an sqlite3 database?

https://exim.org/exim-html-current/doc/html/spec_html/ch-file_and_database_lookups.html#SECTsqlite

"There are two ways of specifying the file. The first is by using the sqlite_dbfile main option. The second, which allows separate files for each query, is to use an option appended, comma-separated, to the “sqlite” lookup type word. The option is the word “file”, then an equals, then the filename."

> Also, what is 'best practice' to secure against SQL injection?

The SQL "VALUES" keyword, and Exim's ${quote_sqlite:..} operator.

> Would this change the answer/advice?

In the obvious details, yes.
-- 
Cheers,
   Jeremy

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.