Re: [exim] INSERT statement in exim.conf

Pàgina inicial
Delete this message
Reply to this message
Autor: Marilyn Davis
Data:  
A: Raj
CC: exim-users
Assumpte: Re: [exim] INSERT statement in exim.conf
On Mon, 21 Mar 2005, Raj wrote:

> Marilyn Davis wrote:
>
> >On Mon, 21 Mar 2005 raj-exim@??? wrote:
> >
> >
> >
> >>Hello frens,
> >>I wonder why mysql INSERT statement won't work from exim.conf file.
> >>SELECT is working very good.
> >>I have exim 4.42 compiled with mysql support.
> >>
> >>
> >
> >Can we see your INSERT statement?
> >
> >And what is your mysql version?
> >
> >Marilyn Davis
> >
> >>Thanks a lot
> >>Raj
> >>
> >
> MYSQL_LOG=INSERT INTO LOGTABLE (local_part,arrivaltime,sender)
> VALUES('${quote_mysql:local_part}',NOW(),'${quote_mysql:sender_address}')


This looks good to me.

>
> savelog_director:
> driver = manualroute
> domains = ${lookup mysql {MYSQL_LOG}{$value}}


You expect $value to be 1 here?

> condition = 0
> route_list = "* localhost byname"
> transport = devnull_transport
> verify = false
>
> It trys to store in the LOGTABLE but eventually fails.


How do you know it failed?

> The mysql user has write permission in the dbase.
>
> I think I should pipe it out to write in dbase. what do u say?


No, this should work. My update works for me. I get the $value out
by running exim in debug mode: exim -d+expand [and whatever other args
you are using]

27349 expanding: ${lookup mysql{update mail set size = size + $message_size where id = ${extract{recipient_id}{$address_data}}}{$value}{0}}
27349    result: 1


So yours should work too.

Is there anything in your mysql log?

There are situations in mysql when you have to do an explicit
"commit()".

Good luck!

Marilyn Davis





> Raj
>
>
>


--