Re: [exim] [patch] "do nothing" ACL modifier

Startseite
Nachricht löschen
Nachricht beantworten
Autor: David Woodhouse
Datum:  
To: Magnus Holmgren
CC: exim-users
Betreff: Re: [exim] [patch] "do nothing" ACL modifier
On Wed, 2007-02-07 at 16:23 +0100, Magnus Holmgren wrote:
> But I find it more even likely for a novice to be looking for a
> modifier that explicitly executed SQL statements.


Digression... when we execute an SQL INSERT is it normal that we can't
tell whether it succeeded or not? The following always appears to fail
because there's no _result_:

  warn condition = ${lookup sqlite {GREYDB INSERT INTO resenders \
            VALUES ( '$sender_host_address', \
                 '${quote_sqlite:$sender_helo_name}', \
                 '$tod_epoch' ); }{0}{1}}
       log_message = SQL INSERT FAILED


Looking at the sqlite lookup implementation doesn't help because that's
my fault too. Do we have to take the hackish approach of doing a lookup
to check if we find the object we just tried to insert? Is there a way
for me to include in a log_message the nice helpful error that 'exim -d'
gave me:

file lookup required for INSERT INTO resenders VALUES ( '81.187.2.168', 'me', '1170851182' );
in /var/spool/exim/db/greylist.db
sqlite3_exec failed: column host is not unique

We certainly do _something_ with 'search_error_message' in src/expand.c
but I can't actually work out _what_ :)

--
dwmw2