Re: [exim] SQL problems quoting -- second ' eaten up

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chris Lightfoot
Date:  
À: exim-users
CC: Rory Campbell-Lange
Sujet: Re: [exim] SQL problems quoting -- second ' eaten up
On Wed, Jun 28, 2006 at 09:12:18AM +0100, Philip Hazel wrote:
> On Wed, 28 Jun 2006, Rory Campbell-Lange wrote:
>
> > what is happening to the second ' for some variables?
> >
> > >      warn log_message = ('$message_id', \
> > >                          'MSPATH',  \
> > >                          '$h_date',  \
> > >                          '$h_subject',  \
> > >                          '$recipients',  \
> > >                          '$h_from',  \
> > >                          '$h_to',  \
> > >                          '$h_cc',  \
> > >                          '$message_size')

> > >
> > > Which led to the following log line:
> > > Warning: ('1FvNYX-0007mk-Ig', '2006-06-28/1FvNYX-0007mk-Ig', ' ' 'x@???', ' ' ' '38')
> > >
> >
> > I'm flummoxed.
>
> Try $h_date: etc (i.e. insert the required terminating colon). The names
> of headers are terminated only by colon or white space. As it stands,
> Exim will look for headers whose names are
>
> date',
> subject',
>
> etc. These are perfectly legal header names, according to RFC 2822,
> believe it or not.


in any case the OP should ${quote_mysql:...} (or whatever
db) the values, especially since ' is legal in many of the
headers you're logging.

--
``I believe I am the only living man to deliberately
place his hands in the mouth of an attacking cougar.'' (Clarence Hall)