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

Mailing List Archive: DBMail: dev

[DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail

 

 

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


bugtrack at dbmail

Nov 6, 2009, 6:23 PM

Post #1 of 7 (258 views)
Permalink
[DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail

The following issue has been SUBMITTED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=816
======================================================================
Reported By: namailsj
Assigned To:
======================================================================
Project: DBMail
Issue ID: 816
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 07-Nov-09 03:23 CET
Last Modified: 07-Nov-09 03:23 CET
======================================================================
Summary: DEF_QUERYSIZE is currently 1024, causing sieve
generated autoresponders to fail
Description:

This issue somehow seems to be related to a previously closed bug -
0000390

If a slightly large message is used for auto-responder using sieve, it
fails with MySQL error while performing SELECT QUERY, because the end of
the query gets truncated.

See the query that fails in lines 5091 - 5095 in db.c in dbmail-2.2.12:

5091 snprintf(query, DEF_QUERYSIZE,
5092 "SELECT lastseen FROM %sreplycache "
5093 "WHERE to_addr = '%s' AND from_addr = '%s'
"
5094 "AND handle = '%s' AND lastseen > (%s)",
5095 DBPFX, escaped_to, escaped_from,
escaped_handle, tmp->str);

increasing the value of DEF_QUERYSIZE to 4096 seems to be a work around,
but would like have something in dbmail.conf to control the size of an
auto-responder instead of modifying DEF_QUERYSIZE in the code.
======================================================================

Issue History
Date Modified Username Field Change
======================================================================
07-Nov-09 03:23 namailsj New Issue
======================================================================

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


bugtrack at dbmail

Nov 9, 2009, 6:54 AM

Post #2 of 7 (239 views)
Permalink
[DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=816
======================================================================
Reported By: namailsj
Assigned To:
======================================================================
Project: DBMail
Issue ID: 816
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 07-Nov-09 03:23 CET
Last Modified: 09-Nov-09 15:54 CET
======================================================================
Summary: DEF_QUERYSIZE is currently 1024, causing sieve
generated autoresponders to fail
Description:

This issue somehow seems to be related to a previously closed bug -
0000390

If a slightly large message is used for auto-responder using sieve, it
fails with MySQL error while performing SELECT QUERY, because the end of
the query gets truncated.

See the query that fails in lines 5091 - 5095 in db.c in dbmail-2.2.12:

5091 snprintf(query, DEF_QUERYSIZE,
5092 "SELECT lastseen FROM %sreplycache "
5093 "WHERE to_addr = '%s' AND from_addr = '%s'
"
5094 "AND handle = '%s' AND lastseen > (%s)",
5095 DBPFX, escaped_to, escaped_from,
escaped_handle, tmp->str);

increasing the value of DEF_QUERYSIZE to 4096 seems to be a work around,
but would like have something in dbmail.conf to control the size of an
auto-responder instead of modifying DEF_QUERYSIZE in the code.
======================================================================

----------------------------------------------------------------------
(0002941) paul (administrator) - 09-Nov-09 15:54
http://www.dbmail.org/mantis/view.php?id=816#c2941
----------------------------------------------------------------------
I would like to see the actual query being generated here.

Sounds like the whole reply message is inserted where escaped_handle
should be used. Someone else reported something like that, and if true, it
would definitely imply a bug - though not in the code you mention.

The handle *should* be a md5 hash of the reply-subject and message
combined.
So show me some logs please, and if possible the sieve script as well.

Issue History
Date Modified Username Field Change
======================================================================
07-Nov-09 03:23 namailsj New Issue
09-Nov-09 15:54 paul Note Added: 0002941
======================================================================

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


bugtrack at dbmail

Nov 9, 2009, 9:05 AM

Post #3 of 7 (237 views)
Permalink
[DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=816
======================================================================
Reported By: namailsj
Assigned To:
======================================================================
Project: DBMail
Issue ID: 816
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 07-Nov-09 03:23 CET
Last Modified: 09-Nov-09 18:05 CET
======================================================================
Summary: DEF_QUERYSIZE is currently 1024, causing sieve
generated autoresponders to fail
Description:

This issue somehow seems to be related to a previously closed bug -
0000390

If a slightly large message is used for auto-responder using sieve, it
fails with MySQL error while performing SELECT QUERY, because the end of
the query gets truncated.

See the query that fails in lines 5091 - 5095 in db.c in dbmail-2.2.12:

5091 snprintf(query, DEF_QUERYSIZE,
5092 "SELECT lastseen FROM %sreplycache "
5093 "WHERE to_addr = '%s' AND from_addr = '%s'
"
5094 "AND handle = '%s' AND lastseen > (%s)",
5095 DBPFX, escaped_to, escaped_from,
escaped_handle, tmp->str);

increasing the value of DEF_QUERYSIZE to 4096 seems to be a work around,
but would like have something in dbmail.conf to control the size of an
auto-responder instead of modifying DEF_QUERYSIZE in the code.
======================================================================

----------------------------------------------------------------------
(0002941) paul (administrator) - 09-Nov-09 15:54
http://www.dbmail.org/mantis/view.php?id=816#c2941
----------------------------------------------------------------------
I would like to see the actual query being generated here.

Sounds like the whole reply message is inserted where escaped_handle
should be used. Someone else reported something like that, and if true, it
would definitely imply a bug - though not in the code you mention.

The handle *should* be a md5 hash of the reply-subject and message
combined.
So show me some logs please, and if possible the sieve script as well.

----------------------------------------------------------------------
(0002942) namailsj (reporter) - 09-Nov-09 18:05
http://www.dbmail.org/mantis/view.php?id=816#c2942
----------------------------------------------------------------------
Here is the error message from the logs

Nov 9 08:48:42 testbox dbmail/lmtpd[25734]: Error:[sql]
dbmysql.c,db_query(+290): [.You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near '' at line 1] [.SELECT lastseen FROM dbmail_replycache WHERE
to_addr = 'testmessage[at]test.com' AND from_addr =
'xxxxxxxxxxxxxxxx[at]xxxxxxxxxxx.com' AND handle =
'Question:xxxxxxxxxxxxxxxx[at]xxxxxxxxxxx.com:Dear Valued Customer,\n\nAdded
useless characters to test the message
length\n01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101


Here is the my test sieve script:

[root[at]testbox dbmail-2.2.12]# dbmail-sievecmd -c -u
xxxxxxx[at]xxxxxx.xxxxxxxx.com
require "vacation"; if not header :contains "Precedence" ["bulk","list"]
{vacation :from "xxxxxxxxxxxxxxxx[at]xxxxxxxxxxx.com" :subject "Question"
"Dear Valued Customer,

Added useless characters to test the message length
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101

Thank you.

"; }

Also, yet another "Minor" issue, let me know if you would like me to file
it under another bug: if a sieve message has a "/" (slash) character in the
first few words of the auto-responder body then that gets included in the
"X-DBMail-Vacation:" header, some remote email servers then bounce that
message saying invalid message or mime-type.

Let me know if I could provide you with any other information or testing
to further troubleshoot these issue.

Thanks.

Issue History
Date Modified Username Field Change
======================================================================
07-Nov-09 03:23 namailsj New Issue
09-Nov-09 15:54 paul Note Added: 0002941
09-Nov-09 18:05 namailsj Note Added: 0002942
======================================================================

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


bugtrack at dbmail

Nov 10, 2009, 3:04 AM

Post #4 of 7 (226 views)
Permalink
[DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail [In reply to]

A NOTE has been added to this issue.
======================================================================
http://www.dbmail.org/mantis/view.php?id=816
======================================================================
Reported By: namailsj
Assigned To:
======================================================================
Project: DBMail
Issue ID: 816
Category: Database layer
Reproducibility: always
Severity: minor
Priority: normal
Status: new
target:
======================================================================
Date Submitted: 07-Nov-09 03:23 CET
Last Modified: 10-Nov-09 12:03 CET
======================================================================
Summary: DEF_QUERYSIZE is currently 1024, causing sieve
generated autoresponders to fail
Description:

This issue somehow seems to be related to a previously closed bug -
0000390

If a slightly large message is used for auto-responder using sieve, it
fails with MySQL error while performing SELECT QUERY, because the end of
the query gets truncated.

See the query that fails in lines 5091 - 5095 in db.c in dbmail-2.2.12:

5091 snprintf(query, DEF_QUERYSIZE,
5092 "SELECT lastseen FROM %sreplycache "
5093 "WHERE to_addr = '%s' AND from_addr = '%s'
"
5094 "AND handle = '%s' AND lastseen > (%s)",
5095 DBPFX, escaped_to, escaped_from,
escaped_handle, tmp->str);

increasing the value of DEF_QUERYSIZE to 4096 seems to be a work around,
but would like have something in dbmail.conf to control the size of an
auto-responder instead of modifying DEF_QUERYSIZE in the code.
======================================================================

----------------------------------------------------------------------
(0002941) paul (administrator) - 09-Nov-09 15:54
http://www.dbmail.org/mantis/view.php?id=816#c2941
----------------------------------------------------------------------
I would like to see the actual query being generated here.

Sounds like the whole reply message is inserted where escaped_handle
should be used. Someone else reported something like that, and if true, it
would definitely imply a bug - though not in the code you mention.

The handle *should* be a md5 hash of the reply-subject and message
combined.
So show me some logs please, and if possible the sieve script as well.

----------------------------------------------------------------------
(0002942) namailsj (reporter) - 09-Nov-09 18:09
http://www.dbmail.org/mantis/view.php?id=816#c2942
----------------------------------------------------------------------
Here is the error message from the logs

Nov 9 08:48:42 testbox dbmail/lmtpd[25734]: Error:[sql]
dbmysql.c,db_query(+290): [.You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near '' at line 1] [.SELECT lastseen FROM dbmail_replycache WHERE
to_addr = 'testmessage[at]test.com' AND from_addr =
'xxxxxxxxxxxxxxxx[at]xxxxxxxxxxx.com' AND handle =
'Question:xxxxxxxxxxxxxxxx[at]xxxxxxxxxxx.com:Dear Valued Customer,\n\nAdded
useless characters to test the message
length\n01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101


Here is the my test sieve script:

[root[at]testbox dbmail-2.2.12]# dbmail-sievecmd -c -u
xxxxxxx[at]xxxxxx.xxxxxxxx.com
require "vacation"; if not header :contains "Precedence" ["bulk","list"]
{vacation :from "xxxxxxxxxxxxxxxx[at]xxxxxxxxxxx.com" :subject "Question"
"Dear Valued Customer,

Added useless characters to test the message length
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101

Thank you.

"; }

Also, yet another "Minor" issue, let me know if you would like me to file
it under another bug: if a sieve message has a "/" (slash) character in the
first few words of the auto-responder body then that gets included in the
"X-DBMail-Vacation:" header, some remote email servers then bounce that
message saying invalid message or mime-type.

Let me know if I could provide you with any other information or testing
to further troubleshoot these issue.

Note: Also uploaded log output as a text file.
File Name dbmail-issue_0000816_log_01.txt

Thanks.



----------------------------------------------------------------------
(0002943) paul (administrator) - 10-Nov-09 12:03
http://www.dbmail.org/mantis/view.php?id=816#c2943
----------------------------------------------------------------------
Thank you for providing additional information. Looks like we have a bug in
the md5 code.

Please file a separate bug report for the x-dbmail-vacation header issue.

Issue History
Date Modified Username Field Change
======================================================================
07-Nov-09 03:23 namailsj New Issue
09-Nov-09 15:54 paul Note Added: 0002941
09-Nov-09 18:05 namailsj Note Added: 0002942
09-Nov-09 18:08 namailsj File Added: dbmail-issue_0000816_log_01.txt

09-Nov-09 18:09 namailsj Note Edited: 0002942
10-Nov-09 12:03 paul Note Added: 0002943
======================================================================

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


mysql.jorge at decimal

Nov 10, 2009, 3:45 AM

Post #5 of 7 (227 views)
Permalink
Re: [DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail [In reply to]

Hi Paul,

> ----------------------------------------------------------------------
> (0002943) paul (administrator) - 10-Nov-09 12:03
> http://www.dbmail.org/mantis/view.php?id=816#c2943
> ----------------------------------------------------------------------
> Thank you for providing additional information. Looks like we have a
> bug in
> the md5 code.
>
> Please file a separate bug report for the x-dbmail-vacation header
> issue.
>

The issue that I reported with the sieve vacation auto-reply when the
message sent has non-ASCII chars, has something to do with this, or other
problem?

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


mysql.jorge at decimal

Nov 10, 2009, 4:14 AM

Post #6 of 7 (227 views)
Permalink
Re: [DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail [In reply to]

> Most likely completely unrelated since you're on 2.3+ and this is about
> 2.2
>

Ops,
I missed that part, sorry.

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


paul at nfg

Nov 10, 2009, 4:15 AM

Post #7 of 7 (226 views)
Permalink
Re: [DBMail 0000816]: DEF_QUERYSIZE is currently 1024, causing sieve generated autoresponders to fail [In reply to]

Most likely completely unrelated since you're on 2.3+ and this is about 2.2

Jorge Bastos wrote:
> Hi Paul,
>
>> ----------------------------------------------------------------------
>> (0002943) paul (administrator) - 10-Nov-09 12:03
>> http://www.dbmail.org/mantis/view.php?id=816#c2943
>> ----------------------------------------------------------------------
>> Thank you for providing additional information. Looks like we have a
>> bug in
>> the md5 code.
>>
>> Please file a separate bug report for the x-dbmail-vacation header
>> issue.
>>
>
> The issue that I reported with the sieve vacation auto-reply when the
> message sent has non-ASCII chars, has something to do with this, or other
> problem?
>
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev[at]dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev
>


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.