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

View: New views
7 Messages — Rating Filter:   Alert me  

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

by Mantis Bug Tracker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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

by Mantis Bug Tracker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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

by Mantis Bug Tracker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...' AND from_addr =
'xxxxxxxxxxxxxxxx@...' AND handle =
'Question:xxxxxxxxxxxxxxxx@...:Dear Valued Customer,\n\nAdded
useless characters to test the message
length\n01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101


Here is the my test sieve script:

[root@testbox dbmail-2.2.12]# dbmail-sievecmd -c -u
xxxxxxx@...
require "vacation"; if not header :contains "Precedence" ["bulk","list"]
{vacation :from "xxxxxxxxxxxxxxxx@..." :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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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

by Mantis Bug Tracker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...' AND from_addr =
'xxxxxxxxxxxxxxxx@...' AND handle =
'Question:xxxxxxxxxxxxxxxx@...:Dear Valued Customer,\n\nAdded
useless characters to test the message
length\n01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101


Here is the my test sieve script:

[root@testbox dbmail-2.2.12]# dbmail-sievecmd -c -u
xxxxxxx@...
require "vacation"; if not header :contains "Precedence" ["bulk","list"]
{vacation :from "xxxxxxxxxxxxxxxx@..." :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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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

by Jorge Bastos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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

by Jorge Bastos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

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

by Paul J Stevens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
> 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@...
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev