Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

dbmail-3.1.1 SQL syntax error

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


ml at sergej

Jul 26, 2013, 5:04 AM

Post #1 of 13 (153 views)
Permalink
dbmail-3.1.1 SQL syntax error

Hi,

3.1.1 version continuously logs

Error:[mailbox] mailbox_search(+1418): SQLException: You have an error
in your SQL syntax; check the manual that corresponds to your MySQL
server version for

Thunderbird looks working, but emacs's wanderlust mail client is broken
completely probably because of this issue.
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


h.reindl at thelounge

Jul 26, 2013, 5:07 AM

Post #2 of 13 (150 views)
Permalink
Re: dbmail-3.1.1 SQL syntax error [In reply to]

Am 26.07.2013 14:04, schrieb Sergej Pupykin:
> 3.1.1 version continuously logs
>
> Error:[mailbox] mailbox_search(+1418): SQLException: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for
>
> Thunderbird looks working, but emacs's wanderlust mail client is broken completely probably because of this issue.

* please add the following line to "dbmail.conf"
* restart the services
* trigger the issue
* send the debug-log with the full query
* CAUTION: replace username/passwords from the Log before publish!

file_logging_levels = 511
Attachments: signature.asc (0.26 KB)


ml at sergej

Jul 26, 2013, 5:57 AM

Post #3 of 13 (150 views)
Permalink
Re: dbmail-3.1.1 SQL syntax error [In reply to]

Reindl Harald wrote:
> file_logging_levels = 511

I found that it inserts incorrect date in:

SELECT message_idnr FROM dbmail_messages m LEFT JOIN dbmail_header h
USING (physmessage_id) LEFT JOIN dbmail_headername n ON h.headername_id
= n.id LEFT JOIN dbmail_headervalue v ON h.headervalue_id = v.id WHERE
m.mailbox_idnr=? AND m.status IN (?,?) AND m.message_idnr IN
(12103766,12103793,12104190,12105303,12105346,12106642,12107459) AND
n.headername = 'date' AND DATE(datefield) < DATE('2013-07-12 0 ORDER BY
message_idnr

I increased SQL_INTERNALDATE_LEN to 32 and this problem looks gone, but
wanderlust mail client still does not work reporting 'IMAP error:
invalid argument list to fetch'. It looks like because of double '(' in
request.

log:

Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[0] [fetch]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[1]
[12059987,12059989,12060576,12060578,12060732,12061495,12061890,12061892,12062379,12062381,12065152,12065853,12065855,12066041,12066043,12066301,12066303,12066577,12067341,12067343,12067345,12068153,12068159,12068165,12070604,12071498,12071500,12072297,12072299,12072301,12073061,12073488,12073775,12073777,12074040,12074436,12074980,12075166,12075247,12075249,12075251,12075253,12075638,12075640,12075937,12075939,12076098,12076180,12076182,12076329,12076484,12076727,12080666,12080668,12080671,12080673,12082807,12082809,12083569,12083571,12083799,12083801,12083803,12083805,12083807,12084090,12084092,12085174,12085176,12085178,12086416,12087625,12087628,12087632,12087634,12088848,12088850,12090066,12090068,12090070,12090840,12090843,12091804,12091806,12093221,12093223,12094232,12096778,12097877,12098718,12099127,12099129,12099131,12099398,12099400,12099484,12099696,12099984,12100423,12100425,12104684,12104686,12105487,12105811,12106106,12106108,12106435,12106437,12106439,12106441
,12106666,12106668,121066
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1918): arg[2] [(]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1918): arg[3] [(]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[4] [Subject]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[5] [From]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[6] [To]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[7] [Cc]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[8] [Date]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[9] [Message-Id]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[10] [References]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[11] [In-Reply-To]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1918): arg[12] [)]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[13] [rfc822.size]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1970): arg[14] [flags]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+1918): arg[15] [)]
Jul 26 16:42:58 server dbmail-imapd[5020]: [0x24c7c00] Debug:[imap]
imap4_tokenizer_main(+2000): [0x2585960] tag: [elmo-imap48], command:
[uid], [16] args


_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


ml at sergej

Jul 26, 2013, 6:12 AM

Post #4 of 13 (150 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

Sergej Pupykin wrote:
>
> wanderlust mail client still does not work reporting 'IMAP error:
> invalid argument list to fetch'. It looks like because of double '('
> in request.
>

? uid fetch 12059987,12059989,12060576 rfc822.size
works


? uid fetch 12059987,12059989,12060576 envelope
works


BUT

? uid fetch 12059987,12059989,12060576 date
? BAD invalid argument list to fetch

? uid fetch 12059987,12059989,12060576 from
? BAD invalid argument list to fetch

? uid fetch 12059987,12059989,12060576 subject
? BAD invalid argument list to fetch

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


ml at sergej

Jul 26, 2013, 6:14 AM

Post #5 of 13 (150 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

Sergej Pupykin wrote:
> Sergej Pupykin wrote:
>>
>> wanderlust mail client still does not work reporting 'IMAP error:
>> invalid argument list to fetch'. It looks like because of double '('
>> in request.
>>
>
> ? uid fetch 12059987,12059989,12060576 date
> ? BAD invalid argument list to fetch
>
Wanderlust client sends

? uid fetch 12059987,12059989,12060576 ((Subject From To CC Date
Message-Id References In-Reply-To) rfc822.size flags)

as I understand. It breaks dbmail parser.
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Jul 26, 2013, 7:17 AM

Post #6 of 13 (149 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

On 26-07-13 15:12, Sergej Pupykin wrote:
> Sergej Pupykin wrote:
>>
>> wanderlust mail client still does not work reporting 'IMAP error:
>> invalid argument list to fetch'. It looks like because of double '('
>> in request.

What double '('??

>>
>
> ? uid fetch 12059987,12059989,12060576 rfc822.size
> works
>
>
> ? uid fetch 12059987,12059989,12060576 envelope
> works

Yep, valid.

> BUT
>
> ? uid fetch 12059987,12059989,12060576 date
> ? BAD invalid argument list to fetch
>
> ? uid fetch 12059987,12059989,12060576 from
> ? BAD invalid argument list to fetch
>
> ? uid fetch 12059987,12059989,12060576 subject
> ? BAD invalid argument list to fetch

Those are invalid IMAP commands

valid would be:

x UID FETCH 1:* BODY[HEADER.FIELDS (date subject from)]




--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Jul 26, 2013, 7:19 AM

Post #7 of 13 (149 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

On 26-07-13 15:14, Sergej Pupykin wrote:

> Wanderlust client sends
>
> ? uid fetch 12059987,12059989,12060576 ((Subject From To CC Date
> Message-Id References In-Reply-To) rfc822.size flags)

That is invalid IMAP syntax.



--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


ml at sergej

Jul 26, 2013, 7:56 AM

Post #8 of 13 (149 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

Paul J Stevens wrote:
> On 26-07-13 15:14, Sergej Pupykin wrote:
>
>> Wanderlust client sends
>>
>> ? uid fetch 12059987,12059989,12060576 ((Subject From To CC Date
>> Message-Id References In-Reply-To) rfc822.size flags)
> That is invalid IMAP syntax.
>
Not sure. Code from wanderlust:

(format "%sfetch %s (%s rfc822.size flags)"
(if elmo-imap4-use-uid "uid " "")
(cdr (car set-list))
(if rfc2060
(format "body.peek[header.fields %s]" headers)
(format "%s" headers))))

So it uses "... body.peek[header.fields (.....)]" only in case of
rfc2060 and "... (...)" otherwise. I guess that in latest rfcs this
syntax should be correct. Also wanderlust works well with gmail and
dovecot servers.

Or maybe wanderlust incorrectly detects imap server features.
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Jul 26, 2013, 8:33 AM

Post #9 of 13 (139 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

On 26-07-13 16:56, Sergej Pupykin wrote:
> Paul J Stevens wrote:
>> On 26-07-13 15:14, Sergej Pupykin wrote:
>>
>>> Wanderlust client sends
>>>
>>> ? uid fetch 12059987,12059989,12060576 ((Subject From To CC Date
>>> Message-Id References In-Reply-To) rfc822.size flags)
>> That is invalid IMAP syntax.
>>
> Not sure. Code from wanderlust:
>
> (format "%sfetch %s (%s rfc822.size flags)"
> (if elmo-imap4-use-uid "uid " "")
> (cdr (car set-list))
> (if rfc2060
> (format "body.peek[header.fields %s]" headers)
> (format "%s" headers))))
>
> So it uses "... body.peek[header.fields (.....)]" only in case of
> rfc2060 and "... (...)" otherwise. I guess that in latest rfcs this
> syntax should be correct. Also wanderlust works well with gmail and
> dovecot servers.
>
> Or maybe wanderlust incorrectly detects imap server features.

RFC2060 was obsoleted by RFC3501, which is what DBMail follows.

Both Dovecot and DBMail very definitely do not support:

x uid fetch 1:* date
x uid fetch 1:* (date)
x uid fetch 1:* (date subject)

So apparently wanderlust treats DBMail as a RFC1730 IMAP server - even
older than RFC2060 (yuk). Maybe you can fool wanderlust by providing
the 'banner' config parameter

[IMAP]
banner = Dovecot ready.




--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


ml at sergej

Jul 26, 2013, 9:01 AM

Post #10 of 13 (139 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

Paul J Stevens wrote:
> banner = Dovecot ready.
# grep capab /etc/dbmail.conf
capability = IMAP4rev1 AUTH=LOGIN ACL NAMESPACE CHILDREN
QUOTA UNSELECT IDLE

$ telnet 127.1 143
* OK [CAPABILITY IMAP4rev1 AUTH=LOGIN] dbmail 0.9.9 ready.

Why it does not show all capabilities however dovecot does?

$ telnet 127.1 143
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
IDLE STARTTLS AUTH=PLAIN] Dovecot ready.

_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


harald.leithner at itronic

Jul 26, 2013, 9:18 AM

Post #11 of 13 (139 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

Am 26.07.2013, 18:01 Uhr, schrieb Sergej Pupykin <ml [at] sergej>:

> Paul J Stevens wrote:
>> banner = Dovecot ready.
> # grep capab /etc/dbmail.conf
> capability = IMAP4rev1 AUTH=LOGIN ACL NAMESPACE CHILDREN
> QUOTA UNSELECT IDLE

Your config should be more like this.
capability = IMAP4rev1 AUTH=LOGIN AUTH=CRAM-MD5 ACL RIGHTS=texk
NAMESPACE CHILDREN SORT QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE STARTTLS
ID

try to remove it.

>
> $ telnet 127.1 143
> * OK [CAPABILITY IMAP4rev1 AUTH=LOGIN] dbmail 0.9.9 ready.

Thats ok

* OK [CAPABILITY IMAP4rev1 AUTH=LOGIN AUTH=CRAM-MD5 STARTTLS ID]

Dbmail resends CAPABILITY after Login:

a001 login username passwort
a001 OK [.CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE CHILDREN SORT
QUOTA THREAD=ORDEREDSUBJECT UNSELECT IDLE STARTTLS ID] User username
authenticated

>
> Why it does not show all capabilities however dovecot does?
>
> $ telnet 127.1 143
> * OK [.CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
> IDLE STARTTLS AUTH=PLAIN] Dovecot ready.
>
> _______________________________________________
> DBmail mailing list
> DBmail [at] dbmail
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


--
Harald Leithner

ITronic
Vogelweidplatz 12, 1150 Wien, Austria
Tel: +43-1-786 23 88
Fax: +43-1-98 52 077
Mobil: +43-699-123 78 4 78
Mail: leithner [at] itronic | itronic.at
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


paul at nfg

Jul 26, 2013, 11:29 AM

Post #12 of 13 (139 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

On 07/26/2013 06:18 PM, Harald Leithner wrote:
> Am 26.07.2013, 18:01 Uhr, schrieb Sergej Pupykin <ml [at] sergej>:
>
>> Paul J Stevens wrote:
>>> banner = Dovecot ready.
>> # grep capab /etc/dbmail.conf
>> capability = IMAP4rev1 AUTH=LOGIN ACL NAMESPACE CHILDREN
>> QUOTA UNSELECT IDLE

banner != capability

I'm *not* talking about capability, I'm talking about banner!

If you add the banner like I said, DBmail will say:

$ telnet host imap
* OK [CAPABILITY IMAP4rev1 AUTH=LOGIN] Dovecot ready.

> try to remove it.

Yep. Don't specify a CAPABILITY unless you know what you are doing.

>> Why it does not show all capabilities however dovecot does?
>>
>> $ telnet 127.1 143
>> * OK [.CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE
>> IDLE STARTTLS AUTH=PLAIN] Dovecot ready.

That is not all capabilities Dovecot has - not by a long shot. Both
DBMail and Dovecot only show the pre-auth capabilities until you
authenticate.

But really: wanderlust is completely outdated if it still tries to
follow and RFC from 1994 that has been superseded by two more recent RFCs.

--
________________________________________________________________
Paul J Stevens pjstevns @ gmail, twitter, skype, linkedin

* Premium Hosting Services and Web Application Consultancy *

www.nfg.nl/info [at] nfg/+31.85.877.99.97
________________________________________________________________
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


ml at sergej

Jul 26, 2013, 12:40 PM

Post #13 of 13 (134 views)
Permalink
Re: dbmail-3.1.1 uid fetch error [In reply to]

On 07/26/2013 10:29 PM, Paul J Stevens wrote:
> banner != capability I'm *not* talking about capability, I'm talking
> about banner! If you add the banner like I said, DBmail will say: $
> telnet host imap * OK [CAPABILITY IMAP4rev1 AUTH=LOGIN] Dovecot ready.
I tried it firstly. Banner does not help.
>> try to remove it.
> Yep. Don't specify a CAPABILITY unless you know what you are doing.
>
I uncommented capability in config some time ago to disable server side
search because of high load.

I'll try to debug this issue further because of wanderlust was able to
detect dbmail-3.0.2 properly.

Thank you.
_______________________________________________
DBmail mailing list
DBmail [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.